diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto index 051361c5d8f..0f022697930 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto @@ -396,11 +396,21 @@ message AnalyzeContentResponse { // The suggestions for most recent human agent. The order is the same as // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config]. + // + // Note that any failure of Agent Assist features will not lead to the overall + // failure of an AnalyzeContent API call. Instead, the features will + // fail silently with the error field set in the corresponding + // SuggestionResult. repeated SuggestionResult human_agent_suggestion_results = 6; // The suggestions for end user. The order is the same as // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config]. + // + // Same as human_agent_suggestion_results, any failure of Agent Assist + // features will not lead to the overall failure of an AnalyzeContent API + // call. Instead, the features will fail silently with the error field set in + // the corresponding SuggestionResult. repeated SuggestionResult end_user_suggestion_results = 7; // Indicates the parameters of DTMF. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto index 657503803ef..95b3933a6d4 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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,7 +20,6 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -import "google/cloud/dialogflow/v2beta1/environment.proto"; import "google/cloud/dialogflow/v2beta1/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -478,6 +477,12 @@ message ExportAgentRequest { // URI to export the agent to. // The format of this URI must be `gs:///`. // If left unspecified, the serialized agent is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2; } @@ -510,6 +515,12 @@ message ImportAgentRequest { oneof agent { // The URI to a Google Cloud Storage file containing the agent to import. // Note: The URI must start with "gs://". + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2; // Zip compressed raw byte content for agent. @@ -533,6 +544,12 @@ message RestoreAgentRequest { oneof agent { // The URI to a Google Cloud Storage file containing the agent to restore. // Note: The URI must start with "gs://". + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2; // Zip compressed raw byte content for agent. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto index a5e02a635d9..9815384a868 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto index e0820f558cf..62952f4444b 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,12 +16,9 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto index c18e411a23d..a8e8c21f91f 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto index 6dc8ca9b9a3..d044b4be031 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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,16 +20,8 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -import "google/cloud/dialogflow/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/conversation_profile.proto"; -import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; -import "google/cloud/dialogflow/v2beta1/session.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto index 95815c79ab5..7f47dcee08a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/rpc/status.proto"; @@ -44,6 +43,10 @@ message ConversationEvent { // is terminated, or a conversation is closed via the API. CONVERSATION_FINISHED = 2; + // An existing conversation has received notification from Dialogflow that + // human intervention is required. + HUMAN_INTERVENTION_NEEDED = 3; + // An existing conversation has received a new message, either from API or // telephony. It is configured in // [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2beta1.ConversationProfile.new_message_event_notification_config] diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto index df4b3e20095..a4825bc2c3c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,10 +21,8 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/document.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -118,6 +116,63 @@ service ConversationProfiles { }; option (google.api.method_signature) = "name"; } + + // Adds or updates a suggestion feature in a conversation profile. + // If the conversation profile contains the type of suggestion feature for + // the participant role, it will update it. Otherwise it will insert the + // suggestion feature. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata] + // - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] + // + // If a long running operation to add or update suggestion feature + // config for the same conversation profile, participant role and suggestion + // feature type exists, please cancel the existing long running operation + // before sending such request, otherwise the request will be rejected. + rpc SetSuggestionFeatureConfig(SetSuggestionFeatureConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig" + body: "*" + additional_bindings { + post: "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig" + body: "*" + } + }; + option (google.api.method_signature) = "conversation_profile"; + option (google.longrunning.operation_info) = { + response_type: "ConversationProfile" + metadata_type: "SetSuggestionFeatureConfigOperationMetadata" + }; + } + + // Clears a suggestion feature from a conversation profile for the given + // participant role. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata] + // - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] + rpc ClearSuggestionFeatureConfig(ClearSuggestionFeatureConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig" + body: "*" + additional_bindings { + post: "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig" + body: "*" + } + }; + option (google.api.method_signature) = "conversation_profile"; + option (google.longrunning.operation_info) = { + response_type: "ConversationProfile" + metadata_type: "ClearSuggestionFeatureConfigOperationMetadata" + }; + } } // Defines the services to connect to incoming Dialogflow conversations. @@ -501,11 +556,15 @@ message NotificationConfig { // [CONVERSATION_STARTED][google.cloud.dialogflow.v2beta1.ConversationEvent.Type.CONVERSATION_STARTED] as // serialized [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] protos. // - // Notification works for phone calls, if this topic either is in the same - // project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service // Agent` role in the topic project. // + // For chat integration to receive notification, make sure API caller has been + // granted the `Dialogflow Service Agent` role for the topic. + // // Format: `projects//locations//topics/`. string topic = 1; @@ -604,3 +663,72 @@ message DeleteConversationProfileRequest { } ]; } + +// The request message for +// [ConversationProfiles.SetSuggestionFeature][]. +message SetSuggestionFeatureConfigRequest { + // Required. The Conversation Profile to add or update the suggestion feature + // config. Format: `projects//locations//conversationProfiles/`. + string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The participant role to add or update the suggestion feature + // config. Only HUMAN_AGENT or END_USER can be used. + Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The suggestion feature config to add or update. + HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [ConversationProfiles.ClearFeature][]. +message ClearSuggestionFeatureConfigRequest { + // Required. The Conversation Profile to add or update the suggestion feature + // config. Format: `projects//locations//conversationProfiles/`. + string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The participant role to remove the suggestion feature + // config. Only HUMAN_AGENT or END_USER can be used. + Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the suggestion feature to remove. + SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][] +// operation. +message SetSuggestionFeatureConfigOperationMetadata { + // The resource name of the conversation profile. Format: + // `projects//locations//conversationProfiles/` + string conversation_profile = 1; + + // Required. The participant role to add or update the suggestion feature + // config. Only HUMAN_AGENT or END_USER can be used. + Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the suggestion feature to add or update. + SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Timestamp whe the request was created. The time is measured on server side. + google.protobuf.Timestamp create_time = 4; +} + +// Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][] +// operation. +message ClearSuggestionFeatureConfigOperationMetadata { + // The resource name of the conversation profile. Format: + // `projects//locations//conversationProfiles/` + string conversation_profile = 1; + + // Required. The participant role to remove the suggestion feature + // config. Only HUMAN_AGENT or END_USER can be used. + Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the suggestion feature to remove. + SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Timestamp whe the request was created. The time is measured on server side. + google.protobuf.Timestamp create_time = 4; +} diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto index 38adc2a14b5..9ecdb5fb54c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -247,6 +246,8 @@ message Document { // The knowledge type of document content. enum KnowledgeType { + option allow_alias = true; + // The type is unspecified or arbitrary. KNOWLEDGE_TYPE_UNSPECIFIED = 0; @@ -267,6 +268,9 @@ message Document { // Only for Contact Center Solutions on Dialogflow. ARTICLE_SUGGESTION = 3; + // The document contains agent-facing Smart Reply entries. + AGENT_FACING_SMART_REPLY = 4; + // The legacy enum for agent-facing smart reply feature. SMART_REPLY = 4; } @@ -282,6 +286,27 @@ message Document { google.rpc.Status status = 2; } + // Possible states of the document + enum State { + // The document state is unspecified. + STATE_UNSPECIFIED = 0; + + // The document creation is in progress. + CREATING = 1; + + // The document is active and ready to use. + ACTIVE = 2; + + // The document updation is in progress. + UPDATING = 3; + + // The document is reloading. + RELOADING = 4; + + // The document deletion is in progress. + DELETING = 5; + } + // Optional. The document resource name. // The name must be empty when creating a document. // Format: `projects//locations/ metadata = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current state of the document. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. @@ -521,6 +549,12 @@ message UpdateDocumentRequest { google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } +// Metadata related to the Export Data Operations (e.g. ExportDocument). +message ExportOperationMetadata { + // Cloud Storage file path of the exported data. + GcsDestination exported_gcs_destination = 1; +} + // Metadata in google::longrunning::Operation for Knowledge operations. message KnowledgeOperationMetadata { // States of the operation. @@ -543,6 +577,12 @@ message KnowledgeOperationMetadata { // The name of the knowledge base interacted with during the operation. string knowledge_base = 3; + + // Additional metadata for the Knowledge operation. + oneof operation_metadata { + // Metadata for the Export Data Operation such as the destination of export. + ExportOperationMetadata export_operation_metadata = 4; + } } // Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto index 3a51bb6d241..7bffded54b6 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto index 5e80f180ca4..dd95cab9af3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto index d24667560a3..ce72a54ece5 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto index 35302fb0147..debb5786c06 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; option cc_enable_arenas = true; @@ -44,3 +43,13 @@ message GcsSource { // Whether a prefix or name is used depends on the use case. string uri = 1; } + +// Google Cloud Storage location for the output. +message GcsDestination { + // Required. The Google Cloud Storage URIs for the output. A URI is of the + // form: + // gs://bucket/object-prefix-or-name + // Whether a prefix or name is used depends on the use case. The requesting + // user must have "write-permission" to the bucket. + string uri = 1; +} diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto index ea40d03026b..9716f74e5b0 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; option cc_enable_arenas = true; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto index ba4333ac425..c6a8990c576 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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,10 +20,8 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto index fe50073bc2f..cf5c21ddee4 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto index e833810a02d..2552fd1bd2a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,10 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/audio_config.proto"; -import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/cloud/dialogflow/v2beta1/session.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -606,11 +603,21 @@ message AnalyzeContentResponse { // The suggestions for most recent human agent. The order is the same as // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config]. + // + // Note that any failure of Agent Assist features will not lead to the overall + // failure of an AnalyzeContent API call. Instead, the features will + // fail silently with the error field set in the corresponding + // SuggestionResult. repeated SuggestionResult human_agent_suggestion_results = 6; // The suggestions for end user. The order is the same as // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config]. + // + // Same as human_agent_suggestion_results, any failure of Agent Assist + // features will not lead to the overall failure of an AnalyzeContent API + // call. Instead, the features will fail silently with the error field set in + // the corresponding SuggestionResult. repeated SuggestionResult end_user_suggestion_results = 7; // Indicates the parameters of DTMF. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto index ac4ff4316f6..d31fb7f1a0d 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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,7 +23,6 @@ import "google/api/resource.proto"; import "google/cloud/dialogflow/v2beta1/agent.proto"; import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; -import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/cloud/dialogflow/v2beta1/intent.proto"; import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; import "google/protobuf/duration.proto"; @@ -795,6 +794,11 @@ message EventInput { // Support](https://cloud.google.com/dialogflow/docs/reference/language) // for a list of the currently supported language codes. Note that queries in // the same session do not necessarily need to specify the same language. + // + // This field is ignored when used in the context of a + // [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2beta1.WebhookResponse.followup_event_input] field, + // because the language was already defined in the originating detect + // intent request. string language_code = 3; } diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto index c38902b310b..4b1c5873d26 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto index 2daeaf32933..d3882b9fae2 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; - option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto index e3752610e15..58b4b5bbf71 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto index 293e55101d1..a566c5ccc8e 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.v2beta1; -import "google/api/annotations.proto"; import "google/cloud/dialogflow/v2beta1/context.proto"; import "google/cloud/dialogflow/v2beta1/intent.proto"; import "google/cloud/dialogflow/v2beta1/session.proto"; diff --git a/packages/google-cloud-dialogflow/protos/protos.d.ts b/packages/google-cloud-dialogflow/protos/protos.d.ts index 65aaf30c34d..c7bc7ffa338 100644 --- a/packages/google-cloud-dialogflow/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow/protos/protos.d.ts @@ -32053,24064 +32053,24508 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Represents an Environments */ - class Environments extends $protobuf.rpc.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 - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * 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): Environments; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - */ - public listEnvironments(request: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, callback: google.cloud.dialogflow.v2beta1.Environments.ListEnvironmentsCallback): void; + /** Properties of a ValidationError. */ + interface IValidationError { - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise - */ - public listEnvironments(request: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest): Promise; + /** ValidationError severity */ + severity?: (google.cloud.dialogflow.v2beta1.ValidationError.Severity|keyof typeof google.cloud.dialogflow.v2beta1.ValidationError.Severity|null); - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public getEnvironment(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentCallback): void; + /** ValidationError entries */ + entries?: (string[]|null); - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise - */ - public getEnvironment(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest): Promise; + /** ValidationError errorMessage */ + errorMessage?: (string|null); + } - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public createEnvironment(request: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.CreateEnvironmentCallback): void; + /** Represents a ValidationError. */ + class ValidationError implements IValidationError { /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise + * Constructs a new ValidationError. + * @param [properties] Properties to set */ - public createEnvironment(request: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest): Promise; + constructor(properties?: google.cloud.dialogflow.v2beta1.IValidationError); - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public updateEnvironment(request: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironmentCallback): void; + /** ValidationError severity. */ + public severity: (google.cloud.dialogflow.v2beta1.ValidationError.Severity|keyof typeof google.cloud.dialogflow.v2beta1.ValidationError.Severity); - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise - */ - public updateEnvironment(request: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest): Promise; + /** ValidationError entries. */ + public entries: string[]; - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEnvironment(request: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.DeleteEnvironmentCallback): void; + /** ValidationError errorMessage. */ + public errorMessage: string; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise + * Creates a new ValidationError instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidationError instance */ - public deleteEnvironment(request: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest): Promise; + public static create(properties?: google.cloud.dialogflow.v2beta1.IValidationError): google.cloud.dialogflow.v2beta1.ValidationError; /** - * Calls GetEnvironmentHistory. - * @param request GetEnvironmentHistoryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EnvironmentHistory + * Encodes the specified ValidationError message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. + * @param message ValidationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEnvironmentHistory(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, callback: google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistoryCallback): void; + public static encode(message: google.cloud.dialogflow.v2beta1.IValidationError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetEnvironmentHistory. - * @param request GetEnvironmentHistoryRequest message or plain object - * @returns Promise + * Encodes the specified ValidationError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. + * @param message ValidationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEnvironmentHistory(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest): Promise; - } - - namespace Environments { + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IValidationError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#listEnvironments}. - * @param error Error, if any - * @param [response] ListEnvironmentsResponse + * Decodes a ValidationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ValidationError; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironment}. - * @param error Error, if any - * @param [response] Environment + * Decodes a ValidationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ValidationError; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#createEnvironment}. - * @param error Error, if any - * @param [response] Environment + * Verifies a ValidationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#updateEnvironment}. - * @param error Error, if any - * @param [response] Environment + * Creates a ValidationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidationError */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ValidationError; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#deleteEnvironment}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a ValidationError message. Also converts values to other types if specified. + * @param message ValidationError + * @param [options] Conversion options + * @returns Plain object */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.dialogflow.v2beta1.ValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironmentHistory}. - * @param error Error, if any - * @param [response] EnvironmentHistory + * Converts this ValidationError to JSON. + * @returns JSON object */ - type GetEnvironmentHistoryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EnvironmentHistory) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of an Environment. */ - interface IEnvironment { - - /** Environment name */ - name?: (string|null); - - /** Environment description */ - description?: (string|null); - - /** Environment agentVersion */ - agentVersion?: (string|null); - - /** Environment state */ - state?: (google.cloud.dialogflow.v2beta1.Environment.State|keyof typeof google.cloud.dialogflow.v2beta1.Environment.State|null); + namespace ValidationError { - /** Environment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ERROR = 3, + CRITICAL = 4 + } + } - /** Environment textToSpeechSettings */ - textToSpeechSettings?: (google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null); + /** Properties of a ValidationResult. */ + interface IValidationResult { - /** Environment fulfillment */ - fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); + /** ValidationResult validationErrors */ + validationErrors?: (google.cloud.dialogflow.v2beta1.IValidationError[]|null); } - /** Represents an Environment. */ - class Environment implements IEnvironment { + /** Represents a ValidationResult. */ + class ValidationResult implements IValidationResult { /** - * Constructs a new Environment. + * Constructs a new ValidationResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IEnvironment); - - /** Environment name. */ - public name: string; - - /** Environment description. */ - public description: string; - - /** Environment agentVersion. */ - public agentVersion: string; - - /** Environment state. */ - public state: (google.cloud.dialogflow.v2beta1.Environment.State|keyof typeof google.cloud.dialogflow.v2beta1.Environment.State); - - /** Environment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment textToSpeechSettings. */ - public textToSpeechSettings?: (google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IValidationResult); - /** Environment fulfillment. */ - public fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); + /** ValidationResult validationErrors. */ + public validationErrors: google.cloud.dialogflow.v2beta1.IValidationError[]; /** - * Creates a new Environment instance using the specified properties. + * Creates a new ValidationResult instance using the specified properties. * @param [properties] Properties to set - * @returns Environment instance + * @returns ValidationResult instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IEnvironment): google.cloud.dialogflow.v2beta1.Environment; + public static create(properties?: google.cloud.dialogflow.v2beta1.IValidationResult): google.cloud.dialogflow.v2beta1.ValidationResult; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode + * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. + * @param message ValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode + * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. + * @param message ValidationResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes a ValidationResult 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 ValidationResult * @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.v2beta1.Environment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ValidationResult; /** - * Decodes an Environment message from the specified reader or buffer, length delimited. + * Decodes a ValidationResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Environment + * @returns ValidationResult * @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.v2beta1.Environment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ValidationResult; /** - * Verifies an Environment message. + * Verifies a ValidationResult 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 ValidationResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Environment + * @returns ValidationResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Environment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ValidationResult; /** - * 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 ValidationResult message. Also converts values to other types if specified. + * @param message ValidationResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Environment to JSON. + * Converts this ValidationResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Environment { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STOPPED = 1, - LOADING = 2, - RUNNING = 3 - } - } - - /** Properties of a TextToSpeechSettings. */ - interface ITextToSpeechSettings { - - /** TextToSpeechSettings enableTextToSpeech */ - enableTextToSpeech?: (boolean|null); - - /** TextToSpeechSettings outputAudioEncoding */ - outputAudioEncoding?: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null); - - /** TextToSpeechSettings sampleRateHertz */ - sampleRateHertz?: (number|null); - - /** TextToSpeechSettings synthesizeSpeechConfigs */ - synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig }|null); - } - - /** Represents a TextToSpeechSettings. */ - class TextToSpeechSettings implements ITextToSpeechSettings { + /** Represents an AnswerRecords */ + class AnswerRecords extends $protobuf.rpc.Service { /** - * Constructs a new TextToSpeechSettings. - * @param [properties] Properties to set + * Constructs a new AnswerRecords 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.v2beta1.ITextToSpeechSettings); - - /** TextToSpeechSettings enableTextToSpeech. */ - public enableTextToSpeech: boolean; - - /** TextToSpeechSettings outputAudioEncoding. */ - public outputAudioEncoding: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding); - - /** TextToSpeechSettings sampleRateHertz. */ - public sampleRateHertz: number; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** TextToSpeechSettings synthesizeSpeechConfigs. */ - public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig }; + /** + * Creates new AnswerRecords 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): AnswerRecords; /** - * Creates a new TextToSpeechSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns TextToSpeechSettings instance + * Calls GetAnswerRecord. + * @param request GetAnswerRecordRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnswerRecord */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; + public getAnswerRecord(request: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecordCallback): void; /** - * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. - * @param message TextToSpeechSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetAnswerRecord. + * @param request GetAnswerRecordRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public getAnswerRecord(request: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest): Promise; /** - * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. - * @param message TextToSpeechSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListAnswerRecords. + * @param request ListAnswerRecordsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAnswerRecordsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public listAnswerRecords(request: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecordsCallback): void; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextToSpeechSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListAnswerRecords. + * @param request ListAnswerRecordsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; + public listAnswerRecords(request: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest): Promise; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextToSpeechSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateAnswerRecord. + * @param request UpdateAnswerRecordRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnswerRecord */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; + public updateAnswerRecord(request: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecordCallback): void; /** - * Verifies a TextToSpeechSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateAnswerRecord. + * @param request UpdateAnswerRecordRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public updateAnswerRecord(request: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest): Promise; + } + + namespace AnswerRecords { /** - * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextToSpeechSettings + * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#getAnswerRecord}. + * @param error Error, if any + * @param [response] AnswerRecord */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; + type GetAnswerRecordCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnswerRecord) => void; /** - * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. - * @param message TextToSpeechSettings - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#listAnswerRecords}. + * @param error Error, if any + * @param [response] ListAnswerRecordsResponse */ - public static toObject(message: google.cloud.dialogflow.v2beta1.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ListAnswerRecordsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse) => void; /** - * Converts this TextToSpeechSettings to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#updateAnswerRecord}. + * @param error Error, if any + * @param [response] AnswerRecord */ - public toJSON(): { [k: string]: any }; + type UpdateAnswerRecordCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnswerRecord) => void; } - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { + /** Properties of an AnswerRecord. */ + interface IAnswerRecord { - /** ListEnvironmentsRequest parent */ - parent?: (string|null); + /** AnswerRecord name */ + name?: (string|null); - /** ListEnvironmentsRequest pageSize */ - pageSize?: (number|null); + /** AnswerRecord answerFeedback */ + answerFeedback?: (google.cloud.dialogflow.v2beta1.IAnswerFeedback|null); - /** ListEnvironmentsRequest pageToken */ - pageToken?: (string|null); + /** AnswerRecord agentAssistantRecord */ + agentAssistantRecord?: (google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null); } - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { + /** Represents an AnswerRecord. */ + class AnswerRecord implements IAnswerRecord { /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new AnswerRecord. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAnswerRecord); - /** ListEnvironmentsRequest parent. */ - public parent: string; + /** AnswerRecord name. */ + public name: string; - /** ListEnvironmentsRequest pageSize. */ - public pageSize: number; + /** AnswerRecord answerFeedback. */ + public answerFeedback?: (google.cloud.dialogflow.v2beta1.IAnswerFeedback|null); - /** ListEnvironmentsRequest pageToken. */ - public pageToken: string; + /** AnswerRecord agentAssistantRecord. */ + public agentAssistantRecord?: (google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null); + + /** AnswerRecord record. */ + public record?: "agentAssistantRecord"; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new AnswerRecord instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance + * @returns AnswerRecord instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAnswerRecord): google.cloud.dialogflow.v2beta1.AnswerRecord; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified AnswerRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. + * @param message AnswerRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAnswerRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified AnswerRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. + * @param message AnswerRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnswerRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes an AnswerRecord 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 AnswerRecord * @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.v2beta1.ListEnvironmentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AnswerRecord; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes an AnswerRecord message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest + * @returns AnswerRecord * @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.v2beta1.ListEnvironmentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AnswerRecord; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies an AnswerRecord 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 an AnswerRecord message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsRequest + * @returns AnswerRecord */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnswerRecord; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest + * Creates a plain object from an AnswerRecord message. Also converts values to other types if specified. + * @param message AnswerRecord * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AnswerRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this AnswerRecord to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { - - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.dialogflow.v2beta1.IEnvironment[]|null); + /** Properties of an AgentAssistantRecord. */ + interface IAgentAssistantRecord { - /** ListEnvironmentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** AgentAssistantRecord articleSuggestionAnswer */ + articleSuggestionAnswer?: (google.cloud.dialogflow.v2beta1.IArticleAnswer|null); + + /** AgentAssistantRecord faqAnswer */ + faqAnswer?: (google.cloud.dialogflow.v2beta1.IFaqAnswer|null); } - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { + /** Represents an AgentAssistantRecord. */ + class AgentAssistantRecord implements IAgentAssistantRecord { /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new AgentAssistantRecord. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord); - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.dialogflow.v2beta1.IEnvironment[]; + /** AgentAssistantRecord articleSuggestionAnswer. */ + public articleSuggestionAnswer?: (google.cloud.dialogflow.v2beta1.IArticleAnswer|null); - /** ListEnvironmentsResponse nextPageToken. */ - public nextPageToken: string; + /** AgentAssistantRecord faqAnswer. */ + public faqAnswer?: (google.cloud.dialogflow.v2beta1.IFaqAnswer|null); + + /** AgentAssistantRecord answer. */ + public answer?: ("articleSuggestionAnswer"|"faqAnswer"); /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new AgentAssistantRecord instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance + * @returns AgentAssistantRecord instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified AgentAssistantRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. + * @param message AgentAssistantRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified AgentAssistantRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. + * @param message AgentAssistantRecord message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes an AgentAssistantRecord 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 AgentAssistantRecord * @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.v2beta1.ListEnvironmentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes an AgentAssistantRecord message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse + * @returns AgentAssistantRecord * @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.v2beta1.ListEnvironmentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies an AgentAssistantRecord 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 an AgentAssistantRecord message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsResponse + * @returns AgentAssistantRecord */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse + * Creates a plain object from an AgentAssistantRecord message. Also converts values to other types if specified. + * @param message AgentAssistantRecord * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this AgentAssistantRecord to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { + /** Properties of an AnswerFeedback. */ + interface IAnswerFeedback { - /** GetEnvironmentRequest name */ - name?: (string|null); + /** AnswerFeedback correctnessLevel */ + correctnessLevel?: (google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|null); + + /** AnswerFeedback agentAssistantDetailFeedback */ + agentAssistantDetailFeedback?: (google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null); + + /** AnswerFeedback clicked */ + clicked?: (boolean|null); + + /** AnswerFeedback clickTime */ + clickTime?: (google.protobuf.ITimestamp|null); + + /** AnswerFeedback displayed */ + displayed?: (boolean|null); + + /** AnswerFeedback displayTime */ + displayTime?: (google.protobuf.ITimestamp|null); } - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { + /** Represents an AnswerFeedback. */ + class AnswerFeedback implements IAnswerFeedback { /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new AnswerFeedback. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAnswerFeedback); - /** GetEnvironmentRequest name. */ - public name: string; + /** AnswerFeedback correctnessLevel. */ + public correctnessLevel: (google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel); + + /** AnswerFeedback agentAssistantDetailFeedback. */ + public agentAssistantDetailFeedback?: (google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null); + + /** AnswerFeedback clicked. */ + public clicked: boolean; + + /** AnswerFeedback clickTime. */ + public clickTime?: (google.protobuf.ITimestamp|null); + + /** AnswerFeedback displayed. */ + public displayed: boolean; + + /** AnswerFeedback displayTime. */ + public displayTime?: (google.protobuf.ITimestamp|null); + + /** AnswerFeedback detailFeedback. */ + public detailFeedback?: "agentAssistantDetailFeedback"; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * Creates a new AnswerFeedback instance using the specified properties. * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance + * @returns AnswerFeedback instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAnswerFeedback): google.cloud.dialogflow.v2beta1.AnswerFeedback; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes an AnswerFeedback 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 AnswerFeedback * @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.v2beta1.GetEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AnswerFeedback; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest + * @returns AnswerFeedback * @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.v2beta1.GetEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AnswerFeedback; /** - * Verifies a GetEnvironmentRequest message. + * Verifies an AnswerFeedback 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 an AnswerFeedback message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEnvironmentRequest + * @returns AnswerFeedback */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnswerFeedback; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @param message AnswerFeedback * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this AnswerFeedback to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { + namespace AnswerFeedback { - /** CreateEnvironmentRequest parent */ - parent?: (string|null); + /** CorrectnessLevel enum. */ + enum CorrectnessLevel { + CORRECTNESS_LEVEL_UNSPECIFIED = 0, + NOT_CORRECT = 1, + PARTIALLY_CORRECT = 2, + FULLY_CORRECT = 3 + } + } - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); + /** Properties of an AgentAssistantFeedback. */ + interface IAgentAssistantFeedback { - /** CreateEnvironmentRequest environmentId */ - environmentId?: (string|null); + /** AgentAssistantFeedback answerRelevance */ + answerRelevance?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|null); + + /** AgentAssistantFeedback documentCorrectness */ + documentCorrectness?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|null); + + /** AgentAssistantFeedback documentEfficiency */ + documentEfficiency?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|null); + + /** AgentAssistantFeedback summarizationFeedback */ + summarizationFeedback?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null); } - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + /** Represents an AgentAssistantFeedback. */ + class AgentAssistantFeedback implements IAgentAssistantFeedback { /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new AgentAssistantFeedback. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback); - /** CreateEnvironmentRequest parent. */ - public parent: string; + /** AgentAssistantFeedback answerRelevance. */ + public answerRelevance: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance); - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); + /** AgentAssistantFeedback documentCorrectness. */ + public documentCorrectness: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness); - /** CreateEnvironmentRequest environmentId. */ - public environmentId: string; + /** AgentAssistantFeedback documentEfficiency. */ + public documentEfficiency: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency); + + /** AgentAssistantFeedback summarizationFeedback. */ + public summarizationFeedback?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null); /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * Creates a new AgentAssistantFeedback instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance + * @returns AgentAssistantFeedback instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified AgentAssistantFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. + * @param message AgentAssistantFeedback message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified AgentAssistantFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. + * @param message AgentAssistantFeedback message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes an AgentAssistantFeedback 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 AgentAssistantFeedback * @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.v2beta1.CreateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AgentAssistantFeedback message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest + * @returns AgentAssistantFeedback * @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.v2beta1.CreateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies an AgentAssistantFeedback 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 an AgentAssistantFeedback message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEnvironmentRequest + * @returns AgentAssistantFeedback */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest + * Creates a plain object from an AgentAssistantFeedback message. Also converts values to other types if specified. + * @param message AgentAssistantFeedback * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this AgentAssistantFeedback to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { + namespace AgentAssistantFeedback { - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); + /** AnswerRelevance enum. */ + enum AnswerRelevance { + ANSWER_RELEVANCE_UNSPECIFIED = 0, + IRRELEVANT = 1, + RELEVANT = 2 + } - /** UpdateEnvironmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** DocumentCorrectness enum. */ + enum DocumentCorrectness { + DOCUMENT_CORRECTNESS_UNSPECIFIED = 0, + INCORRECT = 1, + CORRECT = 2 + } - /** UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges */ - allowLoadToDraftAndDiscardChanges?: (boolean|null); + /** DocumentEfficiency enum. */ + enum DocumentEfficiency { + DOCUMENT_EFFICIENCY_UNSPECIFIED = 0, + INEFFICIENT = 1, + EFFICIENT = 2 + } + + /** Properties of a SummarizationFeedback. */ + interface ISummarizationFeedback { + + /** SummarizationFeedback startTimestamp */ + startTimestamp?: (google.protobuf.ITimestamp|null); + + /** SummarizationFeedback submitTimestamp */ + submitTimestamp?: (google.protobuf.ITimestamp|null); + + /** SummarizationFeedback summaryText */ + summaryText?: (string|null); + } + + /** Represents a SummarizationFeedback. */ + class SummarizationFeedback implements ISummarizationFeedback { + + /** + * Constructs a new SummarizationFeedback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback); + + /** SummarizationFeedback startTimestamp. */ + public startTimestamp?: (google.protobuf.ITimestamp|null); + + /** SummarizationFeedback submitTimestamp. */ + public submitTimestamp?: (google.protobuf.ITimestamp|null); + + /** SummarizationFeedback summaryText. */ + public summaryText: string; + + /** + * Creates a new SummarizationFeedback instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationFeedback instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback; + + /** + * Encodes the specified SummarizationFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. + * @param message SummarizationFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. + * @param message SummarizationFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationFeedback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationFeedback + * @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.v2beta1.AgentAssistantFeedback.SummarizationFeedback; + + /** + * Decodes a SummarizationFeedback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationFeedback + * @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.v2beta1.AgentAssistantFeedback.SummarizationFeedback; + + /** + * Verifies a SummarizationFeedback 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 SummarizationFeedback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationFeedback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback; + + /** + * Creates a plain object from a SummarizationFeedback message. Also converts values to other types if specified. + * @param message SummarizationFeedback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationFeedback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + /** Properties of a GetAnswerRecordRequest. */ + interface IGetAnswerRecordRequest { + + /** GetAnswerRecordRequest name */ + name?: (string|null); + } + + /** Represents a GetAnswerRecordRequest. */ + class GetAnswerRecordRequest implements IGetAnswerRecordRequest { /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new GetAnswerRecordRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest); - - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); - - /** UpdateEnvironmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest); - /** UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges. */ - public allowLoadToDraftAndDiscardChanges: boolean; + /** GetAnswerRecordRequest name. */ + public name: string; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new GetAnswerRecordRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance + * @returns GetAnswerRecordRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified GetAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. + * @param message GetAnswerRecordRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified GetAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. + * @param message GetAnswerRecordRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetAnswerRecordRequest 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 GetAnswerRecordRequest * @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.v2beta1.UpdateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAnswerRecordRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest + * @returns GetAnswerRecordRequest * @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.v2beta1.UpdateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies a GetAnswerRecordRequest 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 a GetAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEnvironmentRequest + * @returns GetAnswerRecordRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest + * Creates a plain object from a GetAnswerRecordRequest message. Also converts values to other types if specified. + * @param message GetAnswerRecordRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this GetAnswerRecordRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { + /** Properties of a ListAnswerRecordsRequest. */ + interface IListAnswerRecordsRequest { - /** DeleteEnvironmentRequest name */ - name?: (string|null); + /** ListAnswerRecordsRequest parent */ + parent?: (string|null); + + /** ListAnswerRecordsRequest pageSize */ + pageSize?: (number|null); + + /** ListAnswerRecordsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + /** Represents a ListAnswerRecordsRequest. */ + class ListAnswerRecordsRequest implements IListAnswerRecordsRequest { /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new ListAnswerRecordsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest); - /** DeleteEnvironmentRequest name. */ - public name: string; + /** ListAnswerRecordsRequest parent. */ + public parent: string; + + /** ListAnswerRecordsRequest pageSize. */ + public pageSize: number; + + /** ListAnswerRecordsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * Creates a new ListAnswerRecordsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance + * @returns ListAnswerRecordsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified ListAnswerRecordsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. + * @param message ListAnswerRecordsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified ListAnswerRecordsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. + * @param message ListAnswerRecordsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListAnswerRecordsRequest 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 ListAnswerRecordsRequest * @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.v2beta1.DeleteEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest + * @returns ListAnswerRecordsRequest * @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.v2beta1.DeleteEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a ListAnswerRecordsRequest 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 ListAnswerRecordsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEnvironmentRequest + * @returns ListAnswerRecordsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; /** - * 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 ListAnswerRecordsRequest message. Also converts values to other types if specified. + * @param message ListAnswerRecordsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this ListAnswerRecordsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEnvironmentHistoryRequest. */ - interface IGetEnvironmentHistoryRequest { - - /** GetEnvironmentHistoryRequest parent */ - parent?: (string|null); + /** Properties of a ListAnswerRecordsResponse. */ + interface IListAnswerRecordsResponse { - /** GetEnvironmentHistoryRequest pageSize */ - pageSize?: (number|null); + /** ListAnswerRecordsResponse answerRecords */ + answerRecords?: (google.cloud.dialogflow.v2beta1.IAnswerRecord[]|null); - /** GetEnvironmentHistoryRequest pageToken */ - pageToken?: (string|null); + /** ListAnswerRecordsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetEnvironmentHistoryRequest. */ - class GetEnvironmentHistoryRequest implements IGetEnvironmentHistoryRequest { + /** Represents a ListAnswerRecordsResponse. */ + class ListAnswerRecordsResponse implements IListAnswerRecordsResponse { /** - * Constructs a new GetEnvironmentHistoryRequest. + * Constructs a new ListAnswerRecordsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest); - - /** GetEnvironmentHistoryRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse); - /** GetEnvironmentHistoryRequest pageSize. */ - public pageSize: number; + /** ListAnswerRecordsResponse answerRecords. */ + public answerRecords: google.cloud.dialogflow.v2beta1.IAnswerRecord[]; - /** GetEnvironmentHistoryRequest pageToken. */ - public pageToken: string; + /** ListAnswerRecordsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetEnvironmentHistoryRequest instance using the specified properties. + * Creates a new ListAnswerRecordsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetEnvironmentHistoryRequest instance + * @returns ListAnswerRecordsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; /** - * Encodes the specified GetEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. - * @param message GetEnvironmentHistoryRequest message or plain object to encode + * Encodes the specified ListAnswerRecordsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. + * @param message ListAnswerRecordsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. - * @param message GetEnvironmentHistoryRequest message or plain object to encode + * Encodes the specified ListAnswerRecordsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. + * @param message ListAnswerRecordsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEnvironmentHistoryRequest + * @returns ListAnswerRecordsResponse * @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.v2beta1.GetEnvironmentHistoryRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; /** - * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEnvironmentHistoryRequest + * @returns ListAnswerRecordsResponse * @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.v2beta1.GetEnvironmentHistoryRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; /** - * Verifies a GetEnvironmentHistoryRequest message. + * Verifies a ListAnswerRecordsResponse 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 GetEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnswerRecordsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEnvironmentHistoryRequest + * @returns ListAnswerRecordsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; /** - * Creates a plain object from a GetEnvironmentHistoryRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentHistoryRequest + * Creates a plain object from a ListAnswerRecordsResponse message. Also converts values to other types if specified. + * @param message ListAnswerRecordsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEnvironmentHistoryRequest to JSON. + * Converts this ListAnswerRecordsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EnvironmentHistory. */ - interface IEnvironmentHistory { - - /** EnvironmentHistory parent */ - parent?: (string|null); + /** Properties of an UpdateAnswerRecordRequest. */ + interface IUpdateAnswerRecordRequest { - /** EnvironmentHistory entries */ - entries?: (google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry[]|null); + /** UpdateAnswerRecordRequest answerRecord */ + answerRecord?: (google.cloud.dialogflow.v2beta1.IAnswerRecord|null); - /** EnvironmentHistory nextPageToken */ - nextPageToken?: (string|null); + /** UpdateAnswerRecordRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an EnvironmentHistory. */ - class EnvironmentHistory implements IEnvironmentHistory { + /** Represents an UpdateAnswerRecordRequest. */ + class UpdateAnswerRecordRequest implements IUpdateAnswerRecordRequest { /** - * Constructs a new EnvironmentHistory. + * Constructs a new UpdateAnswerRecordRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IEnvironmentHistory); - - /** EnvironmentHistory parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest); - /** EnvironmentHistory entries. */ - public entries: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry[]; + /** UpdateAnswerRecordRequest answerRecord. */ + public answerRecord?: (google.cloud.dialogflow.v2beta1.IAnswerRecord|null); - /** EnvironmentHistory nextPageToken. */ - public nextPageToken: string; + /** UpdateAnswerRecordRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new EnvironmentHistory instance using the specified properties. + * Creates a new UpdateAnswerRecordRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EnvironmentHistory instance + * @returns UpdateAnswerRecordRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IEnvironmentHistory): google.cloud.dialogflow.v2beta1.EnvironmentHistory; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; /** - * Encodes the specified EnvironmentHistory message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. - * @param message EnvironmentHistory message or plain object to encode + * Encodes the specified UpdateAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * @param message UpdateAnswerRecordRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IEnvironmentHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnvironmentHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. - * @param message EnvironmentHistory message or plain object to encode + * Encodes the specified UpdateAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * @param message UpdateAnswerRecordRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEnvironmentHistory, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnvironmentHistory message from the specified reader or buffer. + * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnvironmentHistory + * @returns UpdateAnswerRecordRequest * @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.v2beta1.EnvironmentHistory; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; /** - * Decodes an EnvironmentHistory message from the specified reader or buffer, length delimited. + * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnvironmentHistory + * @returns UpdateAnswerRecordRequest * @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.v2beta1.EnvironmentHistory; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; /** - * Verifies an EnvironmentHistory message. + * Verifies an UpdateAnswerRecordRequest 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 EnvironmentHistory message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnvironmentHistory + * @returns UpdateAnswerRecordRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EnvironmentHistory; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; /** - * Creates a plain object from an EnvironmentHistory message. Also converts values to other types if specified. - * @param message EnvironmentHistory + * Creates a plain object from an UpdateAnswerRecordRequest message. Also converts values to other types if specified. + * @param message UpdateAnswerRecordRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnvironmentHistory to JSON. + * Converts this UpdateAnswerRecordRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace EnvironmentHistory { - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry agentVersion */ - agentVersion?: (string|null); + /** Represents a Participants */ + class Participants extends $protobuf.rpc.Service { - /** Entry description */ - description?: (string|null); + /** + * Constructs a new Participants 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); - /** Entry createTime */ - createTime?: (google.protobuf.ITimestamp|null); - } + /** + * Creates new Participants 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): Participants; - /** Represents an Entry. */ - class Entry implements IEntry { + /** + * Calls CreateParticipant. + * @param request CreateParticipantRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Participant + */ + public createParticipant(request: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.CreateParticipantCallback): void; - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry); + /** + * Calls CreateParticipant. + * @param request CreateParticipantRequest message or plain object + * @returns Promise + */ + public createParticipant(request: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest): Promise; - /** Entry agentVersion. */ - public agentVersion: string; + /** + * Calls GetParticipant. + * @param request GetParticipantRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Participant + */ + public getParticipant(request: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.GetParticipantCallback): void; - /** Entry description. */ - public description: string; - - /** Entry createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry): google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @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.v2beta1.EnvironmentHistory.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @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.v2beta1.EnvironmentHistory.Entry; - - /** - * Verifies an Entry 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 Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry 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 - } + /** + * Calls GetParticipant. + * @param request GetParticipantRequest message or plain object + * @returns Promise + */ + public getParticipant(request: google.cloud.dialogflow.v2beta1.IGetParticipantRequest): Promise; - /** Properties of a SpeechContext. */ - interface ISpeechContext { + /** + * Calls ListParticipants. + * @param request ListParticipantsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListParticipantsResponse + */ + public listParticipants(request: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, callback: google.cloud.dialogflow.v2beta1.Participants.ListParticipantsCallback): void; - /** SpeechContext phrases */ - phrases?: (string[]|null); + /** + * Calls ListParticipants. + * @param request ListParticipantsRequest message or plain object + * @returns Promise + */ + public listParticipants(request: google.cloud.dialogflow.v2beta1.IListParticipantsRequest): Promise; - /** SpeechContext boost */ - boost?: (number|null); - } + /** + * Calls UpdateParticipant. + * @param request UpdateParticipantRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Participant + */ + public updateParticipant(request: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.UpdateParticipantCallback): void; - /** Represents a SpeechContext. */ - class SpeechContext implements ISpeechContext { + /** + * Calls UpdateParticipant. + * @param request UpdateParticipantRequest message or plain object + * @returns Promise + */ + public updateParticipant(request: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest): Promise; /** - * Constructs a new SpeechContext. - * @param [properties] Properties to set + * Calls AnalyzeContent. + * @param request AnalyzeContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyzeContentResponse */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechContext); + public analyzeContent(request: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, callback: google.cloud.dialogflow.v2beta1.Participants.AnalyzeContentCallback): void; - /** SpeechContext phrases. */ - public phrases: string[]; + /** + * Calls AnalyzeContent. + * @param request AnalyzeContentRequest message or plain object + * @returns Promise + */ + public analyzeContent(request: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest): Promise; - /** SpeechContext boost. */ - public boost: number; + /** + * Calls SuggestArticles. + * @param request SuggestArticlesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SuggestArticlesResponse + */ + public suggestArticles(request: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestArticlesCallback): void; /** - * Creates a new SpeechContext instance using the specified properties. - * @param [properties] Properties to set - * @returns SpeechContext instance + * Calls SuggestArticles. + * @param request SuggestArticlesRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechContext): google.cloud.dialogflow.v2beta1.SpeechContext; + public suggestArticles(request: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest): Promise; /** - * Encodes the specified SpeechContext message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. - * @param message SpeechContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SuggestFaqAnswers. + * @param request SuggestFaqAnswersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SuggestFaqAnswersResponse */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechContext, writer?: $protobuf.Writer): $protobuf.Writer; + public suggestFaqAnswers(request: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswersCallback): void; /** - * Encodes the specified SpeechContext message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. - * @param message SpeechContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SuggestFaqAnswers. + * @param request SuggestFaqAnswersRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechContext, writer?: $protobuf.Writer): $protobuf.Writer; + public suggestFaqAnswers(request: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest): Promise; /** - * Decodes a SpeechContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpeechContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SuggestSmartReplies. + * @param request SuggestSmartRepliesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SuggestSmartRepliesResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SpeechContext; + public suggestSmartReplies(request: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestSmartRepliesCallback): void; /** - * Decodes a SpeechContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpeechContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SuggestSmartReplies. + * @param request SuggestSmartRepliesRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SpeechContext; + public suggestSmartReplies(request: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest): Promise; /** - * Verifies a SpeechContext message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListSuggestions. + * @param request ListSuggestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSuggestionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listSuggestions(request: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest, callback: google.cloud.dialogflow.v2beta1.Participants.ListSuggestionsCallback): void; /** - * Creates a SpeechContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpeechContext + * Calls ListSuggestions. + * @param request ListSuggestionsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechContext; + public listSuggestions(request: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest): Promise; /** - * Creates a plain object from a SpeechContext message. Also converts values to other types if specified. - * @param message SpeechContext - * @param [options] Conversion options - * @returns Plain object + * Calls CompileSuggestion. + * @param request CompileSuggestionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompileSuggestionResponse */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public compileSuggestion(request: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest, callback: google.cloud.dialogflow.v2beta1.Participants.CompileSuggestionCallback): void; /** - * Converts this SpeechContext to JSON. - * @returns JSON object + * Calls CompileSuggestion. + * @param request CompileSuggestionRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public compileSuggestion(request: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest): Promise; } - /** SpeechModelVariant enum. */ - enum SpeechModelVariant { - SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, - USE_BEST_AVAILABLE = 1, - USE_STANDARD = 2, - USE_ENHANCED = 3 - } + namespace Participants { - /** Properties of a SpeechWordInfo. */ - interface ISpeechWordInfo { + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#createParticipant}. + * @param error Error, if any + * @param [response] Participant + */ + type CreateParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; - /** SpeechWordInfo word */ - word?: (string|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#getParticipant}. + * @param error Error, if any + * @param [response] Participant + */ + type GetParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; - /** SpeechWordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listParticipants}. + * @param error Error, if any + * @param [response] ListParticipantsResponse + */ + type ListParticipantsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListParticipantsResponse) => void; - /** SpeechWordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#updateParticipant}. + * @param error Error, if any + * @param [response] Participant + */ + type UpdateParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; - /** SpeechWordInfo confidence */ - confidence?: (number|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#analyzeContent}. + * @param error Error, if any + * @param [response] AnalyzeContentResponse + */ + type AnalyzeContentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnalyzeContentResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestArticles}. + * @param error Error, if any + * @param [response] SuggestArticlesResponse + */ + type SuggestArticlesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestArticlesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestFaqAnswers}. + * @param error Error, if any + * @param [response] SuggestFaqAnswersResponse + */ + type SuggestFaqAnswersCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestSmartReplies}. + * @param error Error, if any + * @param [response] SuggestSmartRepliesResponse + */ + type SuggestSmartRepliesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listSuggestions}. + * @param error Error, if any + * @param [response] ListSuggestionsResponse + */ + type ListSuggestionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListSuggestionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#compileSuggestion}. + * @param error Error, if any + * @param [response] CompileSuggestionResponse + */ + type CompileSuggestionCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.CompileSuggestionResponse) => void; } - /** Represents a SpeechWordInfo. */ - class SpeechWordInfo implements ISpeechWordInfo { + /** Properties of a Participant. */ + interface IParticipant { + + /** Participant name */ + name?: (string|null); + + /** Participant role */ + role?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); + + /** Participant obfuscatedExternalUserId */ + obfuscatedExternalUserId?: (string|null); + + /** Participant documentsMetadataFilters */ + documentsMetadataFilters?: ({ [k: string]: string }|null); + } + + /** Represents a Participant. */ + class Participant implements IParticipant { /** - * Constructs a new SpeechWordInfo. + * Constructs a new Participant. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechWordInfo); + constructor(properties?: google.cloud.dialogflow.v2beta1.IParticipant); - /** SpeechWordInfo word. */ - public word: string; + /** Participant name. */ + public name: string; - /** SpeechWordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); + /** Participant role. */ + public role: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); - /** SpeechWordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); + /** Participant obfuscatedExternalUserId. */ + public obfuscatedExternalUserId: string; - /** SpeechWordInfo confidence. */ - public confidence: number; + /** Participant documentsMetadataFilters. */ + public documentsMetadataFilters: { [k: string]: string }; /** - * Creates a new SpeechWordInfo instance using the specified properties. + * Creates a new Participant instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechWordInfo instance + * @returns Participant instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechWordInfo): google.cloud.dialogflow.v2beta1.SpeechWordInfo; + public static create(properties?: google.cloud.dialogflow.v2beta1.IParticipant): google.cloud.dialogflow.v2beta1.Participant; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified Participant message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. + * @param message Participant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. - * @param message SpeechWordInfo message or plain object to encode + * Encodes the specified Participant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. + * @param message Participant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer. + * Decodes a Participant 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 Participant * @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.v2beta1.SpeechWordInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Participant; /** - * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. + * Decodes a Participant message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechWordInfo + * @returns Participant * @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.v2beta1.SpeechWordInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Participant; /** - * Verifies a SpeechWordInfo message. + * Verifies a Participant 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 Participant message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechWordInfo + * @returns Participant */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechWordInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Participant; /** - * 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 Participant message. Also converts values to other types if specified. + * @param message Participant * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Participant, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechWordInfo to JSON. + * Converts this Participant to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an InputAudioConfig. */ - interface IInputAudioConfig { + namespace Participant { - /** InputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.v2beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.AudioEncoding|null); + /** Role enum. */ + enum Role { + ROLE_UNSPECIFIED = 0, + HUMAN_AGENT = 1, + AUTOMATED_AGENT = 2, + END_USER = 3 + } + } - /** InputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** Properties of a Message. */ + interface IMessage { - /** InputAudioConfig languageCode */ - languageCode?: (string|null); + /** Message name */ + name?: (string|null); - /** InputAudioConfig enableWordInfo */ - enableWordInfo?: (boolean|null); + /** Message content */ + content?: (string|null); - /** InputAudioConfig phraseHints */ - phraseHints?: (string[]|null); + /** Message languageCode */ + languageCode?: (string|null); - /** InputAudioConfig speechContexts */ - speechContexts?: (google.cloud.dialogflow.v2beta1.ISpeechContext[]|null); + /** Message participant */ + participant?: (string|null); - /** InputAudioConfig model */ - model?: (string|null); + /** Message participantRole */ + participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); - /** InputAudioConfig modelVariant */ - modelVariant?: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant|null); + /** Message createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** InputAudioConfig singleUtterance */ - singleUtterance?: (boolean|null); + /** Message sendTime */ + sendTime?: (google.protobuf.ITimestamp|null); - /** InputAudioConfig disableNoSpeechRecognizedEvent */ - disableNoSpeechRecognizedEvent?: (boolean|null); + /** Message messageAnnotation */ + messageAnnotation?: (google.cloud.dialogflow.v2beta1.IMessageAnnotation|null); + + /** Message sentimentAnalysis */ + sentimentAnalysis?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); } - /** Represents an InputAudioConfig. */ - class InputAudioConfig implements IInputAudioConfig { + /** Represents a Message. */ + class Message implements IMessage { /** - * Constructs a new InputAudioConfig. + * Constructs a new Message. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IInputAudioConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IMessage); - /** InputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.v2beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.AudioEncoding); + /** Message name. */ + public name: string; - /** InputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** Message content. */ + public content: string; - /** InputAudioConfig languageCode. */ + /** Message languageCode. */ public languageCode: string; - /** InputAudioConfig enableWordInfo. */ - public enableWordInfo: boolean; - - /** InputAudioConfig phraseHints. */ - public phraseHints: string[]; + /** Message participant. */ + public participant: string; - /** InputAudioConfig speechContexts. */ - public speechContexts: google.cloud.dialogflow.v2beta1.ISpeechContext[]; + /** Message participantRole. */ + public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); - /** InputAudioConfig model. */ - public model: string; + /** Message createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** InputAudioConfig modelVariant. */ - public modelVariant: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant); + /** Message sendTime. */ + public sendTime?: (google.protobuf.ITimestamp|null); - /** InputAudioConfig singleUtterance. */ - public singleUtterance: boolean; + /** Message messageAnnotation. */ + public messageAnnotation?: (google.cloud.dialogflow.v2beta1.IMessageAnnotation|null); - /** InputAudioConfig disableNoSpeechRecognizedEvent. */ - public disableNoSpeechRecognizedEvent: boolean; + /** Message sentimentAnalysis. */ + public sentimentAnalysis?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); /** - * Creates a new InputAudioConfig instance using the specified properties. + * Creates a new Message instance using the specified properties. * @param [properties] Properties to set - * @returns InputAudioConfig instance + * @returns Message instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IInputAudioConfig): google.cloud.dialogflow.v2beta1.InputAudioConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IMessage): google.cloud.dialogflow.v2beta1.Message; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. + * @param message Message message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. - * @param message InputAudioConfig message or plain object to encode + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. + * @param message Message message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a Message 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 Message * @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.v2beta1.InputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Message; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a Message message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InputAudioConfig + * @returns Message * @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.v2beta1.InputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Message; /** - * Verifies an InputAudioConfig message. + * Verifies a Message 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 Message message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InputAudioConfig + * @returns Message */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.InputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Message; /** - * 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 Message message. Also converts values to other types if specified. + * @param message Message * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InputAudioConfig to JSON. + * Converts this Message 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 a VoiceSelectionParams. */ - interface IVoiceSelectionParams { + /** Properties of a CreateParticipantRequest. */ + interface ICreateParticipantRequest { - /** VoiceSelectionParams name */ - name?: (string|null); + /** CreateParticipantRequest parent */ + parent?: (string|null); - /** VoiceSelectionParams ssmlGender */ - ssmlGender?: (google.cloud.dialogflow.v2beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.v2beta1.SsmlVoiceGender|null); + /** CreateParticipantRequest participant */ + participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); } - /** Represents a VoiceSelectionParams. */ - class VoiceSelectionParams implements IVoiceSelectionParams { + /** Represents a CreateParticipantRequest. */ + class CreateParticipantRequest implements ICreateParticipantRequest { /** - * Constructs a new VoiceSelectionParams. + * Constructs a new CreateParticipantRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest); - /** VoiceSelectionParams name. */ - public name: string; + /** CreateParticipantRequest parent. */ + public parent: string; - /** VoiceSelectionParams ssmlGender. */ - public ssmlGender: (google.cloud.dialogflow.v2beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.v2beta1.SsmlVoiceGender); + /** CreateParticipantRequest participant. */ + public participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Creates a new CreateParticipantRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VoiceSelectionParams instance + * @returns CreateParticipantRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified CreateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. + * @param message CreateParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. - * @param message VoiceSelectionParams message or plain object to encode + * Encodes the specified CreateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. + * @param message CreateParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a CreateParticipantRequest 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 CreateParticipantRequest * @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.v2beta1.VoiceSelectionParams; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a CreateParticipantRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VoiceSelectionParams + * @returns CreateParticipantRequest * @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.v2beta1.VoiceSelectionParams; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; /** - * Verifies a VoiceSelectionParams message. + * Verifies a CreateParticipantRequest 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 CreateParticipantRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VoiceSelectionParams + * @returns CreateParticipantRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; /** - * 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 CreateParticipantRequest message. Also converts values to other types if specified. + * @param message CreateParticipantRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this CreateParticipantRequest 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); - - /** SynthesizeSpeechConfig volumeGainDb */ - volumeGainDb?: (number|null); - - /** SynthesizeSpeechConfig effectsProfileId */ - effectsProfileId?: (string[]|null); + /** Properties of a GetParticipantRequest. */ + interface IGetParticipantRequest { - /** SynthesizeSpeechConfig voice */ - voice?: (google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null); + /** GetParticipantRequest name */ + name?: (string|null); } - /** Represents a SynthesizeSpeechConfig. */ - class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { + /** Represents a GetParticipantRequest. */ + class GetParticipantRequest implements IGetParticipantRequest { /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new GetParticipantRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig); - - /** SynthesizeSpeechConfig speakingRate. */ - public speakingRate: number; - - /** SynthesizeSpeechConfig pitch. */ - public pitch: number; - - /** SynthesizeSpeechConfig volumeGainDb. */ - public volumeGainDb: number; - - /** SynthesizeSpeechConfig effectsProfileId. */ - public effectsProfileId: string[]; + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetParticipantRequest); - /** SynthesizeSpeechConfig voice. */ - public voice?: (google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null); + /** GetParticipantRequest name. */ + public name: string; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new GetParticipantRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SynthesizeSpeechConfig instance + * @returns GetParticipantRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetParticipantRequest): google.cloud.dialogflow.v2beta1.GetParticipantRequest; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified GetParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. + * @param message GetParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. - * @param message SynthesizeSpeechConfig message or plain object to encode + * Encodes the specified GetParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. + * @param message GetParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a GetParticipantRequest 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 GetParticipantRequest * @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.v2beta1.SynthesizeSpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetParticipantRequest; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a GetParticipantRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SynthesizeSpeechConfig + * @returns GetParticipantRequest * @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.v2beta1.SynthesizeSpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetParticipantRequest; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a GetParticipantRequest 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 a GetParticipantRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SynthesizeSpeechConfig + * @returns GetParticipantRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetParticipantRequest; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. - * @param message SynthesizeSpeechConfig + * Creates a plain object from a GetParticipantRequest message. Also converts values to other types if specified. + * @param message GetParticipantRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this GetParticipantRequest 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 - } - - /** Properties of an OutputAudioConfig. */ - interface IOutputAudioConfig { + /** Properties of a ListParticipantsRequest. */ + interface IListParticipantsRequest { - /** OutputAudioConfig audioEncoding */ - audioEncoding?: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null); + /** ListParticipantsRequest parent */ + parent?: (string|null); - /** OutputAudioConfig sampleRateHertz */ - sampleRateHertz?: (number|null); + /** ListParticipantsRequest pageSize */ + pageSize?: (number|null); - /** OutputAudioConfig synthesizeSpeechConfig */ - synthesizeSpeechConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); + /** ListParticipantsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an OutputAudioConfig. */ - class OutputAudioConfig implements IOutputAudioConfig { + /** Represents a ListParticipantsRequest. */ + class ListParticipantsRequest implements IListParticipantsRequest { /** - * Constructs a new OutputAudioConfig. + * Constructs a new ListParticipantsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IOutputAudioConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsRequest); - /** OutputAudioConfig audioEncoding. */ - public audioEncoding: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding); + /** ListParticipantsRequest parent. */ + public parent: string; - /** OutputAudioConfig sampleRateHertz. */ - public sampleRateHertz: number; + /** ListParticipantsRequest pageSize. */ + public pageSize: number; - /** OutputAudioConfig synthesizeSpeechConfig. */ - public synthesizeSpeechConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); + /** ListParticipantsRequest pageToken. */ + public pageToken: string; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new ListParticipantsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudioConfig instance + * @returns ListParticipantsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IOutputAudioConfig): google.cloud.dialogflow.v2beta1.OutputAudioConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsRequest): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ListParticipantsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. + * @param message ListParticipantsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. - * @param message OutputAudioConfig message or plain object to encode + * Encodes the specified ListParticipantsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. + * @param message ListParticipantsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a ListParticipantsRequest 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 ListParticipantsRequest * @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.v2beta1.OutputAudioConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a ListParticipantsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudioConfig + * @returns ListParticipantsRequest * @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.v2beta1.OutputAudioConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; /** - * Verifies an OutputAudioConfig message. + * Verifies a ListParticipantsRequest 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 ListParticipantsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudioConfig + * @returns ListParticipantsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.OutputAudioConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; /** - * 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 ListParticipantsRequest message. Also converts values to other types if specified. + * @param message ListParticipantsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListParticipantsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this ListParticipantsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** TelephonyDtmf enum. */ - enum TelephonyDtmf { - TELEPHONY_DTMF_UNSPECIFIED = 0, - DTMF_ONE = 1, - DTMF_TWO = 2, - DTMF_THREE = 3, - DTMF_FOUR = 4, - DTMF_FIVE = 5, - DTMF_SIX = 6, - DTMF_SEVEN = 7, - DTMF_EIGHT = 8, - DTMF_NINE = 9, - DTMF_ZERO = 10, - DTMF_A = 11, - DTMF_B = 12, - DTMF_C = 13, - DTMF_D = 14, - DTMF_STAR = 15, - DTMF_POUND = 16 - } + /** Properties of a ListParticipantsResponse. */ + interface IListParticipantsResponse { - /** Properties of a TelephonyDtmfEvents. */ - interface ITelephonyDtmfEvents { + /** ListParticipantsResponse participants */ + participants?: (google.cloud.dialogflow.v2beta1.IParticipant[]|null); - /** TelephonyDtmfEvents dtmfEvents */ - dtmfEvents?: (google.cloud.dialogflow.v2beta1.TelephonyDtmf[]|null); + /** ListParticipantsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a TelephonyDtmfEvents. */ - class TelephonyDtmfEvents implements ITelephonyDtmfEvents { + /** Represents a ListParticipantsResponse. */ + class ListParticipantsResponse implements IListParticipantsResponse { /** - * Constructs a new TelephonyDtmfEvents. + * Constructs a new ListParticipantsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsResponse); - /** TelephonyDtmfEvents dtmfEvents. */ - public dtmfEvents: google.cloud.dialogflow.v2beta1.TelephonyDtmf[]; + /** ListParticipantsResponse participants. */ + public participants: google.cloud.dialogflow.v2beta1.IParticipant[]; + + /** ListParticipantsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new TelephonyDtmfEvents instance using the specified properties. + * Creates a new ListParticipantsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns TelephonyDtmfEvents instance + * @returns ListParticipantsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsResponse): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; /** - * Encodes the specified TelephonyDtmfEvents message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. - * @param message TelephonyDtmfEvents message or plain object to encode + * Encodes the specified ListParticipantsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. + * @param message ListParticipantsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListParticipantsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TelephonyDtmfEvents message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. - * @param message TelephonyDtmfEvents message or plain object to encode + * Encodes the specified ListParticipantsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. + * @param message ListParticipantsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListParticipantsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TelephonyDtmfEvents message from the specified reader or buffer. + * Decodes a ListParticipantsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TelephonyDtmfEvents + * @returns ListParticipantsResponse * @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.v2beta1.TelephonyDtmfEvents; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; /** - * Decodes a TelephonyDtmfEvents message from the specified reader or buffer, length delimited. + * Decodes a ListParticipantsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TelephonyDtmfEvents + * @returns ListParticipantsResponse * @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.v2beta1.TelephonyDtmfEvents; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; /** - * Verifies a TelephonyDtmfEvents message. + * Verifies a ListParticipantsResponse 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 TelephonyDtmfEvents message from a plain object. Also converts values to their respective internal types. + * Creates a ListParticipantsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TelephonyDtmfEvents + * @returns ListParticipantsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; /** - * Creates a plain object from a TelephonyDtmfEvents message. Also converts values to other types if specified. - * @param message TelephonyDtmfEvents + * Creates a plain object from a ListParticipantsResponse message. Also converts values to other types if specified. + * @param message ListParticipantsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListParticipantsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TelephonyDtmfEvents to JSON. + * Converts this ListParticipantsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SpeechToTextConfig. */ - interface ISpeechToTextConfig { + /** Properties of an UpdateParticipantRequest. */ + interface IUpdateParticipantRequest { - /** SpeechToTextConfig speechModelVariant */ - speechModelVariant?: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant|null); + /** UpdateParticipantRequest participant */ + participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + + /** UpdateParticipantRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a SpeechToTextConfig. */ - class SpeechToTextConfig implements ISpeechToTextConfig { + /** Represents an UpdateParticipantRequest. */ + class UpdateParticipantRequest implements IUpdateParticipantRequest { /** - * Constructs a new SpeechToTextConfig. + * Constructs a new UpdateParticipantRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest); - /** SpeechToTextConfig speechModelVariant. */ - public speechModelVariant: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant); + /** UpdateParticipantRequest participant. */ + public participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + + /** UpdateParticipantRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new SpeechToTextConfig instance using the specified properties. + * Creates a new UpdateParticipantRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechToTextConfig instance + * @returns UpdateParticipantRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; /** - * Encodes the specified SpeechToTextConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. - * @param message SpeechToTextConfig message or plain object to encode + * Encodes the specified UpdateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. + * @param message UpdateParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechToTextConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. - * @param message SpeechToTextConfig message or plain object to encode + * Encodes the specified UpdateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. + * @param message UpdateParticipantRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechToTextConfig message from the specified reader or buffer. + * Decodes an UpdateParticipantRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechToTextConfig + * @returns UpdateParticipantRequest * @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.v2beta1.SpeechToTextConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; /** - * Decodes a SpeechToTextConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateParticipantRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechToTextConfig + * @returns UpdateParticipantRequest * @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.v2beta1.SpeechToTextConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; /** - * Verifies a SpeechToTextConfig message. + * Verifies an UpdateParticipantRequest 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 SpeechToTextConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateParticipantRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechToTextConfig + * @returns UpdateParticipantRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; /** - * Creates a plain object from a SpeechToTextConfig message. Also converts values to other types if specified. - * @param message SpeechToTextConfig + * Creates a plain object from an UpdateParticipantRequest message. Also converts values to other types if specified. + * @param message UpdateParticipantRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechToTextConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechToTextConfig to JSON. + * Converts this UpdateParticipantRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Fulfillments */ - class Fulfillments extends $protobuf.rpc.Service { + /** Properties of an OutputAudio. */ + interface IOutputAudio { - /** - * Constructs a new Fulfillments 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); + /** OutputAudio config */ + config?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** OutputAudio audio */ + audio?: (Uint8Array|string|null); + } + + /** Represents an OutputAudio. */ + class OutputAudio implements IOutputAudio { /** - * Creates new Fulfillments 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. + * Constructs a new OutputAudio. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Fulfillments; + constructor(properties?: google.cloud.dialogflow.v2beta1.IOutputAudio); + + /** OutputAudio config. */ + public config?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** OutputAudio audio. */ + public audio: (Uint8Array|string); /** - * Calls GetFulfillment. - * @param request GetFulfillmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Fulfillment + * Creates a new OutputAudio instance using the specified properties. + * @param [properties] Properties to set + * @returns OutputAudio instance */ - public getFulfillment(request: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, callback: google.cloud.dialogflow.v2beta1.Fulfillments.GetFulfillmentCallback): void; + public static create(properties?: google.cloud.dialogflow.v2beta1.IOutputAudio): google.cloud.dialogflow.v2beta1.OutputAudio; /** - * Calls GetFulfillment. - * @param request GetFulfillmentRequest message or plain object - * @returns Promise + * Encodes the specified OutputAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. + * @param message OutputAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getFulfillment(request: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest): Promise; + public static encode(message: google.cloud.dialogflow.v2beta1.IOutputAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateFulfillment. - * @param request UpdateFulfillmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Fulfillment + * Encodes the specified OutputAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. + * @param message OutputAudio message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateFulfillment(request: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, callback: google.cloud.dialogflow.v2beta1.Fulfillments.UpdateFulfillmentCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IOutputAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateFulfillment. - * @param request UpdateFulfillmentRequest message or plain object - * @returns Promise + * Decodes an OutputAudio message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OutputAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateFulfillment(request: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest): Promise; - } + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.OutputAudio; - namespace Fulfillments { + /** + * Decodes an OutputAudio message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OutputAudio + * @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.v2beta1.OutputAudio; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#getFulfillment}. - * @param error Error, if any - * @param [response] Fulfillment + * Verifies an OutputAudio message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetFulfillmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Fulfillment) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#updateFulfillment}. - * @param error Error, if any - * @param [response] Fulfillment + * Creates an OutputAudio message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OutputAudio */ - type UpdateFulfillmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Fulfillment) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.OutputAudio; + + /** + * Creates a plain object from an OutputAudio message. Also converts values to other types if specified. + * @param message OutputAudio + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.OutputAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OutputAudio to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a Fulfillment. */ - interface IFulfillment { + /** Properties of an AutomatedAgentReply. */ + interface IAutomatedAgentReply { - /** Fulfillment name */ - name?: (string|null); + /** AutomatedAgentReply detectIntentResponse */ + detectIntentResponse?: (google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null); - /** Fulfillment displayName */ - displayName?: (string|null); + /** AutomatedAgentReply responseMessages */ + responseMessages?: (google.cloud.dialogflow.v2beta1.IResponseMessage[]|null); - /** Fulfillment genericWebService */ - genericWebService?: (google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null); + /** AutomatedAgentReply intent */ + intent?: (string|null); - /** Fulfillment enabled */ - enabled?: (boolean|null); + /** AutomatedAgentReply event */ + event?: (string|null); - /** Fulfillment features */ - features?: (google.cloud.dialogflow.v2beta1.Fulfillment.IFeature[]|null); + /** AutomatedAgentReply matchConfidence */ + matchConfidence?: (number|null); + + /** AutomatedAgentReply parameters */ + parameters?: (google.protobuf.IStruct|null); + + /** AutomatedAgentReply cxSessionParameters */ + cxSessionParameters?: (google.protobuf.IStruct|null); + + /** AutomatedAgentReply automatedAgentReplyType */ + automatedAgentReplyType?: (google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|keyof typeof google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|null); + + /** AutomatedAgentReply allowCancellation */ + allowCancellation?: (boolean|null); } - /** Represents a Fulfillment. */ - class Fulfillment implements IFulfillment { + /** Represents an AutomatedAgentReply. */ + class AutomatedAgentReply implements IAutomatedAgentReply { /** - * Constructs a new Fulfillment. + * Constructs a new AutomatedAgentReply. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IFulfillment); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply); - /** Fulfillment name. */ - public name: string; + /** AutomatedAgentReply detectIntentResponse. */ + public detectIntentResponse?: (google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null); - /** Fulfillment displayName. */ - public displayName: string; + /** AutomatedAgentReply responseMessages. */ + public responseMessages: google.cloud.dialogflow.v2beta1.IResponseMessage[]; - /** Fulfillment genericWebService. */ - public genericWebService?: (google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null); + /** AutomatedAgentReply intent. */ + public intent?: (string|null); - /** Fulfillment enabled. */ - public enabled: boolean; + /** AutomatedAgentReply event. */ + public event?: (string|null); - /** Fulfillment features. */ - public features: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature[]; + /** AutomatedAgentReply matchConfidence. */ + public matchConfidence: number; - /** Fulfillment fulfillment. */ - public fulfillment?: "genericWebService"; + /** AutomatedAgentReply parameters. */ + public parameters?: (google.protobuf.IStruct|null); + + /** AutomatedAgentReply cxSessionParameters. */ + public cxSessionParameters?: (google.protobuf.IStruct|null); + + /** AutomatedAgentReply automatedAgentReplyType. */ + public automatedAgentReplyType: (google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|keyof typeof google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType); + + /** AutomatedAgentReply allowCancellation. */ + public allowCancellation: boolean; + + /** AutomatedAgentReply response. */ + public response?: "detectIntentResponse"; + + /** AutomatedAgentReply match. */ + public match?: ("intent"|"event"); /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new AutomatedAgentReply instance using the specified properties. * @param [properties] Properties to set - * @returns Fulfillment instance + * @returns AutomatedAgentReply instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IFulfillment): google.cloud.dialogflow.v2beta1.Fulfillment; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified AutomatedAgentReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. + * @param message AutomatedAgentReply message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. - * @param message Fulfillment message or plain object to encode + * Encodes the specified AutomatedAgentReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. + * @param message AutomatedAgentReply message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes an AutomatedAgentReply 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 AutomatedAgentReply * @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.v2beta1.Fulfillment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes an AutomatedAgentReply message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fulfillment + * @returns AutomatedAgentReply * @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.v2beta1.Fulfillment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; /** - * Verifies a Fulfillment message. + * Verifies an AutomatedAgentReply 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 an AutomatedAgentReply message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fulfillment + * @returns AutomatedAgentReply */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Fulfillment; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. - * @param message Fulfillment + * Creates a plain object from an AutomatedAgentReply message. Also converts values to other types if specified. + * @param message AutomatedAgentReply * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AutomatedAgentReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fulfillment to JSON. + * Converts this AutomatedAgentReply to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Fulfillment { - - /** Properties of a GenericWebService. */ - interface IGenericWebService { - - /** GenericWebService uri */ - uri?: (string|null); - - /** GenericWebService username */ - username?: (string|null); - - /** GenericWebService password */ - password?: (string|null); - - /** GenericWebService requestHeaders */ - requestHeaders?: ({ [k: string]: string }|null); + namespace AutomatedAgentReply { - /** GenericWebService isCloudFunction */ - isCloudFunction?: (boolean|null); + /** AutomatedAgentReplyType enum. */ + enum AutomatedAgentReplyType { + AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0, + PARTIAL = 1, + FINAL = 2 } + } - /** Represents a GenericWebService. */ - class GenericWebService implements IGenericWebService { + /** Properties of a SuggestionFeature. */ + interface ISuggestionFeature { - /** - * Constructs a new GenericWebService. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService); + /** SuggestionFeature type */ + type?: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null); + } - /** GenericWebService uri. */ - public uri: string; + /** Represents a SuggestionFeature. */ + class SuggestionFeature implements ISuggestionFeature { - /** GenericWebService username. */ - public username: string; + /** + * Constructs a new SuggestionFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestionFeature); - /** GenericWebService password. */ - public password: string; + /** SuggestionFeature type. */ + public type: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type); - /** GenericWebService requestHeaders. */ - public requestHeaders: { [k: string]: string }; + /** + * Creates a new SuggestionFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionFeature instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestionFeature): google.cloud.dialogflow.v2beta1.SuggestionFeature; - /** GenericWebService isCloudFunction. */ - public isCloudFunction: boolean; - - /** - * Creates a new GenericWebService instance using the specified properties. - * @param [properties] Properties to set - * @returns GenericWebService instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService): google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService; - - /** - * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.GenericWebService, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenericWebService to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Feature. */ - interface IFeature { - - /** Feature type */ - type?: (google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|keyof typeof google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|null); - } - - /** Represents a Feature. */ - class Feature implements IFeature { - - /** - * Constructs a new Feature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature); - - /** Feature type. */ - public type: (google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|keyof typeof google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type); - - /** - * Creates a new Feature instance using the specified properties. - * @param [properties] Properties to set - * @returns Feature instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature): google.cloud.dialogflow.v2beta1.Fulfillment.Feature; - - /** - * Encodes the specified Feature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. - * @param message Feature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. - * @param message Feature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Feature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Feature - * @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.v2beta1.Fulfillment.Feature; - - /** - * Decodes a Feature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Feature - * @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.v2beta1.Fulfillment.Feature; - - /** - * Verifies a Feature 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 Feature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Feature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Fulfillment.Feature; - - /** - * Creates a plain object from a Feature message. Also converts values to other types if specified. - * @param message Feature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Fulfillment.Feature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Feature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Feature { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SMALLTALK = 1 - } - } - } - - /** Properties of a GetFulfillmentRequest. */ - interface IGetFulfillmentRequest { - - /** GetFulfillmentRequest name */ - name?: (string|null); - } - - /** Represents a GetFulfillmentRequest. */ - class GetFulfillmentRequest implements IGetFulfillmentRequest { - - /** - * Constructs a new GetFulfillmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest); - - /** GetFulfillmentRequest name. */ - public name: string; - - /** - * Creates a new GetFulfillmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetFulfillmentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; - - /** - * Encodes the specified GetFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. - * @param message GetFulfillmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. + * @param message SuggestionFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. - * @param message GetFulfillmentRequest message or plain object to encode + * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. + * @param message SuggestionFeature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFulfillmentRequest message from the specified reader or buffer. + * Decodes a SuggestionFeature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFulfillmentRequest + * @returns SuggestionFeature * @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.v2beta1.GetFulfillmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestionFeature; /** - * Decodes a GetFulfillmentRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFulfillmentRequest + * @returns SuggestionFeature * @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.v2beta1.GetFulfillmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestionFeature; /** - * Verifies a GetFulfillmentRequest message. + * Verifies a SuggestionFeature 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 GetFulfillmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFulfillmentRequest + * @returns SuggestionFeature */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestionFeature; /** - * Creates a plain object from a GetFulfillmentRequest message. Also converts values to other types if specified. - * @param message GetFulfillmentRequest + * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. + * @param message SuggestionFeature * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetFulfillmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestionFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFulfillmentRequest to JSON. + * Converts this SuggestionFeature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateFulfillmentRequest. */ - interface IUpdateFulfillmentRequest { - - /** UpdateFulfillmentRequest fulfillment */ - fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); + namespace SuggestionFeature { - /** UpdateFulfillmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ARTICLE_SUGGESTION = 1, + FAQ = 2, + SMART_REPLY = 3 + } } - /** Represents an UpdateFulfillmentRequest. */ - class UpdateFulfillmentRequest implements IUpdateFulfillmentRequest { - + /** Properties of an AssistQueryParameters. */ + interface IAssistQueryParameters { + + /** AssistQueryParameters documentsMetadataFilters */ + documentsMetadataFilters?: ({ [k: string]: string }|null); + } + + /** Represents an AssistQueryParameters. */ + class AssistQueryParameters implements IAssistQueryParameters { + /** - * Constructs a new UpdateFulfillmentRequest. + * Constructs a new AssistQueryParameters. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest); - - /** UpdateFulfillmentRequest fulfillment. */ - public fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAssistQueryParameters); - /** UpdateFulfillmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** AssistQueryParameters documentsMetadataFilters. */ + public documentsMetadataFilters: { [k: string]: string }; /** - * Creates a new UpdateFulfillmentRequest instance using the specified properties. + * Creates a new AssistQueryParameters instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFulfillmentRequest instance + * @returns AssistQueryParameters instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAssistQueryParameters): google.cloud.dialogflow.v2beta1.AssistQueryParameters; /** - * Encodes the specified UpdateFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. - * @param message UpdateFulfillmentRequest message or plain object to encode + * Encodes the specified AssistQueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. + * @param message AssistQueryParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAssistQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. - * @param message UpdateFulfillmentRequest message or plain object to encode + * Encodes the specified AssistQueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. + * @param message AssistQueryParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAssistQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer. + * Decodes an AssistQueryParameters message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFulfillmentRequest + * @returns AssistQueryParameters * @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.v2beta1.UpdateFulfillmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AssistQueryParameters; /** - * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AssistQueryParameters message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFulfillmentRequest + * @returns AssistQueryParameters * @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.v2beta1.UpdateFulfillmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AssistQueryParameters; /** - * Verifies an UpdateFulfillmentRequest message. + * Verifies an AssistQueryParameters 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 UpdateFulfillmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AssistQueryParameters message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFulfillmentRequest + * @returns AssistQueryParameters */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AssistQueryParameters; /** - * Creates a plain object from an UpdateFulfillmentRequest message. Also converts values to other types if specified. - * @param message UpdateFulfillmentRequest + * Creates a plain object from an AssistQueryParameters message. Also converts values to other types if specified. + * @param message AssistQueryParameters * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AssistQueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFulfillmentRequest to JSON. + * Converts this AssistQueryParameters to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ValidationError. */ - interface IValidationError { + /** Properties of an AnalyzeContentRequest. */ + interface IAnalyzeContentRequest { - /** ValidationError severity */ - severity?: (google.cloud.dialogflow.v2beta1.ValidationError.Severity|keyof typeof google.cloud.dialogflow.v2beta1.ValidationError.Severity|null); + /** AnalyzeContentRequest participant */ + participant?: (string|null); - /** ValidationError entries */ - entries?: (string[]|null); + /** AnalyzeContentRequest textInput */ + textInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** ValidationError errorMessage */ - errorMessage?: (string|null); + /** AnalyzeContentRequest eventInput */ + eventInput?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + + /** AnalyzeContentRequest replyAudioConfig */ + replyAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** AnalyzeContentRequest queryParams */ + queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); + + /** AnalyzeContentRequest assistQueryParams */ + assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + + /** AnalyzeContentRequest messageSendTime */ + messageSendTime?: (google.protobuf.ITimestamp|null); + + /** AnalyzeContentRequest requestId */ + requestId?: (string|null); } - /** Represents a ValidationError. */ - class ValidationError implements IValidationError { + /** Represents an AnalyzeContentRequest. */ + class AnalyzeContentRequest implements IAnalyzeContentRequest { /** - * Constructs a new ValidationError. + * Constructs a new AnalyzeContentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IValidationError); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest); - /** ValidationError severity. */ - public severity: (google.cloud.dialogflow.v2beta1.ValidationError.Severity|keyof typeof google.cloud.dialogflow.v2beta1.ValidationError.Severity); + /** AnalyzeContentRequest participant. */ + public participant: string; - /** ValidationError entries. */ - public entries: string[]; + /** AnalyzeContentRequest textInput. */ + public textInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** ValidationError errorMessage. */ - public errorMessage: string; + /** AnalyzeContentRequest eventInput. */ + public eventInput?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + + /** AnalyzeContentRequest replyAudioConfig. */ + public replyAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** AnalyzeContentRequest queryParams. */ + public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); + + /** AnalyzeContentRequest assistQueryParams. */ + public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + + /** AnalyzeContentRequest messageSendTime. */ + public messageSendTime?: (google.protobuf.ITimestamp|null); + + /** AnalyzeContentRequest requestId. */ + public requestId: string; + + /** AnalyzeContentRequest input. */ + public input?: ("textInput"|"eventInput"); /** - * Creates a new ValidationError instance using the specified properties. + * Creates a new AnalyzeContentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ValidationError instance + * @returns AnalyzeContentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IValidationError): google.cloud.dialogflow.v2beta1.ValidationError; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; /** - * Encodes the specified ValidationError message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. - * @param message ValidationError message or plain object to encode + * Encodes the specified AnalyzeContentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. + * @param message AnalyzeContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IValidationError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidationError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. - * @param message ValidationError message or plain object to encode + * Encodes the specified AnalyzeContentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. + * @param message AnalyzeContentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IValidationError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidationError message from the specified reader or buffer. + * Decodes an AnalyzeContentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidationError + * @returns AnalyzeContentRequest * @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.v2beta1.ValidationError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; /** - * Decodes a ValidationError message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeContentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidationError + * @returns AnalyzeContentRequest * @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.v2beta1.ValidationError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; /** - * Verifies a ValidationError message. + * Verifies an AnalyzeContentRequest 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 ValidationError message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeContentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidationError + * @returns AnalyzeContentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ValidationError; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; /** - * Creates a plain object from a ValidationError message. Also converts values to other types if specified. - * @param message ValidationError + * Creates a plain object from an AnalyzeContentRequest message. Also converts values to other types if specified. + * @param message AnalyzeContentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AnalyzeContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidationError to JSON. + * Converts this AnalyzeContentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ValidationError { - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - INFO = 1, - WARNING = 2, - ERROR = 3, - CRITICAL = 4 - } - } - - /** Properties of a ValidationResult. */ - interface IValidationResult { + /** Properties of a DtmfParameters. */ + interface IDtmfParameters { - /** ValidationResult validationErrors */ - validationErrors?: (google.cloud.dialogflow.v2beta1.IValidationError[]|null); + /** DtmfParameters acceptsDtmfInput */ + acceptsDtmfInput?: (boolean|null); } - /** Represents a ValidationResult. */ - class ValidationResult implements IValidationResult { + /** Represents a DtmfParameters. */ + class DtmfParameters implements IDtmfParameters { /** - * Constructs a new ValidationResult. + * Constructs a new DtmfParameters. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IValidationResult); + constructor(properties?: google.cloud.dialogflow.v2beta1.IDtmfParameters); - /** ValidationResult validationErrors. */ - public validationErrors: google.cloud.dialogflow.v2beta1.IValidationError[]; + /** DtmfParameters acceptsDtmfInput. */ + public acceptsDtmfInput: boolean; /** - * Creates a new ValidationResult instance using the specified properties. + * Creates a new DtmfParameters instance using the specified properties. * @param [properties] Properties to set - * @returns ValidationResult instance + * @returns DtmfParameters instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IValidationResult): google.cloud.dialogflow.v2beta1.ValidationResult; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDtmfParameters): google.cloud.dialogflow.v2beta1.DtmfParameters; /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode + * Encodes the specified DtmfParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. + * @param message DtmfParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDtmfParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode + * Encodes the specified DtmfParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. + * @param message DtmfParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDtmfParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidationResult message from the specified reader or buffer. + * Decodes a DtmfParameters message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidationResult + * @returns DtmfParameters * @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.v2beta1.ValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DtmfParameters; /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * Decodes a DtmfParameters message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidationResult + * @returns DtmfParameters * @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.v2beta1.ValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DtmfParameters; /** - * Verifies a ValidationResult message. + * Verifies a DtmfParameters 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 ValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a DtmfParameters message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidationResult + * @returns DtmfParameters */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DtmfParameters; /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @param message ValidationResult + * Creates a plain object from a DtmfParameters message. Also converts values to other types if specified. + * @param message DtmfParameters * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DtmfParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidationResult to JSON. + * Converts this DtmfParameters to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an AnswerRecords */ - class AnswerRecords extends $protobuf.rpc.Service { - - /** - * Constructs a new AnswerRecords 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); + /** Properties of an AnalyzeContentResponse. */ + interface IAnalyzeContentResponse { - /** - * Creates new AnswerRecords 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): AnswerRecords; + /** AnalyzeContentResponse replyText */ + replyText?: (string|null); - /** - * Calls GetAnswerRecord. - * @param request GetAnswerRecordRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AnswerRecord - */ - public getAnswerRecord(request: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecordCallback): void; + /** AnalyzeContentResponse replyAudio */ + replyAudio?: (google.cloud.dialogflow.v2beta1.IOutputAudio|null); - /** - * Calls GetAnswerRecord. - * @param request GetAnswerRecordRequest message or plain object - * @returns Promise - */ - public getAnswerRecord(request: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest): Promise; + /** AnalyzeContentResponse automatedAgentReply */ + automatedAgentReply?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null); - /** - * Calls ListAnswerRecords. - * @param request ListAnswerRecordsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAnswerRecordsResponse - */ - public listAnswerRecords(request: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecordsCallback): void; + /** AnalyzeContentResponse message */ + message?: (google.cloud.dialogflow.v2beta1.IMessage|null); - /** - * Calls ListAnswerRecords. - * @param request ListAnswerRecordsRequest message or plain object - * @returns Promise - */ - public listAnswerRecords(request: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest): Promise; + /** AnalyzeContentResponse humanAgentSuggestionResults */ + humanAgentSuggestionResults?: (google.cloud.dialogflow.v2beta1.ISuggestionResult[]|null); - /** - * Calls UpdateAnswerRecord. - * @param request UpdateAnswerRecordRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AnswerRecord - */ - public updateAnswerRecord(request: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, callback: google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecordCallback): void; + /** AnalyzeContentResponse endUserSuggestionResults */ + endUserSuggestionResults?: (google.cloud.dialogflow.v2beta1.ISuggestionResult[]|null); - /** - * Calls UpdateAnswerRecord. - * @param request UpdateAnswerRecordRequest message or plain object - * @returns Promise - */ - public updateAnswerRecord(request: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest): Promise; + /** AnalyzeContentResponse dtmfParameters */ + dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); } - namespace AnswerRecords { - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#getAnswerRecord}. - * @param error Error, if any - * @param [response] AnswerRecord - */ - type GetAnswerRecordCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnswerRecord) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#listAnswerRecords}. - * @param error Error, if any - * @param [response] ListAnswerRecordsResponse - */ - type ListAnswerRecordsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse) => void; + /** Represents an AnalyzeContentResponse. */ + class AnalyzeContentResponse implements IAnalyzeContentResponse { /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#updateAnswerRecord}. - * @param error Error, if any - * @param [response] AnswerRecord + * Constructs a new AnalyzeContentResponse. + * @param [properties] Properties to set */ - type UpdateAnswerRecordCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnswerRecord) => void; - } - - /** Properties of an AnswerRecord. */ - interface IAnswerRecord { - - /** AnswerRecord name */ - name?: (string|null); - - /** AnswerRecord answerFeedback */ - answerFeedback?: (google.cloud.dialogflow.v2beta1.IAnswerFeedback|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse); - /** AnswerRecord agentAssistantRecord */ - agentAssistantRecord?: (google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null); - } + /** AnalyzeContentResponse replyText. */ + public replyText: string; - /** Represents an AnswerRecord. */ - class AnswerRecord implements IAnswerRecord { + /** AnalyzeContentResponse replyAudio. */ + public replyAudio?: (google.cloud.dialogflow.v2beta1.IOutputAudio|null); - /** - * Constructs a new AnswerRecord. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAnswerRecord); + /** AnalyzeContentResponse automatedAgentReply. */ + public automatedAgentReply?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null); - /** AnswerRecord name. */ - public name: string; + /** AnalyzeContentResponse message. */ + public message?: (google.cloud.dialogflow.v2beta1.IMessage|null); - /** AnswerRecord answerFeedback. */ - public answerFeedback?: (google.cloud.dialogflow.v2beta1.IAnswerFeedback|null); + /** AnalyzeContentResponse humanAgentSuggestionResults. */ + public humanAgentSuggestionResults: google.cloud.dialogflow.v2beta1.ISuggestionResult[]; - /** AnswerRecord agentAssistantRecord. */ - public agentAssistantRecord?: (google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null); + /** AnalyzeContentResponse endUserSuggestionResults. */ + public endUserSuggestionResults: google.cloud.dialogflow.v2beta1.ISuggestionResult[]; - /** AnswerRecord record. */ - public record?: "agentAssistantRecord"; + /** AnalyzeContentResponse dtmfParameters. */ + public dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); /** - * Creates a new AnswerRecord instance using the specified properties. + * Creates a new AnalyzeContentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AnswerRecord instance + * @returns AnalyzeContentResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAnswerRecord): google.cloud.dialogflow.v2beta1.AnswerRecord; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; /** - * Encodes the specified AnswerRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. - * @param message AnswerRecord message or plain object to encode + * Encodes the specified AnalyzeContentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. + * @param message AnalyzeContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAnswerRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnswerRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. - * @param message AnswerRecord message or plain object to encode + * Encodes the specified AnalyzeContentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. + * @param message AnalyzeContentResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnswerRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnswerRecord message from the specified reader or buffer. + * Decodes an AnalyzeContentResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnswerRecord + * @returns AnalyzeContentResponse * @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.v2beta1.AnswerRecord; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; /** - * Decodes an AnswerRecord message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeContentResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnswerRecord + * @returns AnalyzeContentResponse * @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.v2beta1.AnswerRecord; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; /** - * Verifies an AnswerRecord message. + * Verifies an AnalyzeContentResponse 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 AnswerRecord message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeContentResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnswerRecord + * @returns AnalyzeContentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnswerRecord; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; /** - * Creates a plain object from an AnswerRecord message. Also converts values to other types if specified. - * @param message AnswerRecord + * Creates a plain object from an AnalyzeContentResponse message. Also converts values to other types if specified. + * @param message AnalyzeContentResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AnswerRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AnalyzeContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnswerRecord to JSON. + * Converts this AnalyzeContentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AgentAssistantRecord. */ - interface IAgentAssistantRecord { + /** Properties of an AnnotatedMessagePart. */ + interface IAnnotatedMessagePart { - /** AgentAssistantRecord articleSuggestionAnswer */ - articleSuggestionAnswer?: (google.cloud.dialogflow.v2beta1.IArticleAnswer|null); + /** AnnotatedMessagePart text */ + text?: (string|null); - /** AgentAssistantRecord faqAnswer */ - faqAnswer?: (google.cloud.dialogflow.v2beta1.IFaqAnswer|null); + /** AnnotatedMessagePart entityType */ + entityType?: (string|null); + + /** AnnotatedMessagePart formattedValue */ + formattedValue?: (google.protobuf.IValue|null); } - /** Represents an AgentAssistantRecord. */ - class AgentAssistantRecord implements IAgentAssistantRecord { + /** Represents an AnnotatedMessagePart. */ + class AnnotatedMessagePart implements IAnnotatedMessagePart { /** - * Constructs a new AgentAssistantRecord. + * Constructs a new AnnotatedMessagePart. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord); + constructor(properties?: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart); - /** AgentAssistantRecord articleSuggestionAnswer. */ - public articleSuggestionAnswer?: (google.cloud.dialogflow.v2beta1.IArticleAnswer|null); + /** AnnotatedMessagePart text. */ + public text: string; - /** AgentAssistantRecord faqAnswer. */ - public faqAnswer?: (google.cloud.dialogflow.v2beta1.IFaqAnswer|null); + /** AnnotatedMessagePart entityType. */ + public entityType: string; - /** AgentAssistantRecord answer. */ - public answer?: ("articleSuggestionAnswer"|"faqAnswer"); + /** AnnotatedMessagePart formattedValue. */ + public formattedValue?: (google.protobuf.IValue|null); /** - * Creates a new AgentAssistantRecord instance using the specified properties. + * Creates a new AnnotatedMessagePart instance using the specified properties. * @param [properties] Properties to set - * @returns AgentAssistantRecord instance + * @returns AnnotatedMessagePart instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; + public static create(properties?: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; /** - * Encodes the specified AgentAssistantRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. - * @param message AgentAssistantRecord message or plain object to encode + * Encodes the specified AnnotatedMessagePart message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. + * @param message AnnotatedMessagePart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AgentAssistantRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. - * @param message AgentAssistantRecord message or plain object to encode + * Encodes the specified AnnotatedMessagePart message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. + * @param message AnnotatedMessagePart message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAgentAssistantRecord, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AgentAssistantRecord message from the specified reader or buffer. + * Decodes an AnnotatedMessagePart message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AgentAssistantRecord + * @returns AnnotatedMessagePart * @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.v2beta1.AgentAssistantRecord; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; /** - * Decodes an AgentAssistantRecord message from the specified reader or buffer, length delimited. + * Decodes an AnnotatedMessagePart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AgentAssistantRecord + * @returns AnnotatedMessagePart * @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.v2beta1.AgentAssistantRecord; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; /** - * Verifies an AgentAssistantRecord message. + * Verifies an AnnotatedMessagePart 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 AgentAssistantRecord message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotatedMessagePart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AgentAssistantRecord + * @returns AnnotatedMessagePart */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantRecord; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; /** - * Creates a plain object from an AgentAssistantRecord message. Also converts values to other types if specified. - * @param message AgentAssistantRecord + * Creates a plain object from an AnnotatedMessagePart message. Also converts values to other types if specified. + * @param message AnnotatedMessagePart * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantRecord, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.AnnotatedMessagePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AgentAssistantRecord to JSON. + * Converts this AnnotatedMessagePart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnswerFeedback. */ - interface IAnswerFeedback { - - /** AnswerFeedback correctnessLevel */ - correctnessLevel?: (google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|null); - - /** AnswerFeedback agentAssistantDetailFeedback */ - agentAssistantDetailFeedback?: (google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null); - - /** AnswerFeedback clicked */ - clicked?: (boolean|null); - - /** AnswerFeedback clickTime */ - clickTime?: (google.protobuf.ITimestamp|null); + /** Properties of a MessageAnnotation. */ + interface IMessageAnnotation { - /** AnswerFeedback displayed */ - displayed?: (boolean|null); + /** MessageAnnotation parts */ + parts?: (google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart[]|null); - /** AnswerFeedback displayTime */ - displayTime?: (google.protobuf.ITimestamp|null); + /** MessageAnnotation containEntities */ + containEntities?: (boolean|null); } - /** Represents an AnswerFeedback. */ - class AnswerFeedback implements IAnswerFeedback { + /** Represents a MessageAnnotation. */ + class MessageAnnotation implements IMessageAnnotation { /** - * Constructs a new AnswerFeedback. + * Constructs a new MessageAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAnswerFeedback); - - /** AnswerFeedback correctnessLevel. */ - public correctnessLevel: (google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel); - - /** AnswerFeedback agentAssistantDetailFeedback. */ - public agentAssistantDetailFeedback?: (google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null); - - /** AnswerFeedback clicked. */ - public clicked: boolean; - - /** AnswerFeedback clickTime. */ - public clickTime?: (google.protobuf.ITimestamp|null); - - /** AnswerFeedback displayed. */ - public displayed: boolean; + constructor(properties?: google.cloud.dialogflow.v2beta1.IMessageAnnotation); - /** AnswerFeedback displayTime. */ - public displayTime?: (google.protobuf.ITimestamp|null); + /** MessageAnnotation parts. */ + public parts: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart[]; - /** AnswerFeedback detailFeedback. */ - public detailFeedback?: "agentAssistantDetailFeedback"; + /** MessageAnnotation containEntities. */ + public containEntities: boolean; /** - * Creates a new AnswerFeedback instance using the specified properties. + * Creates a new MessageAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns AnswerFeedback instance + * @returns MessageAnnotation instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAnswerFeedback): google.cloud.dialogflow.v2beta1.AnswerFeedback; + public static create(properties?: google.cloud.dialogflow.v2beta1.IMessageAnnotation): google.cloud.dialogflow.v2beta1.MessageAnnotation; /** - * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. - * @param message AnswerFeedback message or plain object to encode + * Encodes the specified MessageAnnotation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. + * @param message MessageAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IMessageAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. - * @param message AnswerFeedback message or plain object to encode + * Encodes the specified MessageAnnotation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. + * @param message MessageAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IMessageAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnswerFeedback message from the specified reader or buffer. + * Decodes a MessageAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnswerFeedback + * @returns MessageAnnotation * @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.v2beta1.AnswerFeedback; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.MessageAnnotation; /** - * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * Decodes a MessageAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnswerFeedback + * @returns MessageAnnotation * @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.v2beta1.AnswerFeedback; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.MessageAnnotation; /** - * Verifies an AnswerFeedback message. + * Verifies a MessageAnnotation 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 AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnswerFeedback + * @returns MessageAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnswerFeedback; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.MessageAnnotation; /** - * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. - * @param message AnswerFeedback + * Creates a plain object from a MessageAnnotation message. Also converts values to other types if specified. + * @param message MessageAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.MessageAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnswerFeedback to JSON. + * Converts this MessageAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AnswerFeedback { - - /** CorrectnessLevel enum. */ - enum CorrectnessLevel { - CORRECTNESS_LEVEL_UNSPECIFIED = 0, - NOT_CORRECT = 1, - PARTIALLY_CORRECT = 2, - FULLY_CORRECT = 3 - } - } + /** Properties of an ArticleAnswer. */ + interface IArticleAnswer { - /** Properties of an AgentAssistantFeedback. */ - interface IAgentAssistantFeedback { + /** ArticleAnswer title */ + title?: (string|null); - /** AgentAssistantFeedback answerRelevance */ - answerRelevance?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|null); + /** ArticleAnswer uri */ + uri?: (string|null); - /** AgentAssistantFeedback documentCorrectness */ - documentCorrectness?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|null); + /** ArticleAnswer snippets */ + snippets?: (string[]|null); - /** AgentAssistantFeedback documentEfficiency */ - documentEfficiency?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|null); + /** ArticleAnswer metadata */ + metadata?: ({ [k: string]: string }|null); - /** AgentAssistantFeedback summarizationFeedback */ - summarizationFeedback?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null); + /** ArticleAnswer answerRecord */ + answerRecord?: (string|null); } - /** Represents an AgentAssistantFeedback. */ - class AgentAssistantFeedback implements IAgentAssistantFeedback { + /** Represents an ArticleAnswer. */ + class ArticleAnswer implements IArticleAnswer { /** - * Constructs a new AgentAssistantFeedback. + * Constructs a new ArticleAnswer. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback); + constructor(properties?: google.cloud.dialogflow.v2beta1.IArticleAnswer); - /** AgentAssistantFeedback answerRelevance. */ - public answerRelevance: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance); + /** ArticleAnswer title. */ + public title: string; - /** AgentAssistantFeedback documentCorrectness. */ - public documentCorrectness: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness); + /** ArticleAnswer uri. */ + public uri: string; - /** AgentAssistantFeedback documentEfficiency. */ - public documentEfficiency: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|keyof typeof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency); + /** ArticleAnswer snippets. */ + public snippets: string[]; - /** AgentAssistantFeedback summarizationFeedback. */ - public summarizationFeedback?: (google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null); + /** ArticleAnswer metadata. */ + public metadata: { [k: string]: string }; + + /** ArticleAnswer answerRecord. */ + public answerRecord: string; /** - * Creates a new AgentAssistantFeedback instance using the specified properties. + * Creates a new ArticleAnswer instance using the specified properties. * @param [properties] Properties to set - * @returns AgentAssistantFeedback instance + * @returns ArticleAnswer instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; + public static create(properties?: google.cloud.dialogflow.v2beta1.IArticleAnswer): google.cloud.dialogflow.v2beta1.ArticleAnswer; /** - * Encodes the specified AgentAssistantFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. - * @param message AgentAssistantFeedback message or plain object to encode + * Encodes the specified ArticleAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * @param message ArticleAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IArticleAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AgentAssistantFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. - * @param message AgentAssistantFeedback message or plain object to encode + * Encodes the specified ArticleAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * @param message ArticleAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IArticleAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AgentAssistantFeedback message from the specified reader or buffer. + * Decodes an ArticleAnswer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AgentAssistantFeedback + * @returns ArticleAnswer * @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.v2beta1.AgentAssistantFeedback; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ArticleAnswer; /** - * Decodes an AgentAssistantFeedback message from the specified reader or buffer, length delimited. + * Decodes an ArticleAnswer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AgentAssistantFeedback + * @returns ArticleAnswer * @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.v2beta1.AgentAssistantFeedback; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ArticleAnswer; /** - * Verifies an AgentAssistantFeedback message. + * Verifies an ArticleAnswer 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 AgentAssistantFeedback message from a plain object. Also converts values to their respective internal types. + * Creates an ArticleAnswer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AgentAssistantFeedback + * @returns ArticleAnswer */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ArticleAnswer; /** - * Creates a plain object from an AgentAssistantFeedback message. Also converts values to other types if specified. - * @param message AgentAssistantFeedback + * Creates a plain object from an ArticleAnswer message. Also converts values to other types if specified. + * @param message ArticleAnswer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ArticleAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AgentAssistantFeedback to JSON. + * Converts this ArticleAnswer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AgentAssistantFeedback { - - /** AnswerRelevance enum. */ - enum AnswerRelevance { - ANSWER_RELEVANCE_UNSPECIFIED = 0, - IRRELEVANT = 1, - RELEVANT = 2 - } + /** Properties of a FaqAnswer. */ + interface IFaqAnswer { - /** DocumentCorrectness enum. */ - enum DocumentCorrectness { - DOCUMENT_CORRECTNESS_UNSPECIFIED = 0, - INCORRECT = 1, - CORRECT = 2 - } + /** FaqAnswer answer */ + answer?: (string|null); - /** DocumentEfficiency enum. */ - enum DocumentEfficiency { - DOCUMENT_EFFICIENCY_UNSPECIFIED = 0, - INEFFICIENT = 1, - EFFICIENT = 2 - } + /** FaqAnswer confidence */ + confidence?: (number|null); - /** Properties of a SummarizationFeedback. */ - interface ISummarizationFeedback { + /** FaqAnswer question */ + question?: (string|null); - /** SummarizationFeedback startTimestamp */ - startTimestamp?: (google.protobuf.ITimestamp|null); + /** FaqAnswer source */ + source?: (string|null); - /** SummarizationFeedback submitTimestamp */ - submitTimestamp?: (google.protobuf.ITimestamp|null); + /** FaqAnswer metadata */ + metadata?: ({ [k: string]: string }|null); - /** SummarizationFeedback summaryText */ - summaryText?: (string|null); - } - - /** Represents a SummarizationFeedback. */ - class SummarizationFeedback implements ISummarizationFeedback { - - /** - * Constructs a new SummarizationFeedback. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback); - - /** SummarizationFeedback startTimestamp. */ - public startTimestamp?: (google.protobuf.ITimestamp|null); - - /** SummarizationFeedback submitTimestamp. */ - public submitTimestamp?: (google.protobuf.ITimestamp|null); - - /** SummarizationFeedback summaryText. */ - public summaryText: string; - - /** - * Creates a new SummarizationFeedback instance using the specified properties. - * @param [properties] Properties to set - * @returns SummarizationFeedback instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback; - - /** - * Encodes the specified SummarizationFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. - * @param message SummarizationFeedback message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SummarizationFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. - * @param message SummarizationFeedback message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SummarizationFeedback message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SummarizationFeedback - * @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.v2beta1.AgentAssistantFeedback.SummarizationFeedback; - - /** - * Decodes a SummarizationFeedback message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SummarizationFeedback - * @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.v2beta1.AgentAssistantFeedback.SummarizationFeedback; - - /** - * Verifies a SummarizationFeedback 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); + /** FaqAnswer answerRecord */ + answerRecord?: (string|null); + } - /** - * Creates a SummarizationFeedback message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SummarizationFeedback - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback; + /** Represents a FaqAnswer. */ + class FaqAnswer implements IFaqAnswer { - /** - * Creates a plain object from a SummarizationFeedback message. Also converts values to other types if specified. - * @param message SummarizationFeedback - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FaqAnswer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IFaqAnswer); - /** - * Converts this SummarizationFeedback to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FaqAnswer answer. */ + public answer: string; - /** Properties of a GetAnswerRecordRequest. */ - interface IGetAnswerRecordRequest { + /** FaqAnswer confidence. */ + public confidence: number; - /** GetAnswerRecordRequest name */ - name?: (string|null); - } + /** FaqAnswer question. */ + public question: string; - /** Represents a GetAnswerRecordRequest. */ - class GetAnswerRecordRequest implements IGetAnswerRecordRequest { + /** FaqAnswer source. */ + public source: string; - /** - * Constructs a new GetAnswerRecordRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest); + /** FaqAnswer metadata. */ + public metadata: { [k: string]: string }; - /** GetAnswerRecordRequest name. */ - public name: string; + /** FaqAnswer answerRecord. */ + public answerRecord: string; /** - * Creates a new GetAnswerRecordRequest instance using the specified properties. + * Creates a new FaqAnswer instance using the specified properties. * @param [properties] Properties to set - * @returns GetAnswerRecordRequest instance + * @returns FaqAnswer instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IFaqAnswer): google.cloud.dialogflow.v2beta1.FaqAnswer; /** - * Encodes the specified GetAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. - * @param message GetAnswerRecordRequest message or plain object to encode + * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. + * @param message FaqAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. - * @param message GetAnswerRecordRequest message or plain object to encode + * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. + * @param message FaqAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetAnswerRecordRequest message from the specified reader or buffer. + * Decodes a FaqAnswer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetAnswerRecordRequest + * @returns FaqAnswer * @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.v2beta1.GetAnswerRecordRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.FaqAnswer; /** - * Decodes a GetAnswerRecordRequest message from the specified reader or buffer, length delimited. + * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetAnswerRecordRequest + * @returns FaqAnswer * @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.v2beta1.GetAnswerRecordRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.FaqAnswer; /** - * Verifies a GetAnswerRecordRequest message. + * Verifies a FaqAnswer 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 GetAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FaqAnswer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetAnswerRecordRequest + * @returns FaqAnswer */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.FaqAnswer; /** - * Creates a plain object from a GetAnswerRecordRequest message. Also converts values to other types if specified. - * @param message GetAnswerRecordRequest + * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. + * @param message FaqAnswer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.FaqAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAnswerRecordRequest to JSON. + * Converts this FaqAnswer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAnswerRecordsRequest. */ - interface IListAnswerRecordsRequest { + /** Properties of a SmartReplyAnswer. */ + interface ISmartReplyAnswer { - /** ListAnswerRecordsRequest parent */ - parent?: (string|null); + /** SmartReplyAnswer reply */ + reply?: (string|null); - /** ListAnswerRecordsRequest pageSize */ - pageSize?: (number|null); + /** SmartReplyAnswer confidence */ + confidence?: (number|null); - /** ListAnswerRecordsRequest pageToken */ - pageToken?: (string|null); + /** SmartReplyAnswer answerRecord */ + answerRecord?: (string|null); } - /** Represents a ListAnswerRecordsRequest. */ - class ListAnswerRecordsRequest implements IListAnswerRecordsRequest { + /** Represents a SmartReplyAnswer. */ + class SmartReplyAnswer implements ISmartReplyAnswer { /** - * Constructs a new ListAnswerRecordsRequest. + * Constructs a new SmartReplyAnswer. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer); - /** ListAnswerRecordsRequest parent. */ - public parent: string; + /** SmartReplyAnswer reply. */ + public reply: string; - /** ListAnswerRecordsRequest pageSize. */ - public pageSize: number; + /** SmartReplyAnswer confidence. */ + public confidence: number; - /** ListAnswerRecordsRequest pageToken. */ - public pageToken: string; + /** SmartReplyAnswer answerRecord. */ + public answerRecord: string; /** - * Creates a new ListAnswerRecordsRequest instance using the specified properties. + * Creates a new SmartReplyAnswer instance using the specified properties. * @param [properties] Properties to set - * @returns ListAnswerRecordsRequest instance + * @returns SmartReplyAnswer instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; /** - * Encodes the specified ListAnswerRecordsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. - * @param message ListAnswerRecordsRequest message or plain object to encode + * Encodes the specified SmartReplyAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. + * @param message SmartReplyAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAnswerRecordsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. - * @param message ListAnswerRecordsRequest message or plain object to encode + * Encodes the specified SmartReplyAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. + * @param message SmartReplyAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer. + * Decodes a SmartReplyAnswer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAnswerRecordsRequest + * @returns SmartReplyAnswer * @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.v2beta1.ListAnswerRecordsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; /** - * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyAnswer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAnswerRecordsRequest + * @returns SmartReplyAnswer * @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.v2beta1.ListAnswerRecordsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; /** - * Verifies a ListAnswerRecordsRequest message. + * Verifies a SmartReplyAnswer 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 ListAnswerRecordsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyAnswer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAnswerRecordsRequest + * @returns SmartReplyAnswer */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; /** - * Creates a plain object from a ListAnswerRecordsRequest message. Also converts values to other types if specified. - * @param message ListAnswerRecordsRequest + * Creates a plain object from a SmartReplyAnswer message. Also converts values to other types if specified. + * @param message SmartReplyAnswer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SmartReplyAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAnswerRecordsRequest to JSON. + * Converts this SmartReplyAnswer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListAnswerRecordsResponse. */ - interface IListAnswerRecordsResponse { - - /** ListAnswerRecordsResponse answerRecords */ - answerRecords?: (google.cloud.dialogflow.v2beta1.IAnswerRecord[]|null); + /** Properties of a SuggestionResult. */ + interface ISuggestionResult { - /** ListAnswerRecordsResponse nextPageToken */ - nextPageToken?: (string|null); + /** SuggestionResult error */ + error?: (google.rpc.IStatus|null); + + /** SuggestionResult suggestArticlesResponse */ + suggestArticlesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null); + + /** SuggestionResult suggestFaqAnswersResponse */ + suggestFaqAnswersResponse?: (google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null); + + /** SuggestionResult suggestSmartRepliesResponse */ + suggestSmartRepliesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null); } - /** Represents a ListAnswerRecordsResponse. */ - class ListAnswerRecordsResponse implements IListAnswerRecordsResponse { + /** Represents a SuggestionResult. */ + class SuggestionResult implements ISuggestionResult { /** - * Constructs a new ListAnswerRecordsResponse. + * Constructs a new SuggestionResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestionResult); - /** ListAnswerRecordsResponse answerRecords. */ - public answerRecords: google.cloud.dialogflow.v2beta1.IAnswerRecord[]; + /** SuggestionResult error. */ + public error?: (google.rpc.IStatus|null); - /** ListAnswerRecordsResponse nextPageToken. */ - public nextPageToken: string; + /** SuggestionResult suggestArticlesResponse. */ + public suggestArticlesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null); + + /** SuggestionResult suggestFaqAnswersResponse. */ + public suggestFaqAnswersResponse?: (google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null); + + /** SuggestionResult suggestSmartRepliesResponse. */ + public suggestSmartRepliesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null); + + /** SuggestionResult suggestionResponse. */ + public suggestionResponse?: ("error"|"suggestArticlesResponse"|"suggestFaqAnswersResponse"|"suggestSmartRepliesResponse"); /** - * Creates a new ListAnswerRecordsResponse instance using the specified properties. + * Creates a new SuggestionResult instance using the specified properties. * @param [properties] Properties to set - * @returns ListAnswerRecordsResponse instance + * @returns SuggestionResult instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestionResult): google.cloud.dialogflow.v2beta1.SuggestionResult; /** - * Encodes the specified ListAnswerRecordsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. - * @param message ListAnswerRecordsResponse message or plain object to encode + * Encodes the specified SuggestionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. + * @param message SuggestionResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAnswerRecordsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. - * @param message ListAnswerRecordsResponse message or plain object to encode + * Encodes the specified SuggestionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. + * @param message SuggestionResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer. + * Decodes a SuggestionResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAnswerRecordsResponse + * @returns SuggestionResult * @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.v2beta1.ListAnswerRecordsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestionResult; /** - * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer, length delimited. + * Decodes a SuggestionResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAnswerRecordsResponse + * @returns SuggestionResult * @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.v2beta1.ListAnswerRecordsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestionResult; /** - * Verifies a ListAnswerRecordsResponse message. + * Verifies a SuggestionResult 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 ListAnswerRecordsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAnswerRecordsResponse + * @returns SuggestionResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestionResult; /** - * Creates a plain object from a ListAnswerRecordsResponse message. Also converts values to other types if specified. - * @param message ListAnswerRecordsResponse + * Creates a plain object from a SuggestionResult message. Also converts values to other types if specified. + * @param message SuggestionResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAnswerRecordsResponse to JSON. + * Converts this SuggestionResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateAnswerRecordRequest. */ - interface IUpdateAnswerRecordRequest { + /** Properties of a SuggestArticlesRequest. */ + interface ISuggestArticlesRequest { - /** UpdateAnswerRecordRequest answerRecord */ - answerRecord?: (google.cloud.dialogflow.v2beta1.IAnswerRecord|null); + /** SuggestArticlesRequest parent */ + parent?: (string|null); - /** UpdateAnswerRecordRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** SuggestArticlesRequest latestMessage */ + latestMessage?: (string|null); + + /** SuggestArticlesRequest contextSize */ + contextSize?: (number|null); + + /** SuggestArticlesRequest assistQueryParams */ + assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); } - /** Represents an UpdateAnswerRecordRequest. */ - class UpdateAnswerRecordRequest implements IUpdateAnswerRecordRequest { + /** Represents a SuggestArticlesRequest. */ + class SuggestArticlesRequest implements ISuggestArticlesRequest { /** - * Constructs a new UpdateAnswerRecordRequest. + * Constructs a new SuggestArticlesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest); - /** UpdateAnswerRecordRequest answerRecord. */ - public answerRecord?: (google.cloud.dialogflow.v2beta1.IAnswerRecord|null); + /** SuggestArticlesRequest parent. */ + public parent: string; - /** UpdateAnswerRecordRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SuggestArticlesRequest latestMessage. */ + public latestMessage: string; + + /** SuggestArticlesRequest contextSize. */ + public contextSize: number; + + /** SuggestArticlesRequest assistQueryParams. */ + public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); /** - * Creates a new UpdateAnswerRecordRequest instance using the specified properties. + * Creates a new SuggestArticlesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateAnswerRecordRequest instance + * @returns SuggestArticlesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; /** - * Encodes the specified UpdateAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. - * @param message UpdateAnswerRecordRequest message or plain object to encode + * Encodes the specified SuggestArticlesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * @param message SuggestArticlesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. - * @param message UpdateAnswerRecordRequest message or plain object to encode + * Encodes the specified SuggestArticlesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * @param message SuggestArticlesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer. + * Decodes a SuggestArticlesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateAnswerRecordRequest + * @returns SuggestArticlesRequest * @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.v2beta1.UpdateAnswerRecordRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; /** - * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestArticlesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateAnswerRecordRequest + * @returns SuggestArticlesRequest * @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.v2beta1.UpdateAnswerRecordRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; /** - * Verifies an UpdateAnswerRecordRequest message. + * Verifies a SuggestArticlesRequest 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 UpdateAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestArticlesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateAnswerRecordRequest + * @returns SuggestArticlesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; /** - * Creates a plain object from an UpdateAnswerRecordRequest message. Also converts values to other types if specified. - * @param message UpdateAnswerRecordRequest + * Creates a plain object from a SuggestArticlesRequest message. Also converts values to other types if specified. + * @param message SuggestArticlesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestArticlesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateAnswerRecordRequest to JSON. + * Converts this SuggestArticlesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Participants */ - class Participants extends $protobuf.rpc.Service { + /** Properties of a SuggestArticlesResponse. */ + interface ISuggestArticlesResponse { - /** - * Constructs a new Participants 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); + /** SuggestArticlesResponse articleAnswers */ + articleAnswers?: (google.cloud.dialogflow.v2beta1.IArticleAnswer[]|null); - /** - * Creates new Participants 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): Participants; + /** SuggestArticlesResponse latestMessage */ + latestMessage?: (string|null); - /** - * Calls CreateParticipant. - * @param request CreateParticipantRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Participant - */ - public createParticipant(request: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.CreateParticipantCallback): void; + /** SuggestArticlesResponse contextSize */ + contextSize?: (number|null); + } - /** - * Calls CreateParticipant. - * @param request CreateParticipantRequest message or plain object - * @returns Promise - */ - public createParticipant(request: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest): Promise; + /** Represents a SuggestArticlesResponse. */ + class SuggestArticlesResponse implements ISuggestArticlesResponse { /** - * Calls GetParticipant. - * @param request GetParticipantRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Participant + * Constructs a new SuggestArticlesResponse. + * @param [properties] Properties to set */ - public getParticipant(request: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.GetParticipantCallback): void; + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse); + + /** SuggestArticlesResponse articleAnswers. */ + public articleAnswers: google.cloud.dialogflow.v2beta1.IArticleAnswer[]; + + /** SuggestArticlesResponse latestMessage. */ + public latestMessage: string; + + /** SuggestArticlesResponse contextSize. */ + public contextSize: number; /** - * Calls GetParticipant. - * @param request GetParticipantRequest message or plain object - * @returns Promise + * Creates a new SuggestArticlesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestArticlesResponse instance */ - public getParticipant(request: google.cloud.dialogflow.v2beta1.IGetParticipantRequest): Promise; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; /** - * Calls ListParticipants. - * @param request ListParticipantsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListParticipantsResponse + * Encodes the specified SuggestArticlesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * @param message SuggestArticlesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listParticipants(request: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, callback: google.cloud.dialogflow.v2beta1.Participants.ListParticipantsCallback): void; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListParticipants. - * @param request ListParticipantsRequest message or plain object - * @returns Promise + * Encodes the specified SuggestArticlesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * @param message SuggestArticlesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listParticipants(request: google.cloud.dialogflow.v2beta1.IListParticipantsRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateParticipant. - * @param request UpdateParticipantRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Participant + * Decodes a SuggestArticlesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestArticlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateParticipant(request: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, callback: google.cloud.dialogflow.v2beta1.Participants.UpdateParticipantCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; /** - * Calls UpdateParticipant. - * @param request UpdateParticipantRequest message or plain object - * @returns Promise + * Decodes a SuggestArticlesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestArticlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateParticipant(request: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; /** - * Calls AnalyzeContent. - * @param request AnalyzeContentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AnalyzeContentResponse + * Verifies a SuggestArticlesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public analyzeContent(request: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, callback: google.cloud.dialogflow.v2beta1.Participants.AnalyzeContentCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls AnalyzeContent. - * @param request AnalyzeContentRequest message or plain object - * @returns Promise + * Creates a SuggestArticlesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestArticlesResponse */ - public analyzeContent(request: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; /** - * Calls SuggestArticles. - * @param request SuggestArticlesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SuggestArticlesResponse + * Creates a plain object from a SuggestArticlesResponse message. Also converts values to other types if specified. + * @param message SuggestArticlesResponse + * @param [options] Conversion options + * @returns Plain object */ - public suggestArticles(request: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestArticlesCallback): void; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestArticlesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls SuggestArticles. - * @param request SuggestArticlesRequest message or plain object - * @returns Promise + * Converts this SuggestArticlesResponse to JSON. + * @returns JSON object */ - public suggestArticles(request: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls SuggestFaqAnswers. - * @param request SuggestFaqAnswersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SuggestFaqAnswersResponse - */ - public suggestFaqAnswers(request: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswersCallback): void; + /** Properties of a SuggestFaqAnswersRequest. */ + interface ISuggestFaqAnswersRequest { - /** - * Calls SuggestFaqAnswers. - * @param request SuggestFaqAnswersRequest message or plain object - * @returns Promise - */ - public suggestFaqAnswers(request: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest): Promise; + /** SuggestFaqAnswersRequest parent */ + parent?: (string|null); - /** - * Calls SuggestSmartReplies. - * @param request SuggestSmartRepliesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SuggestSmartRepliesResponse - */ - public suggestSmartReplies(request: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest, callback: google.cloud.dialogflow.v2beta1.Participants.SuggestSmartRepliesCallback): void; + /** SuggestFaqAnswersRequest latestMessage */ + latestMessage?: (string|null); - /** - * Calls SuggestSmartReplies. - * @param request SuggestSmartRepliesRequest message or plain object - * @returns Promise - */ - public suggestSmartReplies(request: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest): Promise; + /** SuggestFaqAnswersRequest contextSize */ + contextSize?: (number|null); - /** - * Calls ListSuggestions. - * @param request ListSuggestionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSuggestionsResponse - */ - public listSuggestions(request: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest, callback: google.cloud.dialogflow.v2beta1.Participants.ListSuggestionsCallback): void; + /** SuggestFaqAnswersRequest assistQueryParams */ + assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + } - /** - * Calls ListSuggestions. - * @param request ListSuggestionsRequest message or plain object - * @returns Promise - */ - public listSuggestions(request: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest): Promise; + /** Represents a SuggestFaqAnswersRequest. */ + class SuggestFaqAnswersRequest implements ISuggestFaqAnswersRequest { /** - * Calls CompileSuggestion. - * @param request CompileSuggestionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and CompileSuggestionResponse + * Constructs a new SuggestFaqAnswersRequest. + * @param [properties] Properties to set */ - public compileSuggestion(request: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest, callback: google.cloud.dialogflow.v2beta1.Participants.CompileSuggestionCallback): void; + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest); - /** - * Calls CompileSuggestion. - * @param request CompileSuggestionRequest message or plain object - * @returns Promise - */ - public compileSuggestion(request: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest): Promise; - } + /** SuggestFaqAnswersRequest parent. */ + public parent: string; - namespace Participants { + /** SuggestFaqAnswersRequest latestMessage. */ + public latestMessage: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#createParticipant}. - * @param error Error, if any - * @param [response] Participant - */ - type CreateParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; + /** SuggestFaqAnswersRequest contextSize. */ + public contextSize: number; + + /** SuggestFaqAnswersRequest assistQueryParams. */ + public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#getParticipant}. - * @param error Error, if any - * @param [response] Participant + * Creates a new SuggestFaqAnswersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestFaqAnswersRequest instance */ - type GetParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listParticipants}. - * @param error Error, if any - * @param [response] ListParticipantsResponse + * Encodes the specified SuggestFaqAnswersRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. + * @param message SuggestFaqAnswersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListParticipantsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListParticipantsResponse) => void; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#updateParticipant}. - * @param error Error, if any - * @param [response] Participant + * Encodes the specified SuggestFaqAnswersRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. + * @param message SuggestFaqAnswersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateParticipantCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Participant) => void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#analyzeContent}. - * @param error Error, if any - * @param [response] AnalyzeContentResponse + * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestFaqAnswersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type AnalyzeContentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.AnalyzeContentResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestArticles}. - * @param error Error, if any - * @param [response] SuggestArticlesResponse + * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestFaqAnswersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type SuggestArticlesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestArticlesResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestFaqAnswers}. - * @param error Error, if any - * @param [response] SuggestFaqAnswersResponse + * Verifies a SuggestFaqAnswersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type SuggestFaqAnswersCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestSmartReplies}. - * @param error Error, if any - * @param [response] SuggestSmartRepliesResponse + * Creates a SuggestFaqAnswersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestFaqAnswersRequest */ - type SuggestSmartRepliesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listSuggestions}. - * @param error Error, if any - * @param [response] ListSuggestionsResponse + * Creates a plain object from a SuggestFaqAnswersRequest message. Also converts values to other types if specified. + * @param message SuggestFaqAnswersRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListSuggestionsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListSuggestionsResponse) => void; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#compileSuggestion}. - * @param error Error, if any - * @param [response] CompileSuggestionResponse + * Converts this SuggestFaqAnswersRequest to JSON. + * @returns JSON object */ - type CompileSuggestionCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.CompileSuggestionResponse) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a Participant. */ - interface IParticipant { - - /** Participant name */ - name?: (string|null); + /** Properties of a SuggestFaqAnswersResponse. */ + interface ISuggestFaqAnswersResponse { - /** Participant role */ - role?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); + /** SuggestFaqAnswersResponse faqAnswers */ + faqAnswers?: (google.cloud.dialogflow.v2beta1.IFaqAnswer[]|null); - /** Participant obfuscatedExternalUserId */ - obfuscatedExternalUserId?: (string|null); + /** SuggestFaqAnswersResponse latestMessage */ + latestMessage?: (string|null); - /** Participant documentsMetadataFilters */ - documentsMetadataFilters?: ({ [k: string]: string }|null); + /** SuggestFaqAnswersResponse contextSize */ + contextSize?: (number|null); } - /** Represents a Participant. */ - class Participant implements IParticipant { + /** Represents a SuggestFaqAnswersResponse. */ + class SuggestFaqAnswersResponse implements ISuggestFaqAnswersResponse { /** - * Constructs a new Participant. + * Constructs a new SuggestFaqAnswersResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IParticipant); - - /** Participant name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse); - /** Participant role. */ - public role: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); + /** SuggestFaqAnswersResponse faqAnswers. */ + public faqAnswers: google.cloud.dialogflow.v2beta1.IFaqAnswer[]; - /** Participant obfuscatedExternalUserId. */ - public obfuscatedExternalUserId: string; + /** SuggestFaqAnswersResponse latestMessage. */ + public latestMessage: string; - /** Participant documentsMetadataFilters. */ - public documentsMetadataFilters: { [k: string]: string }; + /** SuggestFaqAnswersResponse contextSize. */ + public contextSize: number; /** - * Creates a new Participant instance using the specified properties. + * Creates a new SuggestFaqAnswersResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Participant instance + * @returns SuggestFaqAnswersResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IParticipant): google.cloud.dialogflow.v2beta1.Participant; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; /** - * Encodes the specified Participant message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. - * @param message Participant message or plain object to encode + * Encodes the specified SuggestFaqAnswersResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. + * @param message SuggestFaqAnswersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Participant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. - * @param message Participant message or plain object to encode + * Encodes the specified SuggestFaqAnswersResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. + * @param message SuggestFaqAnswersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Participant message from the specified reader or buffer. + * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Participant + * @returns SuggestFaqAnswersResponse * @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.v2beta1.Participant; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; /** - * Decodes a Participant message from the specified reader or buffer, length delimited. + * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Participant + * @returns SuggestFaqAnswersResponse * @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.v2beta1.Participant; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; /** - * Verifies a Participant message. + * Verifies a SuggestFaqAnswersResponse 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 Participant message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestFaqAnswersResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Participant + * @returns SuggestFaqAnswersResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Participant; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; /** - * Creates a plain object from a Participant message. Also converts values to other types if specified. - * @param message Participant + * Creates a plain object from a SuggestFaqAnswersResponse message. Also converts values to other types if specified. + * @param message SuggestFaqAnswersResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Participant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Participant to JSON. + * Converts this SuggestFaqAnswersResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Participant { - - /** Role enum. */ - enum Role { - ROLE_UNSPECIFIED = 0, - HUMAN_AGENT = 1, - AUTOMATED_AGENT = 2, - END_USER = 3 - } - } - - /** Properties of a Message. */ - interface IMessage { - - /** Message name */ - name?: (string|null); - - /** Message content */ - content?: (string|null); - - /** Message languageCode */ - languageCode?: (string|null); - - /** Message participant */ - participant?: (string|null); - - /** Message participantRole */ - participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); + /** Properties of a SuggestSmartRepliesRequest. */ + interface ISuggestSmartRepliesRequest { - /** Message createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** SuggestSmartRepliesRequest parent */ + parent?: (string|null); - /** Message sendTime */ - sendTime?: (google.protobuf.ITimestamp|null); + /** SuggestSmartRepliesRequest currentTextInput */ + currentTextInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** Message messageAnnotation */ - messageAnnotation?: (google.cloud.dialogflow.v2beta1.IMessageAnnotation|null); + /** SuggestSmartRepliesRequest latestMessage */ + latestMessage?: (string|null); - /** Message sentimentAnalysis */ - sentimentAnalysis?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + /** SuggestSmartRepliesRequest contextSize */ + contextSize?: (number|null); } - /** Represents a Message. */ - class Message implements IMessage { + /** Represents a SuggestSmartRepliesRequest. */ + class SuggestSmartRepliesRequest implements ISuggestSmartRepliesRequest { /** - * Constructs a new Message. + * Constructs a new SuggestSmartRepliesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IMessage); - - /** Message name. */ - public name: string; - - /** Message content. */ - public content: string; - - /** Message languageCode. */ - public languageCode: string; - - /** Message participant. */ - public participant: string; - - /** Message participantRole. */ - public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest); - /** Message createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** SuggestSmartRepliesRequest parent. */ + public parent: string; - /** Message sendTime. */ - public sendTime?: (google.protobuf.ITimestamp|null); + /** SuggestSmartRepliesRequest currentTextInput. */ + public currentTextInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** Message messageAnnotation. */ - public messageAnnotation?: (google.cloud.dialogflow.v2beta1.IMessageAnnotation|null); + /** SuggestSmartRepliesRequest latestMessage. */ + public latestMessage: string; - /** Message sentimentAnalysis. */ - public sentimentAnalysis?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + /** SuggestSmartRepliesRequest contextSize. */ + public contextSize: number; /** - * Creates a new Message instance using the specified properties. + * Creates a new SuggestSmartRepliesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Message instance + * @returns SuggestSmartRepliesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IMessage): google.cloud.dialogflow.v2beta1.Message; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; /** - * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. - * @param message Message message or plain object to encode + * Encodes the specified SuggestSmartRepliesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. + * @param message SuggestSmartRepliesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. - * @param message Message message or plain object to encode + * Encodes the specified SuggestSmartRepliesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. + * @param message SuggestSmartRepliesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Message message from the specified reader or buffer. + * Decodes a SuggestSmartRepliesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Message + * @returns SuggestSmartRepliesRequest * @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.v2beta1.Message; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; /** - * Decodes a Message message from the specified reader or buffer, length delimited. + * Decodes a SuggestSmartRepliesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Message + * @returns SuggestSmartRepliesRequest * @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.v2beta1.Message; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; /** - * Verifies a Message message. + * Verifies a SuggestSmartRepliesRequest 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 Message message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestSmartRepliesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Message + * @returns SuggestSmartRepliesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Message; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; /** - * Creates a plain object from a Message message. Also converts values to other types if specified. - * @param message Message + * Creates a plain object from a SuggestSmartRepliesRequest message. Also converts values to other types if specified. + * @param message SuggestSmartRepliesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Message to JSON. + * Converts this SuggestSmartRepliesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateParticipantRequest. */ - interface ICreateParticipantRequest { + /** Properties of a SuggestSmartRepliesResponse. */ + interface ISuggestSmartRepliesResponse { - /** CreateParticipantRequest parent */ - parent?: (string|null); + /** SuggestSmartRepliesResponse smartReplyAnswers */ + smartReplyAnswers?: (google.cloud.dialogflow.v2beta1.ISmartReplyAnswer[]|null); - /** CreateParticipantRequest participant */ - participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + /** SuggestSmartRepliesResponse latestMessage */ + latestMessage?: (string|null); + + /** SuggestSmartRepliesResponse contextSize */ + contextSize?: (number|null); } - /** Represents a CreateParticipantRequest. */ - class CreateParticipantRequest implements ICreateParticipantRequest { + /** Represents a SuggestSmartRepliesResponse. */ + class SuggestSmartRepliesResponse implements ISuggestSmartRepliesResponse { /** - * Constructs a new CreateParticipantRequest. + * Constructs a new SuggestSmartRepliesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse); - /** CreateParticipantRequest parent. */ - public parent: string; + /** SuggestSmartRepliesResponse smartReplyAnswers. */ + public smartReplyAnswers: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer[]; - /** CreateParticipantRequest participant. */ - public participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + /** SuggestSmartRepliesResponse latestMessage. */ + public latestMessage: string; + + /** SuggestSmartRepliesResponse contextSize. */ + public contextSize: number; /** - * Creates a new CreateParticipantRequest instance using the specified properties. + * Creates a new SuggestSmartRepliesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateParticipantRequest instance + * @returns SuggestSmartRepliesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; /** - * Encodes the specified CreateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. - * @param message CreateParticipantRequest message or plain object to encode + * Encodes the specified SuggestSmartRepliesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. + * @param message SuggestSmartRepliesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. - * @param message CreateParticipantRequest message or plain object to encode + * Encodes the specified SuggestSmartRepliesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. + * @param message SuggestSmartRepliesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateParticipantRequest message from the specified reader or buffer. + * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateParticipantRequest + * @returns SuggestSmartRepliesResponse * @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.v2beta1.CreateParticipantRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; /** - * Decodes a CreateParticipantRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateParticipantRequest + * @returns SuggestSmartRepliesResponse * @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.v2beta1.CreateParticipantRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; /** - * Verifies a CreateParticipantRequest message. + * Verifies a SuggestSmartRepliesResponse 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 CreateParticipantRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestSmartRepliesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateParticipantRequest + * @returns SuggestSmartRepliesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateParticipantRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; /** - * Creates a plain object from a CreateParticipantRequest message. Also converts values to other types if specified. - * @param message CreateParticipantRequest + * Creates a plain object from a SuggestSmartRepliesResponse message. Also converts values to other types if specified. + * @param message SuggestSmartRepliesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateParticipantRequest to JSON. + * Converts this SuggestSmartRepliesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetParticipantRequest. */ - interface IGetParticipantRequest { + /** Properties of a Suggestion. */ + interface ISuggestion { - /** GetParticipantRequest name */ + /** Suggestion name */ name?: (string|null); + + /** Suggestion articles */ + articles?: (google.cloud.dialogflow.v2beta1.Suggestion.IArticle[]|null); + + /** Suggestion faqAnswers */ + faqAnswers?: (google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer[]|null); + + /** Suggestion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Suggestion latestMessage */ + latestMessage?: (string|null); } - /** Represents a GetParticipantRequest. */ - class GetParticipantRequest implements IGetParticipantRequest { + /** Represents a Suggestion. */ + class Suggestion implements ISuggestion { /** - * Constructs a new GetParticipantRequest. + * Constructs a new Suggestion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetParticipantRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestion); - /** GetParticipantRequest name. */ + /** Suggestion name. */ public name: string; + /** Suggestion articles. */ + public articles: google.cloud.dialogflow.v2beta1.Suggestion.IArticle[]; + + /** Suggestion faqAnswers. */ + public faqAnswers: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer[]; + + /** Suggestion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Suggestion latestMessage. */ + public latestMessage: string; + /** - * Creates a new GetParticipantRequest instance using the specified properties. + * Creates a new Suggestion instance using the specified properties. * @param [properties] Properties to set - * @returns GetParticipantRequest instance + * @returns Suggestion instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetParticipantRequest): google.cloud.dialogflow.v2beta1.GetParticipantRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestion): google.cloud.dialogflow.v2beta1.Suggestion; /** - * Encodes the specified GetParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. - * @param message GetParticipantRequest message or plain object to encode + * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. - * @param message GetParticipantRequest message or plain object to encode + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetParticipantRequest message from the specified reader or buffer. + * Decodes a Suggestion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetParticipantRequest + * @returns Suggestion * @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.v2beta1.GetParticipantRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Suggestion; /** - * Decodes a GetParticipantRequest message from the specified reader or buffer, length delimited. + * Decodes a Suggestion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetParticipantRequest + * @returns Suggestion * @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.v2beta1.GetParticipantRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Suggestion; /** - * Verifies a GetParticipantRequest message. + * Verifies a Suggestion 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 GetParticipantRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetParticipantRequest + * @returns Suggestion */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetParticipantRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion; /** - * Creates a plain object from a GetParticipantRequest message. Also converts values to other types if specified. - * @param message GetParticipantRequest + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @param message Suggestion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetParticipantRequest to JSON. + * Converts this Suggestion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListParticipantsRequest. */ - interface IListParticipantsRequest { + namespace Suggestion { - /** ListParticipantsRequest parent */ - parent?: (string|null); + /** Properties of an Article. */ + interface IArticle { - /** ListParticipantsRequest pageSize */ - pageSize?: (number|null); + /** Article title */ + title?: (string|null); - /** ListParticipantsRequest pageToken */ - pageToken?: (string|null); - } + /** Article uri */ + uri?: (string|null); - /** Represents a ListParticipantsRequest. */ - class ListParticipantsRequest implements IListParticipantsRequest { + /** Article snippets */ + snippets?: (string[]|null); - /** - * Constructs a new ListParticipantsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsRequest); + /** Article metadata */ + metadata?: ({ [k: string]: string }|null); - /** ListParticipantsRequest parent. */ - public parent: string; + /** Article answerRecord */ + answerRecord?: (string|null); + } - /** ListParticipantsRequest pageSize. */ - public pageSize: number; + /** Represents an Article. */ + class Article implements IArticle { - /** ListParticipantsRequest pageToken. */ - public pageToken: string; + /** + * Constructs a new Article. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IArticle); - /** - * Creates a new ListParticipantsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListParticipantsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsRequest): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; + /** Article title. */ + public title: string; - /** - * Encodes the specified ListParticipantsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. - * @param message ListParticipantsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Article uri. */ + public uri: string; - /** - * Encodes the specified ListParticipantsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. - * @param message ListParticipantsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListParticipantsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Article snippets. */ + public snippets: string[]; - /** - * Decodes a ListParticipantsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListParticipantsRequest - * @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.v2beta1.ListParticipantsRequest; + /** Article metadata. */ + public metadata: { [k: string]: string }; - /** - * Decodes a ListParticipantsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListParticipantsRequest - * @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.v2beta1.ListParticipantsRequest; + /** Article answerRecord. */ + public answerRecord: string; - /** - * Verifies a ListParticipantsRequest 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 Article instance using the specified properties. + * @param [properties] Properties to set + * @returns Article instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IArticle): google.cloud.dialogflow.v2beta1.Suggestion.Article; - /** - * Creates a ListParticipantsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListParticipantsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListParticipantsRequest; + /** + * Encodes the specified Article message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. + * @param message Article message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Suggestion.IArticle, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ListParticipantsRequest message. Also converts values to other types if specified. - * @param message ListParticipantsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListParticipantsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Article message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. + * @param message Article message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Suggestion.IArticle, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ListParticipantsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes an Article message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Article + * @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.v2beta1.Suggestion.Article; - /** Properties of a ListParticipantsResponse. */ - interface IListParticipantsResponse { + /** + * Decodes an Article message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Article + * @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.v2beta1.Suggestion.Article; - /** ListParticipantsResponse participants */ - participants?: (google.cloud.dialogflow.v2beta1.IParticipant[]|null); + /** + * Verifies an Article 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); - /** ListParticipantsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Creates an Article message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Article + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion.Article; - /** Represents a ListParticipantsResponse. */ - class ListParticipantsResponse implements IListParticipantsResponse { + /** + * Creates a plain object from an Article message. Also converts values to other types if specified. + * @param message Article + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Suggestion.Article, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Article to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FaqAnswer. */ + interface IFaqAnswer { + + /** FaqAnswer answer */ + answer?: (string|null); + + /** FaqAnswer confidence */ + confidence?: (number|null); + + /** FaqAnswer question */ + question?: (string|null); + + /** FaqAnswer source */ + source?: (string|null); + + /** FaqAnswer metadata */ + metadata?: ({ [k: string]: string }|null); + + /** FaqAnswer answerRecord */ + answerRecord?: (string|null); + } + + /** Represents a FaqAnswer. */ + class FaqAnswer implements IFaqAnswer { + + /** + * Constructs a new FaqAnswer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer); + + /** FaqAnswer answer. */ + public answer: string; + + /** FaqAnswer confidence. */ + public confidence: number; + + /** FaqAnswer question. */ + public question: string; + + /** FaqAnswer source. */ + public source: string; + + /** FaqAnswer metadata. */ + public metadata: { [k: string]: string }; + + /** FaqAnswer answerRecord. */ + public answerRecord: string; + + /** + * Creates a new FaqAnswer instance using the specified properties. + * @param [properties] Properties to set + * @returns FaqAnswer instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer): google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer; + + /** + * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. + * @param message FaqAnswer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. + * @param message FaqAnswer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FaqAnswer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FaqAnswer + * @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.v2beta1.Suggestion.FaqAnswer; + + /** + * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FaqAnswer + * @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.v2beta1.Suggestion.FaqAnswer; + + /** + * Verifies a FaqAnswer 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 FaqAnswer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FaqAnswer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer; + + /** + * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. + * @param message FaqAnswer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FaqAnswer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ListSuggestionsRequest. */ + interface IListSuggestionsRequest { + + /** ListSuggestionsRequest parent */ + parent?: (string|null); + + /** ListSuggestionsRequest pageSize */ + pageSize?: (number|null); + + /** ListSuggestionsRequest pageToken */ + pageToken?: (string|null); + + /** ListSuggestionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListSuggestionsRequest. */ + class ListSuggestionsRequest implements IListSuggestionsRequest { /** - * Constructs a new ListParticipantsResponse. + * Constructs a new ListSuggestionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest); - /** ListParticipantsResponse participants. */ - public participants: google.cloud.dialogflow.v2beta1.IParticipant[]; + /** ListSuggestionsRequest parent. */ + public parent: string; - /** ListParticipantsResponse nextPageToken. */ - public nextPageToken: string; + /** ListSuggestionsRequest pageSize. */ + public pageSize: number; + + /** ListSuggestionsRequest pageToken. */ + public pageToken: string; + + /** ListSuggestionsRequest filter. */ + public filter: string; /** - * Creates a new ListParticipantsResponse instance using the specified properties. + * Creates a new ListSuggestionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListParticipantsResponse instance + * @returns ListSuggestionsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListParticipantsResponse): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; /** - * Encodes the specified ListParticipantsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. - * @param message ListParticipantsResponse message or plain object to encode + * Encodes the specified ListSuggestionsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * @param message ListSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListParticipantsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListParticipantsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. - * @param message ListParticipantsResponse message or plain object to encode + * Encodes the specified ListSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * @param message ListSuggestionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListParticipantsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListParticipantsResponse message from the specified reader or buffer. + * Decodes a ListSuggestionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListParticipantsResponse + * @returns ListSuggestionsRequest * @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.v2beta1.ListParticipantsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; /** - * Decodes a ListParticipantsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSuggestionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListParticipantsResponse + * @returns ListSuggestionsRequest * @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.v2beta1.ListParticipantsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; /** - * Verifies a ListParticipantsResponse message. + * Verifies a ListSuggestionsRequest 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 ListParticipantsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListParticipantsResponse + * @returns ListSuggestionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListParticipantsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; /** - * Creates a plain object from a ListParticipantsResponse message. Also converts values to other types if specified. - * @param message ListParticipantsResponse + * Creates a plain object from a ListSuggestionsRequest message. Also converts values to other types if specified. + * @param message ListSuggestionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListParticipantsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListParticipantsResponse to JSON. + * Converts this ListSuggestionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateParticipantRequest. */ - interface IUpdateParticipantRequest { + /** Properties of a ListSuggestionsResponse. */ + interface IListSuggestionsResponse { - /** UpdateParticipantRequest participant */ - participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + /** ListSuggestionsResponse suggestions */ + suggestions?: (google.cloud.dialogflow.v2beta1.ISuggestion[]|null); - /** UpdateParticipantRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListSuggestionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateParticipantRequest. */ - class UpdateParticipantRequest implements IUpdateParticipantRequest { + /** Represents a ListSuggestionsResponse. */ + class ListSuggestionsResponse implements IListSuggestionsResponse { /** - * Constructs a new UpdateParticipantRequest. + * Constructs a new ListSuggestionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse); - /** UpdateParticipantRequest participant. */ - public participant?: (google.cloud.dialogflow.v2beta1.IParticipant|null); + /** ListSuggestionsResponse suggestions. */ + public suggestions: google.cloud.dialogflow.v2beta1.ISuggestion[]; - /** UpdateParticipantRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListSuggestionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateParticipantRequest instance using the specified properties. + * Creates a new ListSuggestionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateParticipantRequest instance + * @returns ListSuggestionsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; /** - * Encodes the specified UpdateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. - * @param message UpdateParticipantRequest message or plain object to encode + * Encodes the specified ListSuggestionsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. + * @param message ListSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. - * @param message UpdateParticipantRequest message or plain object to encode + * Encodes the specified ListSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. + * @param message ListSuggestionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateParticipantRequest message from the specified reader or buffer. + * Decodes a ListSuggestionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateParticipantRequest + * @returns ListSuggestionsResponse * @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.v2beta1.UpdateParticipantRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; /** - * Decodes an UpdateParticipantRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSuggestionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateParticipantRequest + * @returns ListSuggestionsResponse * @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.v2beta1.UpdateParticipantRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; /** - * Verifies an UpdateParticipantRequest message. + * Verifies a ListSuggestionsResponse 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 UpdateParticipantRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateParticipantRequest + * @returns ListSuggestionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateParticipantRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; /** - * Creates a plain object from an UpdateParticipantRequest message. Also converts values to other types if specified. - * @param message UpdateParticipantRequest + * Creates a plain object from a ListSuggestionsResponse message. Also converts values to other types if specified. + * @param message ListSuggestionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateParticipantRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateParticipantRequest to JSON. + * Converts this ListSuggestionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OutputAudio. */ - interface IOutputAudio { + /** Properties of a CompileSuggestionRequest. */ + interface ICompileSuggestionRequest { - /** OutputAudio config */ - config?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** CompileSuggestionRequest parent */ + parent?: (string|null); - /** OutputAudio audio */ - audio?: (Uint8Array|string|null); + /** CompileSuggestionRequest latestMessage */ + latestMessage?: (string|null); + + /** CompileSuggestionRequest contextSize */ + contextSize?: (number|null); } - /** Represents an OutputAudio. */ - class OutputAudio implements IOutputAudio { + /** Represents a CompileSuggestionRequest. */ + class CompileSuggestionRequest implements ICompileSuggestionRequest { /** - * Constructs a new OutputAudio. + * Constructs a new CompileSuggestionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IOutputAudio); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest); - /** OutputAudio config. */ - public config?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** CompileSuggestionRequest parent. */ + public parent: string; - /** OutputAudio audio. */ - public audio: (Uint8Array|string); + /** CompileSuggestionRequest latestMessage. */ + public latestMessage: string; + + /** CompileSuggestionRequest contextSize. */ + public contextSize: number; /** - * Creates a new OutputAudio instance using the specified properties. + * Creates a new CompileSuggestionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OutputAudio instance + * @returns CompileSuggestionRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IOutputAudio): google.cloud.dialogflow.v2beta1.OutputAudio; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; /** - * Encodes the specified OutputAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. - * @param message OutputAudio message or plain object to encode + * Encodes the specified CompileSuggestionRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. + * @param message CompileSuggestionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IOutputAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OutputAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. - * @param message OutputAudio message or plain object to encode + * Encodes the specified CompileSuggestionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. + * @param message CompileSuggestionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IOutputAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OutputAudio message from the specified reader or buffer. + * Decodes a CompileSuggestionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OutputAudio + * @returns CompileSuggestionRequest * @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.v2beta1.OutputAudio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; /** - * Decodes an OutputAudio message from the specified reader or buffer, length delimited. + * Decodes a CompileSuggestionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OutputAudio + * @returns CompileSuggestionRequest * @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.v2beta1.OutputAudio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; /** - * Verifies an OutputAudio message. + * Verifies a CompileSuggestionRequest 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 OutputAudio message from a plain object. Also converts values to their respective internal types. + * Creates a CompileSuggestionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OutputAudio + * @returns CompileSuggestionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.OutputAudio; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; /** - * Creates a plain object from an OutputAudio message. Also converts values to other types if specified. - * @param message OutputAudio + * Creates a plain object from a CompileSuggestionRequest message. Also converts values to other types if specified. + * @param message CompileSuggestionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.OutputAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CompileSuggestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OutputAudio to JSON. + * Converts this CompileSuggestionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AutomatedAgentReply. */ - interface IAutomatedAgentReply { - - /** AutomatedAgentReply detectIntentResponse */ - detectIntentResponse?: (google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null); - - /** AutomatedAgentReply responseMessages */ - responseMessages?: (google.cloud.dialogflow.v2beta1.IResponseMessage[]|null); - - /** AutomatedAgentReply intent */ - intent?: (string|null); - - /** AutomatedAgentReply event */ - event?: (string|null); - - /** AutomatedAgentReply matchConfidence */ - matchConfidence?: (number|null); - - /** AutomatedAgentReply parameters */ - parameters?: (google.protobuf.IStruct|null); + /** Properties of a CompileSuggestionResponse. */ + interface ICompileSuggestionResponse { - /** AutomatedAgentReply cxSessionParameters */ - cxSessionParameters?: (google.protobuf.IStruct|null); + /** CompileSuggestionResponse suggestion */ + suggestion?: (google.cloud.dialogflow.v2beta1.ISuggestion|null); - /** AutomatedAgentReply automatedAgentReplyType */ - automatedAgentReplyType?: (google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|keyof typeof google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|null); + /** CompileSuggestionResponse latestMessage */ + latestMessage?: (string|null); - /** AutomatedAgentReply allowCancellation */ - allowCancellation?: (boolean|null); + /** CompileSuggestionResponse contextSize */ + contextSize?: (number|null); } - /** Represents an AutomatedAgentReply. */ - class AutomatedAgentReply implements IAutomatedAgentReply { + /** Represents a CompileSuggestionResponse. */ + class CompileSuggestionResponse implements ICompileSuggestionResponse { /** - * Constructs a new AutomatedAgentReply. + * Constructs a new CompileSuggestionResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply); - - /** AutomatedAgentReply detectIntentResponse. */ - public detectIntentResponse?: (google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null); - - /** AutomatedAgentReply responseMessages. */ - public responseMessages: google.cloud.dialogflow.v2beta1.IResponseMessage[]; - - /** AutomatedAgentReply intent. */ - public intent?: (string|null); - - /** AutomatedAgentReply event. */ - public event?: (string|null); - - /** AutomatedAgentReply matchConfidence. */ - public matchConfidence: number; - - /** AutomatedAgentReply parameters. */ - public parameters?: (google.protobuf.IStruct|null); - - /** AutomatedAgentReply cxSessionParameters. */ - public cxSessionParameters?: (google.protobuf.IStruct|null); - - /** AutomatedAgentReply automatedAgentReplyType. */ - public automatedAgentReplyType: (google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|keyof typeof google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse); - /** AutomatedAgentReply allowCancellation. */ - public allowCancellation: boolean; + /** CompileSuggestionResponse suggestion. */ + public suggestion?: (google.cloud.dialogflow.v2beta1.ISuggestion|null); - /** AutomatedAgentReply response. */ - public response?: "detectIntentResponse"; + /** CompileSuggestionResponse latestMessage. */ + public latestMessage: string; - /** AutomatedAgentReply match. */ - public match?: ("intent"|"event"); + /** CompileSuggestionResponse contextSize. */ + public contextSize: number; /** - * Creates a new AutomatedAgentReply instance using the specified properties. + * Creates a new CompileSuggestionResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AutomatedAgentReply instance + * @returns CompileSuggestionResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; /** - * Encodes the specified AutomatedAgentReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. - * @param message AutomatedAgentReply message or plain object to encode + * Encodes the specified CompileSuggestionResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. + * @param message CompileSuggestionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AutomatedAgentReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. - * @param message AutomatedAgentReply message or plain object to encode + * Encodes the specified CompileSuggestionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. + * @param message CompileSuggestionResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AutomatedAgentReply message from the specified reader or buffer. + * Decodes a CompileSuggestionResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AutomatedAgentReply + * @returns CompileSuggestionResponse * @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.v2beta1.AutomatedAgentReply; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; /** - * Decodes an AutomatedAgentReply message from the specified reader or buffer, length delimited. + * Decodes a CompileSuggestionResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AutomatedAgentReply + * @returns CompileSuggestionResponse * @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.v2beta1.AutomatedAgentReply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; /** - * Verifies an AutomatedAgentReply message. + * Verifies a CompileSuggestionResponse 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 AutomatedAgentReply message from a plain object. Also converts values to their respective internal types. + * Creates a CompileSuggestionResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AutomatedAgentReply + * @returns CompileSuggestionResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AutomatedAgentReply; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; /** - * Creates a plain object from an AutomatedAgentReply message. Also converts values to other types if specified. - * @param message AutomatedAgentReply + * Creates a plain object from a CompileSuggestionResponse message. Also converts values to other types if specified. + * @param message CompileSuggestionResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AutomatedAgentReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CompileSuggestionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AutomatedAgentReply to JSON. + * Converts this CompileSuggestionResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace AutomatedAgentReply { + /** Properties of a ResponseMessage. */ + interface IResponseMessage { - /** AutomatedAgentReplyType enum. */ - enum AutomatedAgentReplyType { - AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0, - PARTIAL = 1, - FINAL = 2 - } - } + /** ResponseMessage text */ + text?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null); - /** Properties of a SuggestionFeature. */ - interface ISuggestionFeature { + /** ResponseMessage payload */ + payload?: (google.protobuf.IStruct|null); - /** SuggestionFeature type */ - type?: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null); + /** ResponseMessage liveAgentHandoff */ + liveAgentHandoff?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction */ + endInteraction?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage telephonyTransferCall */ + telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null); } - /** Represents a SuggestionFeature. */ - class SuggestionFeature implements ISuggestionFeature { + /** Represents a ResponseMessage. */ + class ResponseMessage implements IResponseMessage { /** - * Constructs a new SuggestionFeature. + * Constructs a new ResponseMessage. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestionFeature); + constructor(properties?: google.cloud.dialogflow.v2beta1.IResponseMessage); - /** SuggestionFeature type. */ - public type: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type); + /** ResponseMessage text. */ + public text?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null); + + /** ResponseMessage payload. */ + public payload?: (google.protobuf.IStruct|null); + + /** ResponseMessage liveAgentHandoff. */ + public liveAgentHandoff?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null); + + /** ResponseMessage endInteraction. */ + public endInteraction?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null); + + /** ResponseMessage telephonyTransferCall. */ + public telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null); + + /** ResponseMessage message. */ + public message?: ("text"|"payload"|"liveAgentHandoff"|"endInteraction"|"telephonyTransferCall"); /** - * Creates a new SuggestionFeature instance using the specified properties. + * Creates a new ResponseMessage instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionFeature instance + * @returns ResponseMessage instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestionFeature): google.cloud.dialogflow.v2beta1.SuggestionFeature; + public static create(properties?: google.cloud.dialogflow.v2beta1.IResponseMessage): google.cloud.dialogflow.v2beta1.ResponseMessage; /** - * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. - * @param message SuggestionFeature message or plain object to encode + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. - * @param message SuggestionFeature message or plain object to encode + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionFeature message from the specified reader or buffer. + * 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 SuggestionFeature + * @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.v2beta1.SuggestionFeature; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ResponseMessage; /** - * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionFeature + * @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.v2beta1.SuggestionFeature; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ResponseMessage; /** - * Verifies a SuggestionFeature message. + * 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 SuggestionFeature message from a plain object. Also converts values to their respective internal types. + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionFeature + * @returns ResponseMessage */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestionFeature; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ResponseMessage; /** - * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. - * @param message SuggestionFeature + * 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.v2beta1.SuggestionFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionFeature to JSON. + * Converts this ResponseMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SuggestionFeature { + namespace ResponseMessage { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ARTICLE_SUGGESTION = 1, - FAQ = 2, - SMART_REPLY = 3 + /** Properties of a Text. */ + interface IText { + + /** Text text */ + text?: (string[]|null); } - } - /** Properties of an AssistQueryParameters. */ - interface IAssistQueryParameters { + /** Represents a Text. */ + class Text implements IText { - /** AssistQueryParameters documentsMetadataFilters */ - documentsMetadataFilters?: ({ [k: string]: string }|null); - } + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.IText); - /** Represents an AssistQueryParameters. */ - class AssistQueryParameters implements IAssistQueryParameters { + /** Text text. */ + public text: string[]; - /** - * Constructs a new AssistQueryParameters. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAssistQueryParameters); + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.IText): google.cloud.dialogflow.v2beta1.ResponseMessage.Text; - /** AssistQueryParameters documentsMetadataFilters. */ - public documentsMetadataFilters: { [k: string]: string }; + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new AssistQueryParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns AssistQueryParameters instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAssistQueryParameters): google.cloud.dialogflow.v2beta1.AssistQueryParameters; + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified AssistQueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. - * @param message AssistQueryParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAssistQueryParameters, 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.v2beta1.ResponseMessage.Text; - /** - * Encodes the specified AssistQueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. - * @param message AssistQueryParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAssistQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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.v2beta1.ResponseMessage.Text; - /** - * Decodes an AssistQueryParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssistQueryParameters - * @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.v2beta1.AssistQueryParameters; + /** + * 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); - /** - * Decodes an AssistQueryParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssistQueryParameters - * @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.v2beta1.AssistQueryParameters; + /** + * 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.v2beta1.ResponseMessage.Text; - /** - * Verifies an AssistQueryParameters 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 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.v2beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an AssistQueryParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssistQueryParameters - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AssistQueryParameters; + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from an AssistQueryParameters message. Also converts values to other types if specified. - * @param message AssistQueryParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AssistQueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a LiveAgentHandoff. */ + interface ILiveAgentHandoff { - /** - * Converts this AssistQueryParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** LiveAgentHandoff metadata */ + metadata?: (google.protobuf.IStruct|null); + } - /** Properties of an AnalyzeContentRequest. */ - interface IAnalyzeContentRequest { + /** Represents a LiveAgentHandoff. */ + class LiveAgentHandoff implements ILiveAgentHandoff { - /** AnalyzeContentRequest participant */ - participant?: (string|null); - - /** AnalyzeContentRequest textInput */ - textInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); + /** + * Constructs a new LiveAgentHandoff. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff); - /** AnalyzeContentRequest eventInput */ - eventInput?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + /** LiveAgentHandoff metadata. */ + public metadata?: (google.protobuf.IStruct|null); - /** AnalyzeContentRequest replyAudioConfig */ - replyAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|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.v2beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff; - /** AnalyzeContentRequest queryParams */ - queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); + /** + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; - /** AnalyzeContentRequest assistQueryParams */ - assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + /** + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; - /** AnalyzeContentRequest messageSendTime */ - messageSendTime?: (google.protobuf.ITimestamp|null); + /** + * 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.v2beta1.ResponseMessage.LiveAgentHandoff; - /** AnalyzeContentRequest requestId */ - requestId?: (string|null); - } + /** + * 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.v2beta1.ResponseMessage.LiveAgentHandoff; - /** Represents an AnalyzeContentRequest. */ - class AnalyzeContentRequest implements IAnalyzeContentRequest { + /** + * 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); - /** - * Constructs a new AnalyzeContentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest); + /** + * 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.v2beta1.ResponseMessage.LiveAgentHandoff; - /** AnalyzeContentRequest participant. */ - public participant: string; + /** + * 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.v2beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AnalyzeContentRequest textInput. */ - public textInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); + /** + * Converts this LiveAgentHandoff to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** AnalyzeContentRequest eventInput. */ - public eventInput?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + /** Properties of an EndInteraction. */ + interface IEndInteraction { + } - /** AnalyzeContentRequest replyAudioConfig. */ - public replyAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** Represents an EndInteraction. */ + class EndInteraction implements IEndInteraction { - /** AnalyzeContentRequest queryParams. */ - public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); + /** + * Constructs a new EndInteraction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction); - /** AnalyzeContentRequest assistQueryParams. */ - public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|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.v2beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction; - /** AnalyzeContentRequest messageSendTime. */ - public messageSendTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; - /** AnalyzeContentRequest requestId. */ - public requestId: string; + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; - /** AnalyzeContentRequest input. */ - public input?: ("textInput"|"eventInput"); + /** + * 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.v2beta1.ResponseMessage.EndInteraction; - /** - * Creates a new AnalyzeContentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AnalyzeContentRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; + /** + * 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.v2beta1.ResponseMessage.EndInteraction; - /** - * Encodes the specified AnalyzeContentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. - * @param message AnalyzeContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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); - /** - * Encodes the specified AnalyzeContentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. - * @param message AnalyzeContentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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.v2beta1.ResponseMessage.EndInteraction; - /** - * Decodes an AnalyzeContentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnalyzeContentRequest - * @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.v2beta1.AnalyzeContentRequest; + /** + * 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.v2beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an AnalyzeContentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnalyzeContentRequest - * @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.v2beta1.AnalyzeContentRequest; + /** + * Converts this EndInteraction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Verifies an AnalyzeContentRequest 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 TelephonyTransferCall. */ + interface ITelephonyTransferCall { - /** - * Creates an AnalyzeContentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnalyzeContentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnalyzeContentRequest; + /** TelephonyTransferCall phoneNumber */ + phoneNumber?: (string|null); - /** - * Creates a plain object from an AnalyzeContentRequest message. Also converts values to other types if specified. - * @param message AnalyzeContentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AnalyzeContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** TelephonyTransferCall sipUri */ + sipUri?: (string|null); + } - /** - * Converts this AnalyzeContentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a TelephonyTransferCall. */ + class TelephonyTransferCall implements ITelephonyTransferCall { - /** Properties of a DtmfParameters. */ - interface IDtmfParameters { + /** + * Constructs a new TelephonyTransferCall. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall); - /** DtmfParameters acceptsDtmfInput */ - acceptsDtmfInput?: (boolean|null); + /** TelephonyTransferCall phoneNumber. */ + public phoneNumber?: (string|null); + + /** TelephonyTransferCall sipUri. */ + public sipUri?: (string|null); + + /** TelephonyTransferCall endpoint. */ + public endpoint?: ("phoneNumber"|"sipUri"); + + /** + * Creates a new TelephonyTransferCall instance using the specified properties. + * @param [properties] Properties to set + * @returns TelephonyTransferCall instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall): google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall; + + /** + * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @param message TelephonyTransferCall message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @param message TelephonyTransferCall message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelephonyTransferCall + * @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.v2beta1.ResponseMessage.TelephonyTransferCall; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelephonyTransferCall + * @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.v2beta1.ResponseMessage.TelephonyTransferCall; + + /** + * Verifies a TelephonyTransferCall 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 TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelephonyTransferCall + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall; + + /** + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @param message TelephonyTransferCall + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TelephonyTransferCall to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a DtmfParameters. */ - class DtmfParameters implements IDtmfParameters { + /** 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 SpeechContext. */ + interface ISpeechContext { + + /** SpeechContext phrases */ + phrases?: (string[]|null); + + /** SpeechContext boost */ + boost?: (number|null); + } + + /** Represents a SpeechContext. */ + class SpeechContext implements ISpeechContext { /** - * Constructs a new DtmfParameters. + * Constructs a new SpeechContext. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDtmfParameters); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechContext); - /** DtmfParameters acceptsDtmfInput. */ - public acceptsDtmfInput: boolean; + /** SpeechContext phrases. */ + public phrases: string[]; + + /** SpeechContext boost. */ + public boost: number; /** - * Creates a new DtmfParameters instance using the specified properties. + * Creates a new SpeechContext instance using the specified properties. * @param [properties] Properties to set - * @returns DtmfParameters instance + * @returns SpeechContext instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDtmfParameters): google.cloud.dialogflow.v2beta1.DtmfParameters; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechContext): google.cloud.dialogflow.v2beta1.SpeechContext; /** - * Encodes the specified DtmfParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. - * @param message DtmfParameters message or plain object to encode + * Encodes the specified SpeechContext message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. + * @param message SpeechContext message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDtmfParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DtmfParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. - * @param message DtmfParameters message or plain object to encode + * Encodes the specified SpeechContext message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. + * @param message SpeechContext message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDtmfParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DtmfParameters message from the specified reader or buffer. + * Decodes a SpeechContext message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DtmfParameters + * @returns SpeechContext * @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.v2beta1.DtmfParameters; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SpeechContext; /** - * Decodes a DtmfParameters message from the specified reader or buffer, length delimited. + * Decodes a SpeechContext message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DtmfParameters + * @returns SpeechContext * @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.v2beta1.DtmfParameters; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SpeechContext; /** - * Verifies a DtmfParameters message. + * Verifies a SpeechContext 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 DtmfParameters message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechContext message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DtmfParameters + * @returns SpeechContext */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DtmfParameters; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechContext; /** - * Creates a plain object from a DtmfParameters message. Also converts values to other types if specified. - * @param message DtmfParameters + * Creates a plain object from a SpeechContext message. Also converts values to other types if specified. + * @param message SpeechContext * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DtmfParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DtmfParameters to JSON. + * Converts this SpeechContext to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnalyzeContentResponse. */ - interface IAnalyzeContentResponse { - - /** AnalyzeContentResponse replyText */ - replyText?: (string|null); - - /** AnalyzeContentResponse replyAudio */ - replyAudio?: (google.cloud.dialogflow.v2beta1.IOutputAudio|null); + /** SpeechModelVariant enum. */ + enum SpeechModelVariant { + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0, + USE_BEST_AVAILABLE = 1, + USE_STANDARD = 2, + USE_ENHANCED = 3 + } - /** AnalyzeContentResponse automatedAgentReply */ - automatedAgentReply?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null); + /** Properties of a SpeechWordInfo. */ + interface ISpeechWordInfo { - /** AnalyzeContentResponse message */ - message?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** SpeechWordInfo word */ + word?: (string|null); - /** AnalyzeContentResponse humanAgentSuggestionResults */ - humanAgentSuggestionResults?: (google.cloud.dialogflow.v2beta1.ISuggestionResult[]|null); + /** SpeechWordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); - /** AnalyzeContentResponse endUserSuggestionResults */ - endUserSuggestionResults?: (google.cloud.dialogflow.v2beta1.ISuggestionResult[]|null); + /** SpeechWordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); - /** AnalyzeContentResponse dtmfParameters */ - dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); + /** SpeechWordInfo confidence */ + confidence?: (number|null); } - /** Represents an AnalyzeContentResponse. */ - class AnalyzeContentResponse implements IAnalyzeContentResponse { + /** Represents a SpeechWordInfo. */ + class SpeechWordInfo implements ISpeechWordInfo { /** - * Constructs a new AnalyzeContentResponse. + * Constructs a new SpeechWordInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse); - - /** AnalyzeContentResponse replyText. */ - public replyText: string; - - /** AnalyzeContentResponse replyAudio. */ - public replyAudio?: (google.cloud.dialogflow.v2beta1.IOutputAudio|null); - - /** AnalyzeContentResponse automatedAgentReply. */ - public automatedAgentReply?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechWordInfo); - /** AnalyzeContentResponse message. */ - public message?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** SpeechWordInfo word. */ + public word: string; - /** AnalyzeContentResponse humanAgentSuggestionResults. */ - public humanAgentSuggestionResults: google.cloud.dialogflow.v2beta1.ISuggestionResult[]; + /** SpeechWordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); - /** AnalyzeContentResponse endUserSuggestionResults. */ - public endUserSuggestionResults: google.cloud.dialogflow.v2beta1.ISuggestionResult[]; + /** SpeechWordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); - /** AnalyzeContentResponse dtmfParameters. */ - public dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); + /** SpeechWordInfo confidence. */ + public confidence: number; /** - * Creates a new AnalyzeContentResponse instance using the specified properties. + * Creates a new SpeechWordInfo instance using the specified properties. * @param [properties] Properties to set - * @returns AnalyzeContentResponse instance + * @returns SpeechWordInfo instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechWordInfo): google.cloud.dialogflow.v2beta1.SpeechWordInfo; /** - * Encodes the specified AnalyzeContentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. - * @param message AnalyzeContentResponse message or plain object to encode + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnalyzeContentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. - * @param message AnalyzeContentResponse message or plain object to encode + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. + * @param message SpeechWordInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnalyzeContentResponse message from the specified reader or buffer. + * 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 AnalyzeContentResponse + * @returns SpeechWordInfo * @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.v2beta1.AnalyzeContentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SpeechWordInfo; /** - * Decodes an AnalyzeContentResponse message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnalyzeContentResponse + * @returns SpeechWordInfo * @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.v2beta1.AnalyzeContentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SpeechWordInfo; /** - * Verifies an AnalyzeContentResponse message. + * Verifies a SpeechWordInfo 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 AnalyzeContentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnalyzeContentResponse + * @returns SpeechWordInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnalyzeContentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechWordInfo; /** - * Creates a plain object from an AnalyzeContentResponse message. Also converts values to other types if specified. - * @param message AnalyzeContentResponse + * 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 static toObject(message: google.cloud.dialogflow.v2beta1.AnalyzeContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechWordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnalyzeContentResponse to JSON. + * Converts this SpeechWordInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotatedMessagePart. */ - interface IAnnotatedMessagePart { + /** Properties of an InputAudioConfig. */ + interface IInputAudioConfig { - /** AnnotatedMessagePart text */ - text?: (string|null); + /** InputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.v2beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.AudioEncoding|null); - /** AnnotatedMessagePart entityType */ - entityType?: (string|null); + /** InputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); - /** AnnotatedMessagePart formattedValue */ - formattedValue?: (google.protobuf.IValue|null); + /** InputAudioConfig languageCode */ + languageCode?: (string|null); + + /** InputAudioConfig enableWordInfo */ + enableWordInfo?: (boolean|null); + + /** InputAudioConfig phraseHints */ + phraseHints?: (string[]|null); + + /** InputAudioConfig speechContexts */ + speechContexts?: (google.cloud.dialogflow.v2beta1.ISpeechContext[]|null); + + /** InputAudioConfig model */ + model?: (string|null); + + /** InputAudioConfig modelVariant */ + modelVariant?: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant|null); + + /** InputAudioConfig singleUtterance */ + singleUtterance?: (boolean|null); + + /** InputAudioConfig disableNoSpeechRecognizedEvent */ + disableNoSpeechRecognizedEvent?: (boolean|null); } - /** Represents an AnnotatedMessagePart. */ - class AnnotatedMessagePart implements IAnnotatedMessagePart { + /** Represents an InputAudioConfig. */ + class InputAudioConfig implements IInputAudioConfig { /** - * Constructs a new AnnotatedMessagePart. + * Constructs a new InputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart); + constructor(properties?: google.cloud.dialogflow.v2beta1.IInputAudioConfig); - /** AnnotatedMessagePart text. */ - public text: string; + /** InputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.v2beta1.AudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.AudioEncoding); - /** AnnotatedMessagePart entityType. */ - public entityType: string; + /** InputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; - /** AnnotatedMessagePart formattedValue. */ - public formattedValue?: (google.protobuf.IValue|null); + /** InputAudioConfig languageCode. */ + public languageCode: string; + + /** InputAudioConfig enableWordInfo. */ + public enableWordInfo: boolean; + + /** InputAudioConfig phraseHints. */ + public phraseHints: string[]; + + /** InputAudioConfig speechContexts. */ + public speechContexts: google.cloud.dialogflow.v2beta1.ISpeechContext[]; + + /** InputAudioConfig model. */ + public model: string; + + /** InputAudioConfig modelVariant. */ + public modelVariant: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant); + + /** InputAudioConfig singleUtterance. */ + public singleUtterance: boolean; + + /** InputAudioConfig disableNoSpeechRecognizedEvent. */ + public disableNoSpeechRecognizedEvent: boolean; /** - * Creates a new AnnotatedMessagePart instance using the specified properties. + * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotatedMessagePart instance + * @returns InputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; + public static create(properties?: google.cloud.dialogflow.v2beta1.IInputAudioConfig): google.cloud.dialogflow.v2beta1.InputAudioConfig; /** - * Encodes the specified AnnotatedMessagePart message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. - * @param message AnnotatedMessagePart message or plain object to encode + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IAnnotatedMessagePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotatedMessagePart message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. - * @param message AnnotatedMessagePart message or plain object to encode + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IAnnotatedMessagePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IInputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotatedMessagePart 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 AnnotatedMessagePart + * @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.v2beta1.AnnotatedMessagePart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.InputAudioConfig; /** - * Decodes an AnnotatedMessagePart 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 AnnotatedMessagePart + * @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.v2beta1.AnnotatedMessagePart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.InputAudioConfig; /** - * Verifies an AnnotatedMessagePart 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 an AnnotatedMessagePart 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 AnnotatedMessagePart + * @returns InputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AnnotatedMessagePart; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.InputAudioConfig; /** - * Creates a plain object from an AnnotatedMessagePart message. Also converts values to other types if specified. - * @param message AnnotatedMessagePart + * 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.v2beta1.AnnotatedMessagePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.InputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotatedMessagePart to JSON. + * Converts this InputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MessageAnnotation. */ - interface IMessageAnnotation { + /** SsmlVoiceGender enum. */ + enum SsmlVoiceGender { + SSML_VOICE_GENDER_UNSPECIFIED = 0, + SSML_VOICE_GENDER_MALE = 1, + SSML_VOICE_GENDER_FEMALE = 2, + SSML_VOICE_GENDER_NEUTRAL = 3 + } - /** MessageAnnotation parts */ - parts?: (google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart[]|null); + /** Properties of a VoiceSelectionParams. */ + interface IVoiceSelectionParams { - /** MessageAnnotation containEntities */ - containEntities?: (boolean|null); + /** VoiceSelectionParams name */ + name?: (string|null); + + /** VoiceSelectionParams ssmlGender */ + ssmlGender?: (google.cloud.dialogflow.v2beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.v2beta1.SsmlVoiceGender|null); } - /** Represents a MessageAnnotation. */ - class MessageAnnotation implements IMessageAnnotation { + /** Represents a VoiceSelectionParams. */ + class VoiceSelectionParams implements IVoiceSelectionParams { /** - * Constructs a new MessageAnnotation. + * Constructs a new VoiceSelectionParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IMessageAnnotation); + constructor(properties?: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams); - /** MessageAnnotation parts. */ - public parts: google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart[]; + /** VoiceSelectionParams name. */ + public name: string; - /** MessageAnnotation containEntities. */ - public containEntities: boolean; + /** VoiceSelectionParams ssmlGender. */ + public ssmlGender: (google.cloud.dialogflow.v2beta1.SsmlVoiceGender|keyof typeof google.cloud.dialogflow.v2beta1.SsmlVoiceGender); /** - * Creates a new MessageAnnotation instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @param [properties] Properties to set - * @returns MessageAnnotation instance + * @returns VoiceSelectionParams instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IMessageAnnotation): google.cloud.dialogflow.v2beta1.MessageAnnotation; + public static create(properties?: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; /** - * Encodes the specified MessageAnnotation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. - * @param message MessageAnnotation message or plain object to encode + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IMessageAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageAnnotation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. - * @param message MessageAnnotation message or plain object to encode + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IMessageAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IVoiceSelectionParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageAnnotation 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 MessageAnnotation + * @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.v2beta1.MessageAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; /** - * Decodes a MessageAnnotation 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 MessageAnnotation + * @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.v2beta1.MessageAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; /** - * Verifies a MessageAnnotation 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 a MessageAnnotation 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 MessageAnnotation + * @returns VoiceSelectionParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.MessageAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.VoiceSelectionParams; /** - * Creates a plain object from a MessageAnnotation message. Also converts values to other types if specified. - * @param message MessageAnnotation + * 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.v2beta1.MessageAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.VoiceSelectionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageAnnotation to JSON. + * Converts this VoiceSelectionParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ArticleAnswer. */ - interface IArticleAnswer { + /** Properties of a SynthesizeSpeechConfig. */ + interface ISynthesizeSpeechConfig { - /** ArticleAnswer title */ - title?: (string|null); + /** SynthesizeSpeechConfig speakingRate */ + speakingRate?: (number|null); - /** ArticleAnswer uri */ - uri?: (string|null); + /** SynthesizeSpeechConfig pitch */ + pitch?: (number|null); - /** ArticleAnswer snippets */ - snippets?: (string[]|null); + /** SynthesizeSpeechConfig volumeGainDb */ + volumeGainDb?: (number|null); - /** ArticleAnswer metadata */ - metadata?: ({ [k: string]: string }|null); + /** SynthesizeSpeechConfig effectsProfileId */ + effectsProfileId?: (string[]|null); - /** ArticleAnswer answerRecord */ - answerRecord?: (string|null); - } + /** SynthesizeSpeechConfig voice */ + voice?: (google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null); + } - /** Represents an ArticleAnswer. */ - class ArticleAnswer implements IArticleAnswer { + /** Represents a SynthesizeSpeechConfig. */ + class SynthesizeSpeechConfig implements ISynthesizeSpeechConfig { /** - * Constructs a new ArticleAnswer. + * Constructs a new SynthesizeSpeechConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IArticleAnswer); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig); - /** ArticleAnswer title. */ - public title: string; + /** SynthesizeSpeechConfig speakingRate. */ + public speakingRate: number; - /** ArticleAnswer uri. */ - public uri: string; + /** SynthesizeSpeechConfig pitch. */ + public pitch: number; - /** ArticleAnswer snippets. */ - public snippets: string[]; + /** SynthesizeSpeechConfig volumeGainDb. */ + public volumeGainDb: number; - /** ArticleAnswer metadata. */ - public metadata: { [k: string]: string }; + /** SynthesizeSpeechConfig effectsProfileId. */ + public effectsProfileId: string[]; - /** ArticleAnswer answerRecord. */ - public answerRecord: string; + /** SynthesizeSpeechConfig voice. */ + public voice?: (google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null); /** - * Creates a new ArticleAnswer instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ArticleAnswer instance + * @returns SynthesizeSpeechConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IArticleAnswer): google.cloud.dialogflow.v2beta1.ArticleAnswer; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; /** - * Encodes the specified ArticleAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. - * @param message ArticleAnswer message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IArticleAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ArticleAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. - * @param message ArticleAnswer message or plain object to encode + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IArticleAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ArticleAnswer 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 ArticleAnswer + * @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.v2beta1.ArticleAnswer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; /** - * Decodes an ArticleAnswer 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 ArticleAnswer + * @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.v2beta1.ArticleAnswer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; /** - * Verifies an ArticleAnswer 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 an ArticleAnswer 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 ArticleAnswer + * @returns SynthesizeSpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ArticleAnswer; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig; /** - * Creates a plain object from an ArticleAnswer message. Also converts values to other types if specified. - * @param message ArticleAnswer + * 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.v2beta1.ArticleAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ArticleAnswer to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a FaqAnswer. */ - interface IFaqAnswer { - - /** FaqAnswer answer */ - answer?: (string|null); - - /** FaqAnswer confidence */ - confidence?: (number|null); + /** 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 + } - /** FaqAnswer question */ - question?: (string|null); + /** Properties of an OutputAudioConfig. */ + interface IOutputAudioConfig { - /** FaqAnswer source */ - source?: (string|null); + /** OutputAudioConfig audioEncoding */ + audioEncoding?: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null); - /** FaqAnswer metadata */ - metadata?: ({ [k: string]: string }|null); + /** OutputAudioConfig sampleRateHertz */ + sampleRateHertz?: (number|null); - /** FaqAnswer answerRecord */ - answerRecord?: (string|null); + /** OutputAudioConfig synthesizeSpeechConfig */ + synthesizeSpeechConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); } - /** Represents a FaqAnswer. */ - class FaqAnswer implements IFaqAnswer { + /** Represents an OutputAudioConfig. */ + class OutputAudioConfig implements IOutputAudioConfig { /** - * Constructs a new FaqAnswer. + * Constructs a new OutputAudioConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IFaqAnswer); - - /** FaqAnswer answer. */ - public answer: string; - - /** FaqAnswer confidence. */ - public confidence: number; - - /** FaqAnswer question. */ - public question: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IOutputAudioConfig); - /** FaqAnswer source. */ - public source: string; + /** OutputAudioConfig audioEncoding. */ + public audioEncoding: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding); - /** FaqAnswer metadata. */ - public metadata: { [k: string]: string }; + /** OutputAudioConfig sampleRateHertz. */ + public sampleRateHertz: number; - /** FaqAnswer answerRecord. */ - public answerRecord: string; + /** OutputAudioConfig synthesizeSpeechConfig. */ + public synthesizeSpeechConfig?: (google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null); /** - * Creates a new FaqAnswer instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @param [properties] Properties to set - * @returns FaqAnswer instance + * @returns OutputAudioConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IFaqAnswer): google.cloud.dialogflow.v2beta1.FaqAnswer; + public static create(properties?: google.cloud.dialogflow.v2beta1.IOutputAudioConfig): google.cloud.dialogflow.v2beta1.OutputAudioConfig; /** - * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. - * @param message FaqAnswer message or plain object to encode + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. - * @param message FaqAnswer message or plain object to encode + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IOutputAudioConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FaqAnswer 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 FaqAnswer + * @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.v2beta1.FaqAnswer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.OutputAudioConfig; /** - * Decodes a FaqAnswer 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 FaqAnswer + * @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.v2beta1.FaqAnswer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.OutputAudioConfig; /** - * Verifies a FaqAnswer 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 FaqAnswer 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 FaqAnswer + * @returns OutputAudioConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.FaqAnswer; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.OutputAudioConfig; /** - * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. - * @param message FaqAnswer + * 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.v2beta1.FaqAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.OutputAudioConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FaqAnswer to JSON. + * Converts this OutputAudioConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SmartReplyAnswer. */ - interface ISmartReplyAnswer { - - /** SmartReplyAnswer reply */ - reply?: (string|null); + /** TelephonyDtmf enum. */ + enum TelephonyDtmf { + TELEPHONY_DTMF_UNSPECIFIED = 0, + DTMF_ONE = 1, + DTMF_TWO = 2, + DTMF_THREE = 3, + DTMF_FOUR = 4, + DTMF_FIVE = 5, + DTMF_SIX = 6, + DTMF_SEVEN = 7, + DTMF_EIGHT = 8, + DTMF_NINE = 9, + DTMF_ZERO = 10, + DTMF_A = 11, + DTMF_B = 12, + DTMF_C = 13, + DTMF_D = 14, + DTMF_STAR = 15, + DTMF_POUND = 16 + } - /** SmartReplyAnswer confidence */ - confidence?: (number|null); + /** Properties of a TelephonyDtmfEvents. */ + interface ITelephonyDtmfEvents { - /** SmartReplyAnswer answerRecord */ - answerRecord?: (string|null); + /** TelephonyDtmfEvents dtmfEvents */ + dtmfEvents?: (google.cloud.dialogflow.v2beta1.TelephonyDtmf[]|null); } - /** Represents a SmartReplyAnswer. */ - class SmartReplyAnswer implements ISmartReplyAnswer { + /** Represents a TelephonyDtmfEvents. */ + class TelephonyDtmfEvents implements ITelephonyDtmfEvents { /** - * Constructs a new SmartReplyAnswer. + * Constructs a new TelephonyDtmfEvents. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer); - - /** SmartReplyAnswer reply. */ - public reply: string; - - /** SmartReplyAnswer confidence. */ - public confidence: number; + constructor(properties?: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents); - /** SmartReplyAnswer answerRecord. */ - public answerRecord: string; + /** TelephonyDtmfEvents dtmfEvents. */ + public dtmfEvents: google.cloud.dialogflow.v2beta1.TelephonyDtmf[]; /** - * Creates a new SmartReplyAnswer instance using the specified properties. + * Creates a new TelephonyDtmfEvents instance using the specified properties. * @param [properties] Properties to set - * @returns SmartReplyAnswer instance + * @returns TelephonyDtmfEvents instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; + public static create(properties?: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; /** - * Encodes the specified SmartReplyAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. - * @param message SmartReplyAnswer message or plain object to encode + * Encodes the specified TelephonyDtmfEvents message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. + * @param message TelephonyDtmfEvents message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SmartReplyAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. - * @param message SmartReplyAnswer message or plain object to encode + * Encodes the specified TelephonyDtmfEvents message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. + * @param message TelephonyDtmfEvents message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SmartReplyAnswer message from the specified reader or buffer. + * Decodes a TelephonyDtmfEvents message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SmartReplyAnswer + * @returns TelephonyDtmfEvents * @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.v2beta1.SmartReplyAnswer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; /** - * Decodes a SmartReplyAnswer message from the specified reader or buffer, length delimited. + * Decodes a TelephonyDtmfEvents message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SmartReplyAnswer + * @returns TelephonyDtmfEvents * @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.v2beta1.SmartReplyAnswer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; /** - * Verifies a SmartReplyAnswer message. + * Verifies a TelephonyDtmfEvents 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 SmartReplyAnswer message from a plain object. Also converts values to their respective internal types. + * Creates a TelephonyDtmfEvents message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SmartReplyAnswer + * @returns TelephonyDtmfEvents */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SmartReplyAnswer; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents; /** - * Creates a plain object from a SmartReplyAnswer message. Also converts values to other types if specified. - * @param message SmartReplyAnswer + * Creates a plain object from a TelephonyDtmfEvents message. Also converts values to other types if specified. + * @param message TelephonyDtmfEvents * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SmartReplyAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SmartReplyAnswer to JSON. + * Converts this TelephonyDtmfEvents to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SuggestionResult. */ - interface ISuggestionResult { - - /** SuggestionResult error */ - error?: (google.rpc.IStatus|null); - - /** SuggestionResult suggestArticlesResponse */ - suggestArticlesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null); - - /** SuggestionResult suggestFaqAnswersResponse */ - suggestFaqAnswersResponse?: (google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null); + /** Properties of a SpeechToTextConfig. */ + interface ISpeechToTextConfig { - /** SuggestionResult suggestSmartRepliesResponse */ - suggestSmartRepliesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null); + /** SpeechToTextConfig speechModelVariant */ + speechModelVariant?: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant|null); } - /** Represents a SuggestionResult. */ - class SuggestionResult implements ISuggestionResult { + /** Represents a SpeechToTextConfig. */ + class SpeechToTextConfig implements ISpeechToTextConfig { /** - * Constructs a new SuggestionResult. + * Constructs a new SpeechToTextConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestionResult); - - /** SuggestionResult error. */ - public error?: (google.rpc.IStatus|null); - - /** SuggestionResult suggestArticlesResponse. */ - public suggestArticlesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null); - - /** SuggestionResult suggestFaqAnswersResponse. */ - public suggestFaqAnswersResponse?: (google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null); - - /** SuggestionResult suggestSmartRepliesResponse. */ - public suggestSmartRepliesResponse?: (google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig); - /** SuggestionResult suggestionResponse. */ - public suggestionResponse?: ("error"|"suggestArticlesResponse"|"suggestFaqAnswersResponse"|"suggestSmartRepliesResponse"); + /** SpeechToTextConfig speechModelVariant. */ + public speechModelVariant: (google.cloud.dialogflow.v2beta1.SpeechModelVariant|keyof typeof google.cloud.dialogflow.v2beta1.SpeechModelVariant); /** - * Creates a new SuggestionResult instance using the specified properties. + * Creates a new SpeechToTextConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionResult instance + * @returns SpeechToTextConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestionResult): google.cloud.dialogflow.v2beta1.SuggestionResult; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; /** - * Encodes the specified SuggestionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. - * @param message SuggestionResult message or plain object to encode + * Encodes the specified SpeechToTextConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. + * @param message SpeechToTextConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. - * @param message SuggestionResult message or plain object to encode + * Encodes the specified SpeechToTextConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. + * @param message SpeechToTextConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISpeechToTextConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionResult message from the specified reader or buffer. + * Decodes a SpeechToTextConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SuggestionResult + * @returns SpeechToTextConfig * @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.v2beta1.SuggestionResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; /** - * Decodes a SuggestionResult message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionResult + * @returns SpeechToTextConfig * @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.v2beta1.SuggestionResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; /** - * Verifies a SuggestionResult message. + * Verifies a SpeechToTextConfig 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 SuggestionResult message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionResult + * @returns SpeechToTextConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestionResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SpeechToTextConfig; /** - * Creates a plain object from a SuggestionResult message. Also converts values to other types if specified. - * @param message SuggestionResult + * Creates a plain object from a SpeechToTextConfig message. Also converts values to other types if specified. + * @param message SpeechToTextConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SpeechToTextConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionResult to JSON. + * Converts this SpeechToTextConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SuggestArticlesRequest. */ - interface ISuggestArticlesRequest { - - /** SuggestArticlesRequest parent */ - parent?: (string|null); - - /** SuggestArticlesRequest latestMessage */ - latestMessage?: (string|null); - - /** SuggestArticlesRequest contextSize */ - contextSize?: (number|null); - - /** SuggestArticlesRequest assistQueryParams */ - assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); - } - - /** Represents a SuggestArticlesRequest. */ - class SuggestArticlesRequest implements ISuggestArticlesRequest { - - /** - * Constructs a new SuggestArticlesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest); - - /** SuggestArticlesRequest parent. */ - public parent: string; - - /** SuggestArticlesRequest latestMessage. */ - public latestMessage: string; - - /** SuggestArticlesRequest contextSize. */ - public contextSize: number; - - /** SuggestArticlesRequest assistQueryParams. */ - public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + /** Represents a Sessions */ + class Sessions extends $protobuf.rpc.Service { /** - * Creates a new SuggestArticlesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestArticlesRequest instance + * 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 */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Encodes the specified SuggestArticlesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. - * @param message SuggestArticlesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * 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 encode(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions; /** - * Encodes the specified SuggestArticlesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. - * @param message SuggestArticlesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DetectIntent. + * @param request DetectIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DetectIntentResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.DetectIntentCallback): void; /** - * Decodes a SuggestArticlesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestArticlesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DetectIntent. + * @param request DetectIntentRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; + public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest): Promise; /** - * Decodes a SuggestArticlesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestArticlesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls StreamingDetectIntent. + * @param request StreamingDetectIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; + public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntentCallback): void; /** - * Verifies a SuggestArticlesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls StreamingDetectIntent. + * @param request StreamingDetectIntentRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest): Promise; + } - /** - * Creates a SuggestArticlesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestArticlesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestArticlesRequest; + namespace Sessions { /** - * Creates a plain object from a SuggestArticlesRequest message. Also converts values to other types if specified. - * @param message SuggestArticlesRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#detectIntent}. + * @param error Error, if any + * @param [response] DetectIntentResponse */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestArticlesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.DetectIntentResponse) => void; /** - * Converts this SuggestArticlesRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#streamingDetectIntent}. + * @param error Error, if any + * @param [response] StreamingDetectIntentResponse */ - public toJSON(): { [k: string]: any }; + type StreamingDetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse) => void; } - /** Properties of a SuggestArticlesResponse. */ - interface ISuggestArticlesResponse { + /** Properties of a DetectIntentRequest. */ + interface IDetectIntentRequest { - /** SuggestArticlesResponse articleAnswers */ - articleAnswers?: (google.cloud.dialogflow.v2beta1.IArticleAnswer[]|null); + /** DetectIntentRequest session */ + session?: (string|null); - /** SuggestArticlesResponse latestMessage */ - latestMessage?: (string|null); + /** DetectIntentRequest queryParams */ + queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - /** SuggestArticlesResponse contextSize */ - contextSize?: (number|null); - } + /** DetectIntentRequest queryInput */ + queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); - /** Represents a SuggestArticlesResponse. */ - class SuggestArticlesResponse implements ISuggestArticlesResponse { + /** DetectIntentRequest outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); - /** - * Constructs a new SuggestArticlesResponse. + /** DetectIntentRequest outputAudioConfigMask */ + outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + + /** DetectIntentRequest inputAudio */ + inputAudio?: (Uint8Array|string|null); + } + + /** Represents a DetectIntentRequest. */ + class DetectIntentRequest implements IDetectIntentRequest { + + /** + * Constructs a new DetectIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentRequest); - /** SuggestArticlesResponse articleAnswers. */ - public articleAnswers: google.cloud.dialogflow.v2beta1.IArticleAnswer[]; + /** DetectIntentRequest session. */ + public session: string; - /** SuggestArticlesResponse latestMessage. */ - public latestMessage: string; + /** DetectIntentRequest queryParams. */ + public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - /** SuggestArticlesResponse contextSize. */ - public contextSize: number; + /** DetectIntentRequest queryInput. */ + public queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); + + /** DetectIntentRequest outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** DetectIntentRequest outputAudioConfigMask. */ + public outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + + /** DetectIntentRequest inputAudio. */ + public inputAudio: (Uint8Array|string); /** - * Creates a new SuggestArticlesResponse instance using the specified properties. + * Creates a new DetectIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestArticlesResponse instance + * @returns DetectIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentRequest): google.cloud.dialogflow.v2beta1.DetectIntentRequest; /** - * Encodes the specified SuggestArticlesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. - * @param message SuggestArticlesResponse message or plain object to encode + * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestArticlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestArticlesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. - * @param message SuggestArticlesResponse message or plain object to encode + * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestArticlesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestArticlesResponse 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 SuggestArticlesResponse + * @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.v2beta1.SuggestArticlesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DetectIntentRequest; /** - * Decodes a SuggestArticlesResponse 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 SuggestArticlesResponse + * @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.v2beta1.SuggestArticlesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DetectIntentRequest; /** - * Verifies a SuggestArticlesResponse 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 SuggestArticlesResponse 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 SuggestArticlesResponse + * @returns DetectIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestArticlesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DetectIntentRequest; /** - * Creates a plain object from a SuggestArticlesResponse message. Also converts values to other types if specified. - * @param message SuggestArticlesResponse + * 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.v2beta1.SuggestArticlesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestArticlesResponse to JSON. + * Converts this DetectIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SuggestFaqAnswersRequest. */ - interface ISuggestFaqAnswersRequest { + /** Properties of a DetectIntentResponse. */ + interface IDetectIntentResponse { - /** SuggestFaqAnswersRequest parent */ - parent?: (string|null); + /** DetectIntentResponse responseId */ + responseId?: (string|null); - /** SuggestFaqAnswersRequest latestMessage */ - latestMessage?: (string|null); + /** DetectIntentResponse queryResult */ + queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); - /** SuggestFaqAnswersRequest contextSize */ - contextSize?: (number|null); + /** DetectIntentResponse alternativeQueryResults */ + alternativeQueryResults?: (google.cloud.dialogflow.v2beta1.IQueryResult[]|null); - /** SuggestFaqAnswersRequest assistQueryParams */ - assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + /** DetectIntentResponse webhookStatus */ + webhookStatus?: (google.rpc.IStatus|null); + + /** DetectIntentResponse outputAudio */ + outputAudio?: (Uint8Array|string|null); + + /** DetectIntentResponse outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); } - /** Represents a SuggestFaqAnswersRequest. */ - class SuggestFaqAnswersRequest implements ISuggestFaqAnswersRequest { + /** Represents a DetectIntentResponse. */ + class DetectIntentResponse implements IDetectIntentResponse { /** - * Constructs a new SuggestFaqAnswersRequest. + * Constructs a new DetectIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentResponse); - /** SuggestFaqAnswersRequest parent. */ - public parent: string; + /** DetectIntentResponse responseId. */ + public responseId: string; - /** SuggestFaqAnswersRequest latestMessage. */ - public latestMessage: string; + /** DetectIntentResponse queryResult. */ + public queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); - /** SuggestFaqAnswersRequest contextSize. */ - public contextSize: number; + /** DetectIntentResponse alternativeQueryResults. */ + public alternativeQueryResults: google.cloud.dialogflow.v2beta1.IQueryResult[]; - /** SuggestFaqAnswersRequest assistQueryParams. */ - public assistQueryParams?: (google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null); + /** DetectIntentResponse webhookStatus. */ + public webhookStatus?: (google.rpc.IStatus|null); + + /** DetectIntentResponse outputAudio. */ + public outputAudio: (Uint8Array|string); + + /** DetectIntentResponse outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); /** - * Creates a new SuggestFaqAnswersRequest instance using the specified properties. + * Creates a new DetectIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestFaqAnswersRequest instance + * @returns DetectIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentResponse): google.cloud.dialogflow.v2beta1.DetectIntentResponse; /** - * Encodes the specified SuggestFaqAnswersRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. - * @param message SuggestFaqAnswersRequest message or plain object to encode + * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestFaqAnswersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestFaqAnswersRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. - * @param message SuggestFaqAnswersRequest message or plain object to encode + * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestFaqAnswersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestFaqAnswersRequest 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 SuggestFaqAnswersRequest + * @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.v2beta1.SuggestFaqAnswersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DetectIntentResponse; /** - * Decodes a SuggestFaqAnswersRequest 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 SuggestFaqAnswersRequest + * @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.v2beta1.SuggestFaqAnswersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DetectIntentResponse; /** - * Verifies a SuggestFaqAnswersRequest 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 SuggestFaqAnswersRequest 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 SuggestFaqAnswersRequest + * @returns DetectIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DetectIntentResponse; /** - * Creates a plain object from a SuggestFaqAnswersRequest message. Also converts values to other types if specified. - * @param message SuggestFaqAnswersRequest + * 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.v2beta1.SuggestFaqAnswersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestFaqAnswersRequest to JSON. + * Converts this DetectIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SuggestFaqAnswersResponse. */ - interface ISuggestFaqAnswersResponse { + /** Properties of a QueryParameters. */ + interface IQueryParameters { - /** SuggestFaqAnswersResponse faqAnswers */ - faqAnswers?: (google.cloud.dialogflow.v2beta1.IFaqAnswer[]|null); + /** QueryParameters timeZone */ + timeZone?: (string|null); - /** SuggestFaqAnswersResponse latestMessage */ - latestMessage?: (string|null); + /** QueryParameters geoLocation */ + geoLocation?: (google.type.ILatLng|null); - /** SuggestFaqAnswersResponse contextSize */ - contextSize?: (number|null); - } + /** QueryParameters contexts */ + contexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); - /** Represents a SuggestFaqAnswersResponse. */ - class SuggestFaqAnswersResponse implements ISuggestFaqAnswersResponse { + /** QueryParameters resetContexts */ + resetContexts?: (boolean|null); - /** - * Constructs a new SuggestFaqAnswersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse); + /** QueryParameters sessionEntityTypes */ + sessionEntityTypes?: (google.cloud.dialogflow.v2beta1.ISessionEntityType[]|null); - /** SuggestFaqAnswersResponse faqAnswers. */ - public faqAnswers: google.cloud.dialogflow.v2beta1.IFaqAnswer[]; + /** QueryParameters payload */ + payload?: (google.protobuf.IStruct|null); - /** SuggestFaqAnswersResponse latestMessage. */ - public latestMessage: string; + /** QueryParameters knowledgeBaseNames */ + knowledgeBaseNames?: (string[]|null); - /** SuggestFaqAnswersResponse contextSize. */ - public contextSize: number; + /** QueryParameters sentimentAnalysisRequestConfig */ + sentimentAnalysisRequestConfig?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null); + + /** QueryParameters subAgents */ + subAgents?: (google.cloud.dialogflow.v2beta1.ISubAgent[]|null); + + /** QueryParameters webhookHeaders */ + webhookHeaders?: ({ [k: string]: string }|null); + } + + /** Represents a QueryParameters. */ + class QueryParameters implements IQueryParameters { /** - * Creates a new SuggestFaqAnswersResponse instance using the specified properties. + * Constructs a new QueryParameters. * @param [properties] Properties to set - * @returns SuggestFaqAnswersResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; + constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryParameters); - /** - * Encodes the specified SuggestFaqAnswersResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. - * @param message SuggestFaqAnswersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** QueryParameters timeZone. */ + public timeZone: string; - /** - * Encodes the specified SuggestFaqAnswersResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. - * @param message SuggestFaqAnswersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** QueryParameters geoLocation. */ + public geoLocation?: (google.type.ILatLng|null); - /** - * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestFaqAnswersResponse - * @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.v2beta1.SuggestFaqAnswersResponse; - - /** - * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestFaqAnswersResponse - * @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.v2beta1.SuggestFaqAnswersResponse; - - /** - * Verifies a SuggestFaqAnswersResponse 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 SuggestFaqAnswersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestFaqAnswersResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse; - - /** - * Creates a plain object from a SuggestFaqAnswersResponse message. Also converts values to other types if specified. - * @param message SuggestFaqAnswersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SuggestFaqAnswersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SuggestSmartRepliesRequest. */ - interface ISuggestSmartRepliesRequest { - - /** SuggestSmartRepliesRequest parent */ - parent?: (string|null); - - /** SuggestSmartRepliesRequest currentTextInput */ - currentTextInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - - /** SuggestSmartRepliesRequest latestMessage */ - latestMessage?: (string|null); + /** QueryParameters contexts. */ + public contexts: google.cloud.dialogflow.v2beta1.IContext[]; - /** SuggestSmartRepliesRequest contextSize */ - contextSize?: (number|null); - } + /** QueryParameters resetContexts. */ + public resetContexts: boolean; - /** Represents a SuggestSmartRepliesRequest. */ - class SuggestSmartRepliesRequest implements ISuggestSmartRepliesRequest { + /** QueryParameters sessionEntityTypes. */ + public sessionEntityTypes: google.cloud.dialogflow.v2beta1.ISessionEntityType[]; - /** - * Constructs a new SuggestSmartRepliesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest); + /** QueryParameters payload. */ + public payload?: (google.protobuf.IStruct|null); - /** SuggestSmartRepliesRequest parent. */ - public parent: string; + /** QueryParameters knowledgeBaseNames. */ + public knowledgeBaseNames: string[]; - /** SuggestSmartRepliesRequest currentTextInput. */ - public currentTextInput?: (google.cloud.dialogflow.v2beta1.ITextInput|null); + /** QueryParameters sentimentAnalysisRequestConfig. */ + public sentimentAnalysisRequestConfig?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null); - /** SuggestSmartRepliesRequest latestMessage. */ - public latestMessage: string; + /** QueryParameters subAgents. */ + public subAgents: google.cloud.dialogflow.v2beta1.ISubAgent[]; - /** SuggestSmartRepliesRequest contextSize. */ - public contextSize: number; + /** QueryParameters webhookHeaders. */ + public webhookHeaders: { [k: string]: string }; /** - * Creates a new SuggestSmartRepliesRequest instance using the specified properties. + * Creates a new QueryParameters instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestSmartRepliesRequest instance + * @returns QueryParameters instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryParameters): google.cloud.dialogflow.v2beta1.QueryParameters; /** - * Encodes the specified SuggestSmartRepliesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. - * @param message SuggestSmartRepliesRequest message or plain object to encode + * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestSmartRepliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestSmartRepliesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. - * @param message SuggestSmartRepliesRequest message or plain object to encode + * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestSmartRepliesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestSmartRepliesRequest 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 SuggestSmartRepliesRequest + * @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.v2beta1.SuggestSmartRepliesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.QueryParameters; /** - * Decodes a SuggestSmartRepliesRequest 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 SuggestSmartRepliesRequest + * @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.v2beta1.SuggestSmartRepliesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.QueryParameters; /** - * Verifies a SuggestSmartRepliesRequest 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 SuggestSmartRepliesRequest 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 SuggestSmartRepliesRequest + * @returns QueryParameters */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryParameters; /** - * Creates a plain object from a SuggestSmartRepliesRequest message. Also converts values to other types if specified. - * @param message SuggestSmartRepliesRequest + * 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.v2beta1.SuggestSmartRepliesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.QueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestSmartRepliesRequest to JSON. + * Converts this QueryParameters to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SuggestSmartRepliesResponse. */ - interface ISuggestSmartRepliesResponse { + /** Properties of a QueryInput. */ + interface IQueryInput { - /** SuggestSmartRepliesResponse smartReplyAnswers */ - smartReplyAnswers?: (google.cloud.dialogflow.v2beta1.ISmartReplyAnswer[]|null); + /** QueryInput audioConfig */ + audioConfig?: (google.cloud.dialogflow.v2beta1.IInputAudioConfig|null); - /** SuggestSmartRepliesResponse latestMessage */ - latestMessage?: (string|null); + /** QueryInput text */ + text?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** SuggestSmartRepliesResponse contextSize */ - contextSize?: (number|null); + /** QueryInput event */ + event?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + + /** QueryInput dtmf */ + dtmf?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); } - /** Represents a SuggestSmartRepliesResponse. */ - class SuggestSmartRepliesResponse implements ISuggestSmartRepliesResponse { + /** Represents a QueryInput. */ + class QueryInput implements IQueryInput { /** - * Constructs a new SuggestSmartRepliesResponse. + * Constructs a new QueryInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryInput); - /** SuggestSmartRepliesResponse smartReplyAnswers. */ - public smartReplyAnswers: google.cloud.dialogflow.v2beta1.ISmartReplyAnswer[]; + /** QueryInput audioConfig. */ + public audioConfig?: (google.cloud.dialogflow.v2beta1.IInputAudioConfig|null); - /** SuggestSmartRepliesResponse latestMessage. */ - public latestMessage: string; + /** QueryInput text. */ + public text?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - /** SuggestSmartRepliesResponse contextSize. */ - public contextSize: number; + /** QueryInput event. */ + public event?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + + /** QueryInput dtmf. */ + public dtmf?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); + + /** QueryInput input. */ + public input?: ("audioConfig"|"text"|"event"|"dtmf"); /** - * Creates a new SuggestSmartRepliesResponse instance using the specified properties. + * Creates a new QueryInput instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestSmartRepliesResponse instance + * @returns QueryInput instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryInput): google.cloud.dialogflow.v2beta1.QueryInput; /** - * Encodes the specified SuggestSmartRepliesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. - * @param message SuggestSmartRepliesResponse message or plain object to encode + * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestSmartRepliesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestSmartRepliesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. - * @param message SuggestSmartRepliesResponse message or plain object to encode + * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestSmartRepliesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestSmartRepliesResponse 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 SuggestSmartRepliesResponse + * @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.v2beta1.SuggestSmartRepliesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.QueryInput; /** - * Decodes a SuggestSmartRepliesResponse 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 SuggestSmartRepliesResponse + * @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.v2beta1.SuggestSmartRepliesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.QueryInput; /** - * Verifies a SuggestSmartRepliesResponse 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 SuggestSmartRepliesResponse 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 SuggestSmartRepliesResponse + * @returns QueryInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryInput; /** - * Creates a plain object from a SuggestSmartRepliesResponse message. Also converts values to other types if specified. - * @param message SuggestSmartRepliesResponse + * 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.v2beta1.SuggestSmartRepliesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.QueryInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestSmartRepliesResponse to JSON. + * Converts this QueryInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Suggestion. */ - interface ISuggestion { + /** Properties of a QueryResult. */ + interface IQueryResult { - /** Suggestion name */ - name?: (string|null); + /** QueryResult queryText */ + queryText?: (string|null); - /** Suggestion articles */ - articles?: (google.cloud.dialogflow.v2beta1.Suggestion.IArticle[]|null); + /** QueryResult languageCode */ + languageCode?: (string|null); - /** Suggestion faqAnswers */ - faqAnswers?: (google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer[]|null); + /** QueryResult speechRecognitionConfidence */ + speechRecognitionConfidence?: (number|null); - /** Suggestion createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** QueryResult action */ + action?: (string|null); - /** Suggestion latestMessage */ - latestMessage?: (string|null); - } + /** QueryResult parameters */ + parameters?: (google.protobuf.IStruct|null); - /** Represents a Suggestion. */ - class Suggestion implements ISuggestion { + /** QueryResult allRequiredParamsPresent */ + allRequiredParamsPresent?: (boolean|null); + + /** QueryResult cancelsSlotFilling */ + cancelsSlotFilling?: (boolean|null); + + /** QueryResult fulfillmentText */ + fulfillmentText?: (string|null); + + /** QueryResult fulfillmentMessages */ + fulfillmentMessages?: (google.cloud.dialogflow.v2beta1.Intent.IMessage[]|null); + + /** QueryResult webhookSource */ + webhookSource?: (string|null); + + /** QueryResult webhookPayload */ + webhookPayload?: (google.protobuf.IStruct|null); + + /** QueryResult outputContexts */ + outputContexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); + + /** QueryResult intent */ + intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); + + /** QueryResult intentDetectionConfidence */ + intentDetectionConfidence?: (number|null); + + /** QueryResult diagnosticInfo */ + diagnosticInfo?: (google.protobuf.IStruct|null); + + /** QueryResult sentimentAnalysisResult */ + sentimentAnalysisResult?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + + /** QueryResult knowledgeAnswers */ + knowledgeAnswers?: (google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null); + } + + /** Represents a QueryResult. */ + class QueryResult implements IQueryResult { /** - * Constructs a new Suggestion. + * Constructs a new QueryResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISuggestion); + constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryResult); - /** Suggestion name. */ - public name: string; + /** QueryResult queryText. */ + public queryText: string; - /** Suggestion articles. */ - public articles: google.cloud.dialogflow.v2beta1.Suggestion.IArticle[]; + /** QueryResult languageCode. */ + public languageCode: string; - /** Suggestion faqAnswers. */ - public faqAnswers: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer[]; + /** QueryResult speechRecognitionConfidence. */ + public speechRecognitionConfidence: number; - /** Suggestion createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** QueryResult action. */ + public action: string; - /** Suggestion latestMessage. */ - public latestMessage: string; + /** QueryResult parameters. */ + public parameters?: (google.protobuf.IStruct|null); + + /** QueryResult allRequiredParamsPresent. */ + public allRequiredParamsPresent: boolean; + + /** QueryResult cancelsSlotFilling. */ + public cancelsSlotFilling: boolean; + + /** QueryResult fulfillmentText. */ + public fulfillmentText: string; + + /** QueryResult fulfillmentMessages. */ + public fulfillmentMessages: google.cloud.dialogflow.v2beta1.Intent.IMessage[]; + + /** QueryResult webhookSource. */ + public webhookSource: string; + + /** QueryResult webhookPayload. */ + public webhookPayload?: (google.protobuf.IStruct|null); + + /** QueryResult outputContexts. */ + public outputContexts: google.cloud.dialogflow.v2beta1.IContext[]; + + /** QueryResult intent. */ + public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); + + /** QueryResult intentDetectionConfidence. */ + public intentDetectionConfidence: number; + + /** QueryResult diagnosticInfo. */ + public diagnosticInfo?: (google.protobuf.IStruct|null); + + /** QueryResult sentimentAnalysisResult. */ + public sentimentAnalysisResult?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + + /** QueryResult knowledgeAnswers. */ + public knowledgeAnswers?: (google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null); /** - * Creates a new Suggestion instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @param [properties] Properties to set - * @returns Suggestion instance + * @returns QueryResult instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISuggestion): google.cloud.dialogflow.v2beta1.Suggestion; + public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryResult): google.cloud.dialogflow.v2beta1.QueryResult; /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode + * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Suggestion 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 Suggestion + * @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.v2beta1.Suggestion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.QueryResult; /** - * Decodes a Suggestion 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 Suggestion + * @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.v2beta1.Suggestion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.QueryResult; /** - * Verifies a Suggestion 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 Suggestion 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 Suggestion + * @returns QueryResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryResult; /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @param message Suggestion + * 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.v2beta1.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Suggestion to JSON. + * Converts this QueryResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Suggestion { + /** Properties of a KnowledgeAnswers. */ + interface IKnowledgeAnswers { - /** Properties of an Article. */ - interface IArticle { + /** KnowledgeAnswers answers */ + answers?: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer[]|null); + } - /** Article title */ - title?: (string|null); + /** Represents a KnowledgeAnswers. */ + class KnowledgeAnswers implements IKnowledgeAnswers { - /** Article uri */ - uri?: (string|null); + /** + * Constructs a new KnowledgeAnswers. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers); - /** Article snippets */ - snippets?: (string[]|null); + /** KnowledgeAnswers answers. */ + public answers: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer[]; - /** Article metadata */ - metadata?: ({ [k: string]: string }|null); + /** + * Creates a new KnowledgeAnswers instance using the specified properties. + * @param [properties] Properties to set + * @returns KnowledgeAnswers instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers): google.cloud.dialogflow.v2beta1.KnowledgeAnswers; - /** Article answerRecord */ - answerRecord?: (string|null); - } + /** + * Encodes the specified KnowledgeAnswers message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. + * @param message KnowledgeAnswers message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an Article. */ - class Article implements IArticle { + /** + * Encodes the specified KnowledgeAnswers message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. + * @param message KnowledgeAnswers message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Article. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IArticle); + /** + * Decodes a KnowledgeAnswers message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KnowledgeAnswers + * @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.v2beta1.KnowledgeAnswers; - /** Article title. */ - public title: string; + /** + * Decodes a KnowledgeAnswers message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KnowledgeAnswers + * @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.v2beta1.KnowledgeAnswers; - /** Article uri. */ - public uri: string; + /** + * Verifies a KnowledgeAnswers 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); - /** Article snippets. */ - public snippets: string[]; + /** + * Creates a KnowledgeAnswers message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KnowledgeAnswers + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeAnswers; - /** Article metadata. */ - public metadata: { [k: string]: string }; + /** + * Creates a plain object from a KnowledgeAnswers message. Also converts values to other types if specified. + * @param message KnowledgeAnswers + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Article answerRecord. */ - public answerRecord: string; + /** + * Converts this KnowledgeAnswers to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new Article instance using the specified properties. - * @param [properties] Properties to set - * @returns Article instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IArticle): google.cloud.dialogflow.v2beta1.Suggestion.Article; - - /** - * Encodes the specified Article message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. - * @param message Article message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Suggestion.IArticle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Article message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. - * @param message Article message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Suggestion.IArticle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Article message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Article - * @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.v2beta1.Suggestion.Article; - - /** - * Decodes an Article message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Article - * @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.v2beta1.Suggestion.Article; - - /** - * Verifies an Article 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 Article message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Article - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion.Article; + namespace KnowledgeAnswers { - /** - * Creates a plain object from an Article message. Also converts values to other types if specified. - * @param message Article - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Suggestion.Article, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an Answer. */ + interface IAnswer { - /** - * Converts this Article to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Answer source */ + source?: (string|null); - /** Properties of a FaqAnswer. */ - interface IFaqAnswer { + /** Answer faqQuestion */ + faqQuestion?: (string|null); - /** FaqAnswer answer */ + /** Answer answer */ answer?: (string|null); - /** FaqAnswer confidence */ - confidence?: (number|null); - - /** FaqAnswer question */ - question?: (string|null); - - /** FaqAnswer source */ - source?: (string|null); - - /** FaqAnswer metadata */ - metadata?: ({ [k: string]: string }|null); + /** Answer matchConfidenceLevel */ + matchConfidenceLevel?: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|null); - /** FaqAnswer answerRecord */ - answerRecord?: (string|null); + /** Answer matchConfidence */ + matchConfidence?: (number|null); } - /** Represents a FaqAnswer. */ - class FaqAnswer implements IFaqAnswer { + /** Represents an Answer. */ + class Answer implements IAnswer { /** - * Constructs a new FaqAnswer. + * Constructs a new Answer. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer); - - /** FaqAnswer answer. */ - public answer: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer); - /** FaqAnswer confidence. */ - public confidence: number; + /** Answer source. */ + public source: string; - /** FaqAnswer question. */ - public question: string; + /** Answer faqQuestion. */ + public faqQuestion: string; - /** FaqAnswer source. */ - public source: string; + /** Answer answer. */ + public answer: string; - /** FaqAnswer metadata. */ - public metadata: { [k: string]: string }; + /** Answer matchConfidenceLevel. */ + public matchConfidenceLevel: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel); - /** FaqAnswer answerRecord. */ - public answerRecord: string; + /** Answer matchConfidence. */ + public matchConfidence: number; /** - * Creates a new FaqAnswer instance using the specified properties. + * Creates a new Answer instance using the specified properties. * @param [properties] Properties to set - * @returns FaqAnswer instance + * @returns Answer instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer): google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer; + public static create(properties?: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; /** - * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. - * @param message FaqAnswer message or plain object to encode + * Encodes the specified Answer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. + * @param message Answer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. - * @param message FaqAnswer message or plain object to encode + * Encodes the specified Answer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. + * @param message Answer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FaqAnswer message from the specified reader or buffer. + * Decodes an Answer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FaqAnswer + * @returns Answer * @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.v2beta1.Suggestion.FaqAnswer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; /** - * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. + * Decodes an Answer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FaqAnswer + * @returns Answer * @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.v2beta1.Suggestion.FaqAnswer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; /** - * Verifies a FaqAnswer message. + * Verifies an Answer 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 FaqAnswer message from a plain object. Also converts values to their respective internal types. + * Creates an Answer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FaqAnswer + * @returns Answer */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; /** - * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. - * @param message FaqAnswer + * Creates a plain object from an Answer message. Also converts values to other types if specified. + * @param message Answer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FaqAnswer to JSON. + * Converts this Answer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace Answer { + + /** MatchConfidenceLevel enum. */ + enum MatchConfidenceLevel { + MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3 + } + } } - /** Properties of a ListSuggestionsRequest. */ - interface IListSuggestionsRequest { + /** Properties of a StreamingDetectIntentRequest. */ + interface IStreamingDetectIntentRequest { - /** ListSuggestionsRequest parent */ - parent?: (string|null); + /** StreamingDetectIntentRequest session */ + session?: (string|null); - /** ListSuggestionsRequest pageSize */ - pageSize?: (number|null); + /** StreamingDetectIntentRequest queryParams */ + queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - /** ListSuggestionsRequest pageToken */ - pageToken?: (string|null); + /** StreamingDetectIntentRequest queryInput */ + queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); - /** ListSuggestionsRequest filter */ - filter?: (string|null); + /** StreamingDetectIntentRequest singleUtterance */ + singleUtterance?: (boolean|null); + + /** StreamingDetectIntentRequest outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** StreamingDetectIntentRequest outputAudioConfigMask */ + outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + + /** StreamingDetectIntentRequest inputAudio */ + inputAudio?: (Uint8Array|string|null); } - /** Represents a ListSuggestionsRequest. */ - class ListSuggestionsRequest implements IListSuggestionsRequest { + /** Represents a StreamingDetectIntentRequest. */ + class StreamingDetectIntentRequest implements IStreamingDetectIntentRequest { /** - * Constructs a new ListSuggestionsRequest. + * Constructs a new StreamingDetectIntentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest); - /** ListSuggestionsRequest parent. */ - public parent: string; + /** StreamingDetectIntentRequest session. */ + public session: string; - /** ListSuggestionsRequest pageSize. */ - public pageSize: number; + /** StreamingDetectIntentRequest queryParams. */ + public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - /** ListSuggestionsRequest pageToken. */ - public pageToken: string; + /** StreamingDetectIntentRequest queryInput. */ + public queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); - /** ListSuggestionsRequest filter. */ - public filter: string; + /** StreamingDetectIntentRequest singleUtterance. */ + public singleUtterance: boolean; + + /** StreamingDetectIntentRequest outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** StreamingDetectIntentRequest outputAudioConfigMask. */ + public outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + + /** StreamingDetectIntentRequest inputAudio. */ + public inputAudio: (Uint8Array|string); /** - * Creates a new ListSuggestionsRequest instance using the specified properties. + * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSuggestionsRequest instance + * @returns StreamingDetectIntentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsRequest): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; /** - * Encodes the specified ListSuggestionsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. - * @param message ListSuggestionsRequest message or plain object to encode + * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. - * @param message ListSuggestionsRequest message or plain object to encode + * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSuggestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSuggestionsRequest 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 ListSuggestionsRequest + * @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.v2beta1.ListSuggestionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; /** - * Decodes a ListSuggestionsRequest 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 ListSuggestionsRequest + * @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.v2beta1.ListSuggestionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; /** - * Verifies a ListSuggestionsRequest 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 ListSuggestionsRequest 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 ListSuggestionsRequest + * @returns StreamingDetectIntentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSuggestionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; /** - * Creates a plain object from a ListSuggestionsRequest message. Also converts values to other types if specified. - * @param message ListSuggestionsRequest + * 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.v2beta1.ListSuggestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSuggestionsRequest to JSON. + * Converts this StreamingDetectIntentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSuggestionsResponse. */ - interface IListSuggestionsResponse { + /** Properties of a StreamingDetectIntentResponse. */ + interface IStreamingDetectIntentResponse { - /** ListSuggestionsResponse suggestions */ - suggestions?: (google.cloud.dialogflow.v2beta1.ISuggestion[]|null); + /** StreamingDetectIntentResponse responseId */ + responseId?: (string|null); - /** ListSuggestionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** StreamingDetectIntentResponse recognitionResult */ + recognitionResult?: (google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null); + + /** StreamingDetectIntentResponse queryResult */ + queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); + + /** StreamingDetectIntentResponse alternativeQueryResults */ + alternativeQueryResults?: (google.cloud.dialogflow.v2beta1.IQueryResult[]|null); + + /** StreamingDetectIntentResponse webhookStatus */ + webhookStatus?: (google.rpc.IStatus|null); + + /** StreamingDetectIntentResponse outputAudio */ + outputAudio?: (Uint8Array|string|null); + + /** StreamingDetectIntentResponse outputAudioConfig */ + outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); } - /** Represents a ListSuggestionsResponse. */ - class ListSuggestionsResponse implements IListSuggestionsResponse { + /** Represents a StreamingDetectIntentResponse. */ + class StreamingDetectIntentResponse implements IStreamingDetectIntentResponse { /** - * Constructs a new ListSuggestionsResponse. + * Constructs a new StreamingDetectIntentResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse); - /** ListSuggestionsResponse suggestions. */ - public suggestions: google.cloud.dialogflow.v2beta1.ISuggestion[]; + /** StreamingDetectIntentResponse responseId. */ + public responseId: string; - /** ListSuggestionsResponse nextPageToken. */ - public nextPageToken: string; + /** StreamingDetectIntentResponse recognitionResult. */ + public recognitionResult?: (google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null); + + /** StreamingDetectIntentResponse queryResult. */ + public queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); + + /** StreamingDetectIntentResponse alternativeQueryResults. */ + public alternativeQueryResults: google.cloud.dialogflow.v2beta1.IQueryResult[]; + + /** StreamingDetectIntentResponse webhookStatus. */ + public webhookStatus?: (google.rpc.IStatus|null); + + /** StreamingDetectIntentResponse outputAudio. */ + public outputAudio: (Uint8Array|string); + + /** StreamingDetectIntentResponse outputAudioConfig. */ + public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); /** - * Creates a new ListSuggestionsResponse instance using the specified properties. + * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSuggestionsResponse instance + * @returns StreamingDetectIntentResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListSuggestionsResponse): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; /** - * Encodes the specified ListSuggestionsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. - * @param message ListSuggestionsResponse message or plain object to encode + * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. - * @param message ListSuggestionsResponse message or plain object to encode + * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSuggestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSuggestionsResponse 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 ListSuggestionsResponse + * @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.v2beta1.ListSuggestionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; /** - * Decodes a ListSuggestionsResponse 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 ListSuggestionsResponse + * @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.v2beta1.ListSuggestionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; /** - * Verifies a ListSuggestionsResponse 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 ListSuggestionsResponse 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 ListSuggestionsResponse + * @returns StreamingDetectIntentResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSuggestionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; /** - * Creates a plain object from a ListSuggestionsResponse message. Also converts values to other types if specified. - * @param message ListSuggestionsResponse + * 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.v2beta1.ListSuggestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSuggestionsResponse to JSON. + * Converts this StreamingDetectIntentResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CompileSuggestionRequest. */ - interface ICompileSuggestionRequest { + /** Properties of a StreamingRecognitionResult. */ + interface IStreamingRecognitionResult { - /** CompileSuggestionRequest parent */ - parent?: (string|null); + /** StreamingRecognitionResult messageType */ + messageType?: (google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|null); - /** CompileSuggestionRequest latestMessage */ - latestMessage?: (string|null); + /** StreamingRecognitionResult transcript */ + transcript?: (string|null); - /** CompileSuggestionRequest contextSize */ - contextSize?: (number|null); + /** StreamingRecognitionResult isFinal */ + isFinal?: (boolean|null); + + /** StreamingRecognitionResult confidence */ + confidence?: (number|null); + + /** StreamingRecognitionResult stability */ + stability?: (number|null); + + /** StreamingRecognitionResult speechWordInfo */ + speechWordInfo?: (google.cloud.dialogflow.v2beta1.ISpeechWordInfo[]|null); + + /** StreamingRecognitionResult speechEndOffset */ + speechEndOffset?: (google.protobuf.IDuration|null); + + /** StreamingRecognitionResult languageCode */ + languageCode?: (string|null); + + /** StreamingRecognitionResult dtmfDigits */ + dtmfDigits?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); } - /** Represents a CompileSuggestionRequest. */ - class CompileSuggestionRequest implements ICompileSuggestionRequest { + /** Represents a StreamingRecognitionResult. */ + class StreamingRecognitionResult implements IStreamingRecognitionResult { /** - * Constructs a new CompileSuggestionRequest. + * Constructs a new StreamingRecognitionResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult); - /** CompileSuggestionRequest parent. */ - public parent: string; + /** StreamingRecognitionResult messageType. */ + public messageType: (google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType); - /** CompileSuggestionRequest latestMessage. */ - public latestMessage: string; + /** StreamingRecognitionResult transcript. */ + public transcript: string; - /** CompileSuggestionRequest contextSize. */ - public contextSize: number; + /** StreamingRecognitionResult isFinal. */ + public isFinal: boolean; + + /** StreamingRecognitionResult confidence. */ + public confidence: number; + + /** StreamingRecognitionResult stability. */ + public stability: number; + + /** StreamingRecognitionResult speechWordInfo. */ + public speechWordInfo: google.cloud.dialogflow.v2beta1.ISpeechWordInfo[]; + + /** StreamingRecognitionResult speechEndOffset. */ + public speechEndOffset?: (google.protobuf.IDuration|null); + + /** StreamingRecognitionResult languageCode. */ + public languageCode: string; + + /** StreamingRecognitionResult dtmfDigits. */ + public dtmfDigits?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); /** - * Creates a new CompileSuggestionRequest instance using the specified properties. + * Creates a new StreamingRecognitionResult instance using the specified properties. * @param [properties] Properties to set - * @returns CompileSuggestionRequest instance + * @returns StreamingRecognitionResult instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; /** - * Encodes the specified CompileSuggestionRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. - * @param message CompileSuggestionRequest message or plain object to encode + * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICompileSuggestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompileSuggestionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. - * @param message CompileSuggestionRequest message or plain object to encode + * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICompileSuggestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompileSuggestionRequest 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 CompileSuggestionRequest + * @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.v2beta1.CompileSuggestionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; /** - * Decodes a CompileSuggestionRequest 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 CompileSuggestionRequest + * @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.v2beta1.CompileSuggestionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; /** - * Verifies a CompileSuggestionRequest 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 CompileSuggestionRequest 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 CompileSuggestionRequest + * @returns StreamingRecognitionResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompileSuggestionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; /** - * Creates a plain object from a CompileSuggestionRequest message. Also converts values to other types if specified. - * @param message CompileSuggestionRequest + * 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.v2beta1.CompileSuggestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingRecognitionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompileSuggestionRequest to JSON. + * Converts this StreamingRecognitionResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CompileSuggestionResponse. */ - interface ICompileSuggestionResponse { + namespace StreamingRecognitionResult { - /** CompileSuggestionResponse suggestion */ - suggestion?: (google.cloud.dialogflow.v2beta1.ISuggestion|null); + /** MessageType enum. */ + enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0, + TRANSCRIPT = 1, + DTMF_DIGITS = 3, + END_OF_SINGLE_UTTERANCE = 2, + PARTIAL_DTMF_DIGITS = 4 + } + } - /** CompileSuggestionResponse latestMessage */ - latestMessage?: (string|null); + /** Properties of a TextInput. */ + interface ITextInput { - /** CompileSuggestionResponse contextSize */ - contextSize?: (number|null); + /** TextInput text */ + text?: (string|null); + + /** TextInput languageCode */ + languageCode?: (string|null); } - /** Represents a CompileSuggestionResponse. */ - class CompileSuggestionResponse implements ICompileSuggestionResponse { + /** Represents a TextInput. */ + class TextInput implements ITextInput { /** - * Constructs a new CompileSuggestionResponse. + * Constructs a new TextInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse); - - /** CompileSuggestionResponse suggestion. */ - public suggestion?: (google.cloud.dialogflow.v2beta1.ISuggestion|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.ITextInput); - /** CompileSuggestionResponse latestMessage. */ - public latestMessage: string; + /** TextInput text. */ + public text: string; - /** CompileSuggestionResponse contextSize. */ - public contextSize: number; + /** TextInput languageCode. */ + public languageCode: string; /** - * Creates a new CompileSuggestionResponse instance using the specified properties. + * Creates a new TextInput instance using the specified properties. * @param [properties] Properties to set - * @returns CompileSuggestionResponse instance + * @returns TextInput instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.ITextInput): google.cloud.dialogflow.v2beta1.TextInput; /** - * Encodes the specified CompileSuggestionResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. - * @param message CompileSuggestionResponse message or plain object to encode + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICompileSuggestionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompileSuggestionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. - * @param message CompileSuggestionResponse message or plain object to encode + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICompileSuggestionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompileSuggestionResponse 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 CompileSuggestionResponse + * @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.v2beta1.CompileSuggestionResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.TextInput; /** - * Decodes a CompileSuggestionResponse 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 CompileSuggestionResponse + * @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.v2beta1.CompileSuggestionResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.TextInput; /** - * Verifies a CompileSuggestionResponse 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 CompileSuggestionResponse 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 CompileSuggestionResponse + * @returns TextInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompileSuggestionResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TextInput; /** - * Creates a plain object from a CompileSuggestionResponse message. Also converts values to other types if specified. - * @param message CompileSuggestionResponse + * 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.v2beta1.CompileSuggestionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompileSuggestionResponse to JSON. + * Converts this TextInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ResponseMessage. */ - interface IResponseMessage { - - /** ResponseMessage text */ - text?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null); - - /** ResponseMessage payload */ - payload?: (google.protobuf.IStruct|null); + /** Properties of an EventInput. */ + interface IEventInput { - /** ResponseMessage liveAgentHandoff */ - liveAgentHandoff?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null); + /** EventInput name */ + name?: (string|null); - /** ResponseMessage endInteraction */ - endInteraction?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null); + /** EventInput parameters */ + parameters?: (google.protobuf.IStruct|null); - /** ResponseMessage telephonyTransferCall */ - telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null); + /** EventInput languageCode */ + languageCode?: (string|null); } - /** Represents a ResponseMessage. */ - class ResponseMessage implements IResponseMessage { + /** Represents an EventInput. */ + class EventInput implements IEventInput { /** - * Constructs a new ResponseMessage. + * Constructs a new EventInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IResponseMessage); - - /** ResponseMessage text. */ - public text?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null); - - /** ResponseMessage payload. */ - public payload?: (google.protobuf.IStruct|null); - - /** ResponseMessage liveAgentHandoff. */ - public liveAgentHandoff?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IEventInput); - /** ResponseMessage endInteraction. */ - public endInteraction?: (google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null); + /** EventInput name. */ + public name: string; - /** ResponseMessage telephonyTransferCall. */ - public telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null); + /** EventInput parameters. */ + public parameters?: (google.protobuf.IStruct|null); - /** ResponseMessage message. */ - public message?: ("text"|"payload"|"liveAgentHandoff"|"endInteraction"|"telephonyTransferCall"); + /** EventInput languageCode. */ + public languageCode: string; /** - * Creates a new ResponseMessage instance using the specified properties. + * Creates a new EventInput instance using the specified properties. * @param [properties] Properties to set - * @returns ResponseMessage instance + * @returns EventInput instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IResponseMessage): google.cloud.dialogflow.v2beta1.ResponseMessage; + public static create(properties?: google.cloud.dialogflow.v2beta1.IEventInput): google.cloud.dialogflow.v2beta1.EventInput; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. - * @param message ResponseMessage message or plain object to encode + * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResponseMessage 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 ResponseMessage + * @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.v2beta1.ResponseMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.EventInput; /** - * Decodes a ResponseMessage 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 ResponseMessage + * @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.v2beta1.ResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.EventInput; /** - * Verifies a ResponseMessage 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 ResponseMessage 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 ResponseMessage + * @returns EventInput */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ResponseMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EventInput; /** - * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. - * @param message ResponseMessage + * 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.v2beta1.ResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.EventInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResponseMessage to JSON. + * Converts this EventInput to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResponseMessage { - - /** Properties of a Text. */ - interface IText { + /** Properties of a SentimentAnalysisRequestConfig. */ + interface ISentimentAnalysisRequestConfig { - /** Text text */ - text?: (string[]|null); - } + /** SentimentAnalysisRequestConfig analyzeQueryTextSentiment */ + analyzeQueryTextSentiment?: (boolean|null); + } - /** Represents a Text. */ - class Text implements IText { + /** Represents a SentimentAnalysisRequestConfig. */ + class SentimentAnalysisRequestConfig implements ISentimentAnalysisRequestConfig { - /** - * Constructs a new Text. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.IText); + /** + * Constructs a new SentimentAnalysisRequestConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig); - /** Text text. */ - public text: string[]; + /** SentimentAnalysisRequestConfig analyzeQueryTextSentiment. */ + public analyzeQueryTextSentiment: 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.v2beta1.ResponseMessage.IText): google.cloud.dialogflow.v2beta1.ResponseMessage.Text; + /** + * Creates a new SentimentAnalysisRequestConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SentimentAnalysisRequestConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig): google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig; - /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SentimentAnalysisRequestConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. + * @param message SentimentAnalysisRequestConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SentimentAnalysisRequestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. + * @param message SentimentAnalysisRequestConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig, 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.v2beta1.ResponseMessage.Text; + /** + * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SentimentAnalysisRequestConfig + * @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.v2beta1.SentimentAnalysisRequestConfig; - /** - * 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.v2beta1.ResponseMessage.Text; + /** + * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SentimentAnalysisRequestConfig + * @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.v2beta1.SentimentAnalysisRequestConfig; - /** - * 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); + /** + * Verifies a SentimentAnalysisRequestConfig 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.v2beta1.ResponseMessage.Text; + /** + * Creates a SentimentAnalysisRequestConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SentimentAnalysisRequestConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig; - /** - * 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.v2beta1.ResponseMessage.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a SentimentAnalysisRequestConfig message. Also converts values to other types if specified. + * @param message SentimentAnalysisRequestConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Text to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this SentimentAnalysisRequestConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a LiveAgentHandoff. */ - interface ILiveAgentHandoff { + /** Properties of a SentimentAnalysisResult. */ + interface ISentimentAnalysisResult { - /** LiveAgentHandoff metadata */ - metadata?: (google.protobuf.IStruct|null); - } + /** SentimentAnalysisResult queryTextSentiment */ + queryTextSentiment?: (google.cloud.dialogflow.v2beta1.ISentiment|null); + } - /** Represents a LiveAgentHandoff. */ - class LiveAgentHandoff implements ILiveAgentHandoff { + /** Represents a SentimentAnalysisResult. */ + class SentimentAnalysisResult implements ISentimentAnalysisResult { - /** - * Constructs a new LiveAgentHandoff. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff); + /** + * Constructs a new SentimentAnalysisResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult); - /** LiveAgentHandoff metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** SentimentAnalysisResult queryTextSentiment. */ + public queryTextSentiment?: (google.cloud.dialogflow.v2beta1.ISentiment|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.v2beta1.ResponseMessage.ILiveAgentHandoff): google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff; + /** + * Creates a new SentimentAnalysisResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SentimentAnalysisResult instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult): google.cloud.dialogflow.v2beta1.SentimentAnalysisResult; - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.ILiveAgentHandoff, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISentimentAnalysisResult, 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.v2beta1.ResponseMessage.LiveAgentHandoff; + /** + * 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 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.v2beta1.SentimentAnalysisResult; - /** - * 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.v2beta1.ResponseMessage.LiveAgentHandoff; + /** + * Decodes a SentimentAnalysisResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.SentimentAnalysisResult; - /** - * 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); + /** + * 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 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.v2beta1.ResponseMessage.LiveAgentHandoff; + /** + * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SentimentAnalysisResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SentimentAnalysisResult; - /** - * 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.v2beta1.ResponseMessage.LiveAgentHandoff, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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.v2beta1.SentimentAnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this LiveAgentHandoff to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this SentimentAnalysisResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an EndInteraction. */ - interface IEndInteraction { - } + /** Properties of a Sentiment. */ + interface ISentiment { - /** Represents an EndInteraction. */ - class EndInteraction implements IEndInteraction { + /** Sentiment score */ + score?: (number|null); - /** - * Constructs a new EndInteraction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction); + /** Sentiment magnitude */ + magnitude?: (number|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.v2beta1.ResponseMessage.IEndInteraction): google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction; - - /** - * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.IEndInteraction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.ResponseMessage.EndInteraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndInteraction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TelephonyTransferCall. */ - interface ITelephonyTransferCall { - - /** TelephonyTransferCall phoneNumber */ - phoneNumber?: (string|null); - - /** TelephonyTransferCall sipUri */ - sipUri?: (string|null); - } - - /** Represents a TelephonyTransferCall. */ - class TelephonyTransferCall implements ITelephonyTransferCall { - - /** - * Constructs a new TelephonyTransferCall. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall); - - /** TelephonyTransferCall phoneNumber. */ - public phoneNumber?: (string|null); - - /** TelephonyTransferCall sipUri. */ - public sipUri?: (string|null); - - /** TelephonyTransferCall endpoint. */ - public endpoint?: ("phoneNumber"|"sipUri"); - - /** - * Creates a new TelephonyTransferCall instance using the specified properties. - * @param [properties] Properties to set - * @returns TelephonyTransferCall instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall): google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @param message TelephonyTransferCall message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @param message TelephonyTransferCall message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TelephonyTransferCall - * @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.v2beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TelephonyTransferCall - * @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.v2beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Verifies a TelephonyTransferCall 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 TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TelephonyTransferCall - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall; - - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @param message TelephonyTransferCall - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TelephonyTransferCall to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GcsSources. */ - interface IGcsSources { - - /** GcsSources uris */ - uris?: (string[]|null); - } - - /** Represents a GcsSources. */ - class GcsSources implements IGcsSources { + /** Represents a Sentiment. */ + class Sentiment implements ISentiment { /** - * Constructs a new GcsSources. + * Constructs a new Sentiment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGcsSources); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISentiment); - /** GcsSources uris. */ - public uris: string[]; + /** Sentiment score. */ + public score: number; + + /** Sentiment magnitude. */ + public magnitude: number; /** - * Creates a new GcsSources instance using the specified properties. + * Creates a new Sentiment instance using the specified properties. * @param [properties] Properties to set - * @returns GcsSources instance + * @returns Sentiment instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGcsSources): google.cloud.dialogflow.v2beta1.GcsSources; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISentiment): google.cloud.dialogflow.v2beta1.Sentiment; /** - * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. - * @param message GcsSources message or plain object to encode + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. - * @param message GcsSources message or plain object to encode + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. + * @param message Sentiment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsSources message from the specified reader or buffer. + * Decodes a Sentiment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsSources + * @returns Sentiment * @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.v2beta1.GcsSources; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Sentiment; /** - * Decodes a GcsSources message from the specified reader or buffer, length delimited. + * Decodes a Sentiment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsSources + * @returns Sentiment * @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.v2beta1.GcsSources; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Sentiment; /** - * Verifies a GcsSources message. + * Verifies a Sentiment 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 GcsSources message from a plain object. Also converts values to their respective internal types. + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsSources + * @returns Sentiment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GcsSources; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Sentiment; /** - * Creates a plain object from a GcsSources message. Also converts values to other types if specified. - * @param message GcsSources + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. + * @param message Sentiment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GcsSources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Sentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsSources to JSON. + * Converts this Sentiment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GcsSource. */ - interface IGcsSource { - - /** GcsSource uri */ - uri?: (string|null); - } - - /** Represents a GcsSource. */ - class GcsSource implements IGcsSource { + /** Represents a Contexts */ + class Contexts extends $protobuf.rpc.Service { /** - * Constructs a new GcsSource. - * @param [properties] Properties to set + * Constructs a new Contexts 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.v2beta1.IGcsSource); - - /** GcsSource uri. */ - public uri: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new GcsSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsSource instance + * Creates new Contexts 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(properties?: google.cloud.dialogflow.v2beta1.IGcsSource): google.cloud.dialogflow.v2beta1.GcsSource; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Contexts; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListContexts. + * @param request ListContextsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListContextsResponse */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public listContexts(request: google.cloud.dialogflow.v2beta1.IListContextsRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.ListContextsCallback): void; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListContexts. + * @param request ListContextsRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public listContexts(request: google.cloud.dialogflow.v2beta1.IListContextsRequest): Promise; /** - * Decodes a GcsSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetContext. + * @param request GetContextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Context */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GcsSource; + public getContext(request: google.cloud.dialogflow.v2beta1.IGetContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.GetContextCallback): void; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetContext. + * @param request GetContextRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GcsSource; + public getContext(request: google.cloud.dialogflow.v2beta1.IGetContextRequest): Promise; /** - * Verifies a GcsSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateContext. + * @param request CreateContextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Context */ - public static verify(message: { [k: string]: any }): (string|null); + public createContext(request: google.cloud.dialogflow.v2beta1.ICreateContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.CreateContextCallback): void; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsSource + * Calls CreateContext. + * @param request CreateContextRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GcsSource; + public createContext(request: google.cloud.dialogflow.v2beta1.ICreateContextRequest): Promise; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @param message GcsSource - * @param [options] Conversion options - * @returns Plain object + * Calls UpdateContext. + * @param request UpdateContextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Context */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateContext(request: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.UpdateContextCallback): void; /** - * Converts this GcsSource to JSON. - * @returns JSON object + * Calls UpdateContext. + * @param request UpdateContextRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } - - /** Represents a Sessions */ - class Sessions extends $protobuf.rpc.Service { + public updateContext(request: google.cloud.dialogflow.v2beta1.IUpdateContextRequest): Promise; /** - * 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 + * Calls DeleteContext. + * @param request DeleteContextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public deleteContext(request: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.DeleteContextCallback): void; /** - * 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. + * Calls DeleteContext. + * @param request DeleteContextRequest message or plain object + * @returns Promise */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions; + public deleteContext(request: google.cloud.dialogflow.v2beta1.IDeleteContextRequest): Promise; /** - * Calls DetectIntent. - * @param request DetectIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DetectIntentResponse + * Calls DeleteAllContexts. + * @param request DeleteAllContextsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.DetectIntentCallback): void; + public deleteAllContexts(request: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContextsCallback): void; /** - * Calls DetectIntent. - * @param request DetectIntentRequest message or plain object + * Calls DeleteAllContexts. + * @param request DeleteAllContextsRequest message or plain object * @returns Promise */ - public detectIntent(request: google.cloud.dialogflow.v2beta1.IDetectIntentRequest): Promise; + public deleteAllContexts(request: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest): Promise; + } + + namespace Contexts { /** - * Calls StreamingDetectIntent. - * @param request StreamingDetectIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StreamingDetectIntentResponse + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#listContexts}. + * @param error Error, if any + * @param [response] ListContextsResponse */ - public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntentCallback): void; + type ListContextsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListContextsResponse) => void; /** - * Calls StreamingDetectIntent. - * @param request StreamingDetectIntentRequest message or plain object - * @returns Promise + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#getContext}. + * @param error Error, if any + * @param [response] Context */ - public streamingDetectIntent(request: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest): Promise; - } - - namespace Sessions { + type GetContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#detectIntent}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#createContext}. * @param error Error, if any - * @param [response] DetectIntentResponse + * @param [response] Context */ - type DetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.DetectIntentResponse) => void; + type CreateContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#streamingDetectIntent}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#updateContext}. * @param error Error, if any - * @param [response] StreamingDetectIntentResponse + * @param [response] Context */ - type StreamingDetectIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse) => void; - } - - /** Properties of a DetectIntentRequest. */ - interface IDetectIntentRequest { + type UpdateContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; - /** DetectIntentRequest session */ - session?: (string|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteContext}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteContextCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - /** DetectIntentRequest queryParams */ - queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteAllContexts}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAllContextsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } - /** DetectIntentRequest queryInput */ - queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); + /** Properties of a Context. */ + interface IContext { - /** DetectIntentRequest outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** Context name */ + name?: (string|null); - /** DetectIntentRequest outputAudioConfigMask */ - outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + /** Context lifespanCount */ + lifespanCount?: (number|null); - /** DetectIntentRequest inputAudio */ - inputAudio?: (Uint8Array|string|null); + /** Context parameters */ + parameters?: (google.protobuf.IStruct|null); } - /** Represents a DetectIntentRequest. */ - class DetectIntentRequest implements IDetectIntentRequest { + /** Represents a Context. */ + class Context implements IContext { /** - * Constructs a new DetectIntentRequest. + * Constructs a new Context. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentRequest); - - /** DetectIntentRequest session. */ - public session: string; - - /** DetectIntentRequest queryParams. */ - public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - - /** DetectIntentRequest queryInput. */ - public queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IContext); - /** DetectIntentRequest outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** Context name. */ + public name: string; - /** DetectIntentRequest outputAudioConfigMask. */ - public outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + /** Context lifespanCount. */ + public lifespanCount: number; - /** DetectIntentRequest inputAudio. */ - public inputAudio: (Uint8Array|string); + /** Context parameters. */ + public parameters?: (google.protobuf.IStruct|null); /** - * Creates a new DetectIntentRequest instance using the specified properties. + * Creates a new Context instance using the specified properties. * @param [properties] Properties to set - * @returns DetectIntentRequest instance + * @returns Context instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentRequest): google.cloud.dialogflow.v2beta1.DetectIntentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IContext): google.cloud.dialogflow.v2beta1.Context; /** - * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. - * @param message DetectIntentRequest message or plain object to encode + * Encodes the specified Context message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. + * @param message Context message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. - * @param message DetectIntentRequest message or plain object to encode + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. + * @param message Context message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer. + * Decodes a Context 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 Context * @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.v2beta1.DetectIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Context; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a Context message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DetectIntentRequest + * @returns Context * @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.v2beta1.DetectIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Context; /** - * Verifies a DetectIntentRequest message. + * Verifies a Context 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 Context message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DetectIntentRequest + * @returns Context */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DetectIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Context; /** - * 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 Context message. Also converts values to other types if specified. + * @param message Context * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DetectIntentRequest to JSON. + * Converts this Context 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.v2beta1.IQueryResult|null); - - /** DetectIntentResponse alternativeQueryResults */ - alternativeQueryResults?: (google.cloud.dialogflow.v2beta1.IQueryResult[]|null); + /** Properties of a ListContextsRequest. */ + interface IListContextsRequest { - /** DetectIntentResponse webhookStatus */ - webhookStatus?: (google.rpc.IStatus|null); + /** ListContextsRequest parent */ + parent?: (string|null); - /** DetectIntentResponse outputAudio */ - outputAudio?: (Uint8Array|string|null); + /** ListContextsRequest pageSize */ + pageSize?: (number|null); - /** DetectIntentResponse outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** ListContextsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DetectIntentResponse. */ - class DetectIntentResponse implements IDetectIntentResponse { + /** Represents a ListContextsRequest. */ + class ListContextsRequest implements IListContextsRequest { /** - * Constructs a new DetectIntentResponse. + * Constructs a new ListContextsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentResponse); - - /** DetectIntentResponse responseId. */ - public responseId: string; - - /** DetectIntentResponse queryResult. */ - public queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); - - /** DetectIntentResponse alternativeQueryResults. */ - public alternativeQueryResults: google.cloud.dialogflow.v2beta1.IQueryResult[]; + constructor(properties?: google.cloud.dialogflow.v2beta1.IListContextsRequest); - /** DetectIntentResponse webhookStatus. */ - public webhookStatus?: (google.rpc.IStatus|null); + /** ListContextsRequest parent. */ + public parent: string; - /** DetectIntentResponse outputAudio. */ - public outputAudio: (Uint8Array|string); + /** ListContextsRequest pageSize. */ + public pageSize: number; - /** DetectIntentResponse outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** ListContextsRequest pageToken. */ + public pageToken: string; /** - * Creates a new DetectIntentResponse instance using the specified properties. + * Creates a new ListContextsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DetectIntentResponse instance + * @returns ListContextsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDetectIntentResponse): google.cloud.dialogflow.v2beta1.DetectIntentResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListContextsRequest): google.cloud.dialogflow.v2beta1.ListContextsRequest; /** - * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. - * @param message DetectIntentResponse message or plain object to encode + * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. + * @param message ListContextsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. - * @param message DetectIntentResponse message or plain object to encode + * Encodes the specified ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. + * @param message ListContextsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer. + * Decodes a ListContextsRequest 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 ListContextsRequest * @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.v2beta1.DetectIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListContextsRequest; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DetectIntentResponse + * @returns ListContextsRequest * @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.v2beta1.DetectIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListContextsRequest; /** - * Verifies a DetectIntentResponse message. + * Verifies a ListContextsRequest 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 ListContextsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DetectIntentResponse + * @returns ListContextsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DetectIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListContextsRequest; /** - * 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 ListContextsRequest message. Also converts values to other types if specified. + * @param message ListContextsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListContextsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DetectIntentResponse to JSON. + * Converts this ListContextsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryParameters. */ - interface IQueryParameters { - - /** QueryParameters timeZone */ - timeZone?: (string|null); - - /** QueryParameters geoLocation */ - geoLocation?: (google.type.ILatLng|null); + /** Properties of a ListContextsResponse. */ + interface IListContextsResponse { - /** QueryParameters contexts */ + /** ListContextsResponse contexts */ contexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); - /** QueryParameters resetContexts */ - resetContexts?: (boolean|null); - - /** QueryParameters sessionEntityTypes */ - sessionEntityTypes?: (google.cloud.dialogflow.v2beta1.ISessionEntityType[]|null); - - /** QueryParameters payload */ - payload?: (google.protobuf.IStruct|null); - - /** QueryParameters knowledgeBaseNames */ - knowledgeBaseNames?: (string[]|null); - - /** QueryParameters sentimentAnalysisRequestConfig */ - sentimentAnalysisRequestConfig?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null); - - /** QueryParameters subAgents */ - subAgents?: (google.cloud.dialogflow.v2beta1.ISubAgent[]|null); - - /** QueryParameters webhookHeaders */ - webhookHeaders?: ({ [k: string]: string }|null); + /** ListContextsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a QueryParameters. */ - class QueryParameters implements IQueryParameters { + /** Represents a ListContextsResponse. */ + class ListContextsResponse implements IListContextsResponse { /** - * Constructs a new QueryParameters. + * Constructs a new ListContextsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryParameters); - - /** QueryParameters timeZone. */ - public timeZone: string; - - /** QueryParameters geoLocation. */ - public geoLocation?: (google.type.ILatLng|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListContextsResponse); - /** QueryParameters contexts. */ + /** ListContextsResponse contexts. */ public contexts: google.cloud.dialogflow.v2beta1.IContext[]; - /** QueryParameters resetContexts. */ - public resetContexts: boolean; - - /** QueryParameters sessionEntityTypes. */ - public sessionEntityTypes: google.cloud.dialogflow.v2beta1.ISessionEntityType[]; - - /** QueryParameters payload. */ - public payload?: (google.protobuf.IStruct|null); - - /** QueryParameters knowledgeBaseNames. */ - public knowledgeBaseNames: string[]; - - /** QueryParameters sentimentAnalysisRequestConfig. */ - public sentimentAnalysisRequestConfig?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null); - - /** QueryParameters subAgents. */ - public subAgents: google.cloud.dialogflow.v2beta1.ISubAgent[]; - - /** QueryParameters webhookHeaders. */ - public webhookHeaders: { [k: string]: string }; + /** ListContextsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new QueryParameters instance using the specified properties. + * Creates a new ListContextsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns QueryParameters instance + * @returns ListContextsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryParameters): google.cloud.dialogflow.v2beta1.QueryParameters; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListContextsResponse): google.cloud.dialogflow.v2beta1.ListContextsResponse; /** - * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. - * @param message QueryParameters message or plain object to encode + * Encodes the specified ListContextsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. + * @param message ListContextsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListContextsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. - * @param message QueryParameters message or plain object to encode + * Encodes the specified ListContextsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. + * @param message ListContextsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryParameters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListContextsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryParameters message from the specified reader or buffer. + * Decodes a ListContextsResponse 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 ListContextsResponse * @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.v2beta1.QueryParameters; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListContextsResponse; /** - * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * Decodes a ListContextsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryParameters + * @returns ListContextsResponse * @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.v2beta1.QueryParameters; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListContextsResponse; /** - * Verifies a QueryParameters message. + * Verifies a ListContextsResponse 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 ListContextsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryParameters + * @returns ListContextsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryParameters; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListContextsResponse; /** - * 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 ListContextsResponse message. Also converts values to other types if specified. + * @param message ListContextsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.QueryParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListContextsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryParameters to JSON. + * Converts this ListContextsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryInput. */ - interface IQueryInput { - - /** QueryInput audioConfig */ - audioConfig?: (google.cloud.dialogflow.v2beta1.IInputAudioConfig|null); - - /** QueryInput text */ - text?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - - /** QueryInput event */ - event?: (google.cloud.dialogflow.v2beta1.IEventInput|null); + /** Properties of a GetContextRequest. */ + interface IGetContextRequest { - /** QueryInput dtmf */ - dtmf?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); + /** GetContextRequest name */ + name?: (string|null); } - /** Represents a QueryInput. */ - class QueryInput implements IQueryInput { + /** Represents a GetContextRequest. */ + class GetContextRequest implements IGetContextRequest { /** - * Constructs a new QueryInput. + * Constructs a new GetContextRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryInput); - - /** QueryInput audioConfig. */ - public audioConfig?: (google.cloud.dialogflow.v2beta1.IInputAudioConfig|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetContextRequest); - /** QueryInput text. */ - public text?: (google.cloud.dialogflow.v2beta1.ITextInput|null); - - /** QueryInput event. */ - public event?: (google.cloud.dialogflow.v2beta1.IEventInput|null); - - /** QueryInput dtmf. */ - public dtmf?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); - - /** QueryInput input. */ - public input?: ("audioConfig"|"text"|"event"|"dtmf"); + /** GetContextRequest name. */ + public name: string; /** - * Creates a new QueryInput instance using the specified properties. + * Creates a new GetContextRequest instance using the specified properties. * @param [properties] Properties to set - * @returns QueryInput instance + * @returns GetContextRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryInput): google.cloud.dialogflow.v2beta1.QueryInput; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetContextRequest): google.cloud.dialogflow.v2beta1.GetContextRequest; /** - * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. - * @param message QueryInput message or plain object to encode + * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. + * @param message GetContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. - * @param message QueryInput message or plain object to encode + * Encodes the specified GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. + * @param message GetContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryInput, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryInput message from the specified reader or buffer. + * Decodes a GetContextRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryInput + * @returns GetContextRequest * @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.v2beta1.QueryInput; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetContextRequest; /** - * Decodes a QueryInput message from the specified reader or buffer, length delimited. + * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryInput + * @returns GetContextRequest * @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.v2beta1.QueryInput; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetContextRequest; /** - * Verifies a QueryInput message. + * Verifies a GetContextRequest 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 QueryInput message from a plain object. Also converts values to their respective internal types. + * Creates a GetContextRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryInput + * @returns GetContextRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryInput; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetContextRequest; /** - * Creates a plain object from a QueryInput message. Also converts values to other types if specified. - * @param message QueryInput + * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. + * @param message GetContextRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.QueryInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryInput to JSON. + * Converts this GetContextRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** QueryResult queryText */ - queryText?: (string|null); - - /** QueryResult languageCode */ - languageCode?: (string|null); - - /** QueryResult speechRecognitionConfidence */ - speechRecognitionConfidence?: (number|null); - - /** QueryResult action */ - action?: (string|null); - - /** QueryResult parameters */ - parameters?: (google.protobuf.IStruct|null); - - /** QueryResult allRequiredParamsPresent */ - allRequiredParamsPresent?: (boolean|null); - - /** QueryResult cancelsSlotFilling */ - cancelsSlotFilling?: (boolean|null); - - /** QueryResult fulfillmentText */ - fulfillmentText?: (string|null); - - /** QueryResult fulfillmentMessages */ - fulfillmentMessages?: (google.cloud.dialogflow.v2beta1.Intent.IMessage[]|null); - - /** QueryResult webhookSource */ - webhookSource?: (string|null); - - /** QueryResult webhookPayload */ - webhookPayload?: (google.protobuf.IStruct|null); - - /** QueryResult outputContexts */ - outputContexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); - - /** QueryResult intent */ - intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - - /** QueryResult intentDetectionConfidence */ - intentDetectionConfidence?: (number|null); - - /** QueryResult diagnosticInfo */ - diagnosticInfo?: (google.protobuf.IStruct|null); + /** Properties of a CreateContextRequest. */ + interface ICreateContextRequest { - /** QueryResult sentimentAnalysisResult */ - sentimentAnalysisResult?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + /** CreateContextRequest parent */ + parent?: (string|null); - /** QueryResult knowledgeAnswers */ - knowledgeAnswers?: (google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null); + /** CreateContextRequest context */ + context?: (google.cloud.dialogflow.v2beta1.IContext|null); } - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { + /** Represents a CreateContextRequest. */ + class CreateContextRequest implements ICreateContextRequest { /** - * Constructs a new QueryResult. + * Constructs a new CreateContextRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IQueryResult); - - /** QueryResult queryText. */ - public queryText: string; - - /** QueryResult languageCode. */ - public languageCode: string; - - /** QueryResult speechRecognitionConfidence. */ - public speechRecognitionConfidence: number; - - /** QueryResult action. */ - public action: string; - - /** QueryResult parameters. */ - public parameters?: (google.protobuf.IStruct|null); - - /** QueryResult allRequiredParamsPresent. */ - public allRequiredParamsPresent: boolean; - - /** QueryResult cancelsSlotFilling. */ - public cancelsSlotFilling: boolean; - - /** QueryResult fulfillmentText. */ - public fulfillmentText: string; - - /** QueryResult fulfillmentMessages. */ - public fulfillmentMessages: google.cloud.dialogflow.v2beta1.Intent.IMessage[]; - - /** QueryResult webhookSource. */ - public webhookSource: string; - - /** QueryResult webhookPayload. */ - public webhookPayload?: (google.protobuf.IStruct|null); - - /** QueryResult outputContexts. */ - public outputContexts: google.cloud.dialogflow.v2beta1.IContext[]; - - /** QueryResult intent. */ - public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - - /** QueryResult intentDetectionConfidence. */ - public intentDetectionConfidence: number; - - /** QueryResult diagnosticInfo. */ - public diagnosticInfo?: (google.protobuf.IStruct|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateContextRequest); - /** QueryResult sentimentAnalysisResult. */ - public sentimentAnalysisResult?: (google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null); + /** CreateContextRequest parent. */ + public parent: string; - /** QueryResult knowledgeAnswers. */ - public knowledgeAnswers?: (google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null); + /** CreateContextRequest context. */ + public context?: (google.cloud.dialogflow.v2beta1.IContext|null); /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new CreateContextRequest instance using the specified properties. * @param [properties] Properties to set - * @returns QueryResult instance + * @returns CreateContextRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IQueryResult): google.cloud.dialogflow.v2beta1.QueryResult; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateContextRequest): google.cloud.dialogflow.v2beta1.CreateContextRequest; /** - * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified CreateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. + * @param message CreateContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode + * Encodes the specified CreateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. + * @param message CreateContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a CreateContextRequest 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 CreateContextRequest * @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.v2beta1.QueryResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateContextRequest; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a CreateContextRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryResult + * @returns CreateContextRequest * @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.v2beta1.QueryResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateContextRequest; /** - * Verifies a QueryResult message. + * Verifies a CreateContextRequest 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 CreateContextRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryResult + * @returns CreateContextRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.QueryResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateContextRequest; /** - * 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 CreateContextRequest message. Also converts values to other types if specified. + * @param message CreateContextRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryResult to JSON. + * Converts this CreateContextRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a KnowledgeAnswers. */ - interface IKnowledgeAnswers { + /** Properties of an UpdateContextRequest. */ + interface IUpdateContextRequest { - /** KnowledgeAnswers answers */ - answers?: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer[]|null); + /** UpdateContextRequest context */ + context?: (google.cloud.dialogflow.v2beta1.IContext|null); + + /** UpdateContextRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a KnowledgeAnswers. */ - class KnowledgeAnswers implements IKnowledgeAnswers { + /** Represents an UpdateContextRequest. */ + class UpdateContextRequest implements IUpdateContextRequest { /** - * Constructs a new KnowledgeAnswers. + * Constructs a new UpdateContextRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers); + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateContextRequest); - /** KnowledgeAnswers answers. */ - public answers: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer[]; + /** UpdateContextRequest context. */ + public context?: (google.cloud.dialogflow.v2beta1.IContext|null); + + /** UpdateContextRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new KnowledgeAnswers instance using the specified properties. + * Creates a new UpdateContextRequest instance using the specified properties. * @param [properties] Properties to set - * @returns KnowledgeAnswers instance + * @returns UpdateContextRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers): google.cloud.dialogflow.v2beta1.KnowledgeAnswers; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateContextRequest): google.cloud.dialogflow.v2beta1.UpdateContextRequest; /** - * Encodes the specified KnowledgeAnswers message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. - * @param message KnowledgeAnswers message or plain object to encode + * Encodes the specified UpdateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. + * @param message UpdateContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KnowledgeAnswers message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. - * @param message KnowledgeAnswers message or plain object to encode + * Encodes the specified UpdateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. + * @param message UpdateContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IKnowledgeAnswers, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KnowledgeAnswers message from the specified reader or buffer. + * Decodes an UpdateContextRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KnowledgeAnswers + * @returns UpdateContextRequest * @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.v2beta1.KnowledgeAnswers; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateContextRequest; /** - * Decodes a KnowledgeAnswers message from the specified reader or buffer, length delimited. + * Decodes an UpdateContextRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KnowledgeAnswers + * @returns UpdateContextRequest * @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.v2beta1.KnowledgeAnswers; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateContextRequest; /** - * Verifies a KnowledgeAnswers message. + * Verifies an UpdateContextRequest 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 KnowledgeAnswers message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateContextRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KnowledgeAnswers + * @returns UpdateContextRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeAnswers; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateContextRequest; /** - * Creates a plain object from a KnowledgeAnswers message. Also converts values to other types if specified. - * @param message KnowledgeAnswers + * Creates a plain object from an UpdateContextRequest message. Also converts values to other types if specified. + * @param message UpdateContextRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KnowledgeAnswers to JSON. + * Converts this UpdateContextRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace KnowledgeAnswers { - - /** Properties of an Answer. */ - interface IAnswer { - - /** Answer source */ - source?: (string|null); - - /** Answer faqQuestion */ - faqQuestion?: (string|null); - - /** Answer answer */ - answer?: (string|null); - - /** Answer matchConfidenceLevel */ - matchConfidenceLevel?: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|null); - - /** Answer matchConfidence */ - matchConfidence?: (number|null); - } - - /** Represents an Answer. */ - class Answer implements IAnswer { - - /** - * Constructs a new Answer. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer); - - /** Answer source. */ - public source: string; - - /** Answer faqQuestion. */ - public faqQuestion: string; - - /** Answer answer. */ - public answer: string; - - /** Answer matchConfidenceLevel. */ - public matchConfidenceLevel: (google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel); - - /** Answer matchConfidence. */ - public matchConfidence: number; - - /** - * Creates a new Answer instance using the specified properties. - * @param [properties] Properties to set - * @returns Answer instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; - - /** - * Encodes the specified Answer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. - * @param message Answer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Answer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. - * @param message Answer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Answer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Answer - * @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.v2beta1.KnowledgeAnswers.Answer; - - /** - * Decodes an Answer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Answer - * @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.v2beta1.KnowledgeAnswers.Answer; - - /** - * Verifies an Answer 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 Answer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Answer - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer; - - /** - * Creates a plain object from an Answer message. Also converts values to other types if specified. - * @param message Answer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Answer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Answer { - - /** MatchConfidenceLevel enum. */ - enum MatchConfidenceLevel { - MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0, - LOW = 1, - MEDIUM = 2, - HIGH = 3 - } - } - } - - /** Properties of a StreamingDetectIntentRequest. */ - interface IStreamingDetectIntentRequest { - - /** StreamingDetectIntentRequest session */ - session?: (string|null); - - /** StreamingDetectIntentRequest queryParams */ - queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - - /** StreamingDetectIntentRequest queryInput */ - queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); - - /** StreamingDetectIntentRequest singleUtterance */ - singleUtterance?: (boolean|null); - - /** StreamingDetectIntentRequest outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); - - /** StreamingDetectIntentRequest outputAudioConfigMask */ - outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + /** Properties of a DeleteContextRequest. */ + interface IDeleteContextRequest { - /** StreamingDetectIntentRequest inputAudio */ - inputAudio?: (Uint8Array|string|null); + /** DeleteContextRequest name */ + name?: (string|null); } - /** Represents a StreamingDetectIntentRequest. */ - class StreamingDetectIntentRequest implements IStreamingDetectIntentRequest { + /** Represents a DeleteContextRequest. */ + class DeleteContextRequest implements IDeleteContextRequest { /** - * Constructs a new StreamingDetectIntentRequest. + * Constructs a new DeleteContextRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest); - - /** StreamingDetectIntentRequest session. */ - public session: string; - - /** StreamingDetectIntentRequest queryParams. */ - public queryParams?: (google.cloud.dialogflow.v2beta1.IQueryParameters|null); - - /** StreamingDetectIntentRequest queryInput. */ - public queryInput?: (google.cloud.dialogflow.v2beta1.IQueryInput|null); - - /** StreamingDetectIntentRequest singleUtterance. */ - public singleUtterance: boolean; - - /** StreamingDetectIntentRequest outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); - - /** StreamingDetectIntentRequest outputAudioConfigMask. */ - public outputAudioConfigMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteContextRequest); - /** StreamingDetectIntentRequest inputAudio. */ - public inputAudio: (Uint8Array|string); + /** DeleteContextRequest name. */ + public name: string; /** - * Creates a new StreamingDetectIntentRequest instance using the specified properties. + * Creates a new DeleteContextRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingDetectIntentRequest instance + * @returns DeleteContextRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteContextRequest): google.cloud.dialogflow.v2beta1.DeleteContextRequest; /** - * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. - * @param message StreamingDetectIntentRequest message or plain object to encode + * Encodes the specified DeleteContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. + * @param message DeleteContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. - * @param message StreamingDetectIntentRequest message or plain object to encode + * Encodes the specified DeleteContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. + * @param message DeleteContextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. + * Decodes a DeleteContextRequest 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 DeleteContextRequest * @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.v2beta1.StreamingDetectIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteContextRequest; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteContextRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingDetectIntentRequest + * @returns DeleteContextRequest * @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.v2beta1.StreamingDetectIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteContextRequest; /** - * Verifies a StreamingDetectIntentRequest message. + * Verifies a DeleteContextRequest 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 DeleteContextRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingDetectIntentRequest + * @returns DeleteContextRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteContextRequest; /** - * 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 DeleteContextRequest message. Also converts values to other types if specified. + * @param message DeleteContextRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingDetectIntentRequest to JSON. + * Converts this DeleteContextRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamingDetectIntentResponse. */ - interface IStreamingDetectIntentResponse { - - /** StreamingDetectIntentResponse responseId */ - responseId?: (string|null); - - /** StreamingDetectIntentResponse recognitionResult */ - recognitionResult?: (google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null); - - /** StreamingDetectIntentResponse queryResult */ - queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); - - /** StreamingDetectIntentResponse alternativeQueryResults */ - alternativeQueryResults?: (google.cloud.dialogflow.v2beta1.IQueryResult[]|null); - - /** StreamingDetectIntentResponse webhookStatus */ - webhookStatus?: (google.rpc.IStatus|null); - - /** StreamingDetectIntentResponse outputAudio */ - outputAudio?: (Uint8Array|string|null); + /** Properties of a DeleteAllContextsRequest. */ + interface IDeleteAllContextsRequest { - /** StreamingDetectIntentResponse outputAudioConfig */ - outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** DeleteAllContextsRequest parent */ + parent?: (string|null); } - /** Represents a StreamingDetectIntentResponse. */ - class StreamingDetectIntentResponse implements IStreamingDetectIntentResponse { + /** Represents a DeleteAllContextsRequest. */ + class DeleteAllContextsRequest implements IDeleteAllContextsRequest { /** - * Constructs a new StreamingDetectIntentResponse. + * Constructs a new DeleteAllContextsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse); - - /** StreamingDetectIntentResponse responseId. */ - public responseId: string; - - /** StreamingDetectIntentResponse recognitionResult. */ - public recognitionResult?: (google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null); - - /** StreamingDetectIntentResponse queryResult. */ - public queryResult?: (google.cloud.dialogflow.v2beta1.IQueryResult|null); - - /** StreamingDetectIntentResponse alternativeQueryResults. */ - public alternativeQueryResults: google.cloud.dialogflow.v2beta1.IQueryResult[]; - - /** StreamingDetectIntentResponse webhookStatus. */ - public webhookStatus?: (google.rpc.IStatus|null); - - /** StreamingDetectIntentResponse outputAudio. */ - public outputAudio: (Uint8Array|string); + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest); - /** StreamingDetectIntentResponse outputAudioConfig. */ - public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** DeleteAllContextsRequest parent. */ + public parent: string; /** - * Creates a new StreamingDetectIntentResponse instance using the specified properties. + * Creates a new DeleteAllContextsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StreamingDetectIntentResponse instance + * @returns DeleteAllContextsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; /** - * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. - * @param message StreamingDetectIntentResponse message or plain object to encode + * Encodes the specified DeleteAllContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. + * @param message DeleteAllContextsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. - * @param message StreamingDetectIntentResponse message or plain object to encode + * Encodes the specified DeleteAllContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. + * @param message DeleteAllContextsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. + * Decodes a DeleteAllContextsRequest 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 DeleteAllContextsRequest * @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.v2beta1.StreamingDetectIntentResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteAllContextsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamingDetectIntentResponse + * @returns DeleteAllContextsRequest * @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.v2beta1.StreamingDetectIntentResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; /** - * Verifies a StreamingDetectIntentResponse message. + * Verifies a DeleteAllContextsRequest 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 DeleteAllContextsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamingDetectIntentResponse + * @returns DeleteAllContextsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; /** - * 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 DeleteAllContextsRequest message. Also converts values to other types if specified. + * @param message DeleteAllContextsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamingDetectIntentResponse to JSON. + * Converts this DeleteAllContextsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a StreamingRecognitionResult. */ - interface IStreamingRecognitionResult { - - /** StreamingRecognitionResult messageType */ - messageType?: (google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|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.v2beta1.ISpeechWordInfo[]|null); - - /** StreamingRecognitionResult speechEndOffset */ - speechEndOffset?: (google.protobuf.IDuration|null); - - /** StreamingRecognitionResult languageCode */ - languageCode?: (string|null); - - /** StreamingRecognitionResult dtmfDigits */ - dtmfDigits?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); - } - - /** Represents a StreamingRecognitionResult. */ - class StreamingRecognitionResult implements IStreamingRecognitionResult { + /** Represents an Intents */ + class Intents extends $protobuf.rpc.Service { /** - * Constructs a new StreamingRecognitionResult. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult); - - /** StreamingRecognitionResult messageType. */ - public messageType: (google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType|keyof typeof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType); - - /** 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.v2beta1.ISpeechWordInfo[]; - - /** StreamingRecognitionResult speechEndOffset. */ - public speechEndOffset?: (google.protobuf.IDuration|null); - - /** StreamingRecognitionResult languageCode. */ - public languageCode: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** StreamingRecognitionResult dtmfDigits. */ - public dtmfDigits?: (google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null); + /** + * 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 static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Intents; /** - * Creates a new StreamingRecognitionResult instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamingRecognitionResult instance + * Calls ListIntents. + * @param request ListIntentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIntentsResponse */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; + public listIntents(request: google.cloud.dialogflow.v2beta1.IListIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.ListIntentsCallback): void; /** - * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. - * @param message StreamingRecognitionResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListIntents. + * @param request ListIntentsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public listIntents(request: google.cloud.dialogflow.v2beta1.IListIntentsRequest): Promise; /** - * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. - * @param message StreamingRecognitionResult 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 encodeDelimited(message: google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult, writer?: $protobuf.Writer): $protobuf.Writer; + public getIntent(request: google.cloud.dialogflow.v2beta1.IGetIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.GetIntentCallback): void; /** - * 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 StreamingRecognitionResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetIntent. + * @param request GetIntentRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; + public getIntent(request: google.cloud.dialogflow.v2beta1.IGetIntentRequest): Promise; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamingRecognitionResult - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; + public createIntent(request: google.cloud.dialogflow.v2beta1.ICreateIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.CreateIntentCallback): void; /** - * Verifies a StreamingRecognitionResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls CreateIntent. + * @param request CreateIntentRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public createIntent(request: google.cloud.dialogflow.v2beta1.ICreateIntentRequest): Promise; /** - * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamingRecognitionResult + * Calls UpdateIntent. + * @param request UpdateIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Intent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.StreamingRecognitionResult; + public updateIntent(request: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.UpdateIntentCallback): void; /** - * 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 + * Calls UpdateIntent. + * @param request UpdateIntentRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.v2beta1.StreamingRecognitionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public updateIntent(request: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest): Promise; /** - * Converts this StreamingRecognitionResult to JSON. - * @returns JSON object + * Calls DeleteIntent. + * @param request DeleteIntentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public toJSON(): { [k: string]: any }; - } - - namespace StreamingRecognitionResult { - - /** MessageType enum. */ - enum MessageType { - MESSAGE_TYPE_UNSPECIFIED = 0, - TRANSCRIPT = 1, - DTMF_DIGITS = 3, - END_OF_SINGLE_UTTERANCE = 2, - PARTIAL_DTMF_DIGITS = 4 - } - } - - /** Properties of a TextInput. */ - interface ITextInput { - - /** TextInput text */ - text?: (string|null); - - /** TextInput languageCode */ - languageCode?: (string|null); - } - - /** Represents a TextInput. */ - class TextInput implements ITextInput { + public deleteIntent(request: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.DeleteIntentCallback): void; /** - * Constructs a new TextInput. - * @param [properties] Properties to set + * Calls DeleteIntent. + * @param request DeleteIntentRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ITextInput); + public deleteIntent(request: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest): Promise; - /** TextInput text. */ - public text: string; + /** + * Calls BatchUpdateIntents. + * @param request BatchUpdateIntentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchUpdateIntents(request: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntentsCallback): void; - /** TextInput languageCode. */ - public languageCode: string; + /** + * Calls BatchUpdateIntents. + * @param request BatchUpdateIntentsRequest message or plain object + * @returns Promise + */ + public batchUpdateIntents(request: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest): Promise; /** - * Creates a new TextInput instance using the specified properties. - * @param [properties] Properties to set - * @returns TextInput instance + * Calls BatchDeleteIntents. + * @param request BatchDeleteIntentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ITextInput): google.cloud.dialogflow.v2beta1.TextInput; + public batchDeleteIntents(request: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntentsCallback): void; /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls BatchDeleteIntents. + * @param request BatchDeleteIntentsRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.v2beta1.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + public batchDeleteIntents(request: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest): Promise; + } + + namespace Intents { /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. - * @param message TextInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#listIntents}. + * @param error Error, if any + * @param [response] ListIntentsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITextInput, writer?: $protobuf.Writer): $protobuf.Writer; + type ListIntentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListIntentsResponse) => void; /** - * 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 TextInput - * @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.v2beta1.Intents#getIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.TextInput; + type GetIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextInput - * @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.v2beta1.Intents#createIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.TextInput; + type CreateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; /** - * Verifies a TextInput 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.v2beta1.Intents#updateIntent}. + * @param error Error, if any + * @param [response] Intent */ - public static verify(message: { [k: string]: any }): (string|null); + type UpdateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextInput + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#deleteIntent}. + * @param error Error, if any + * @param [response] Empty */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TextInput; + type DeleteIntentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * 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 + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchUpdateIntents}. + * @param error Error, if any + * @param [response] Operation */ - public static toObject(message: google.cloud.dialogflow.v2beta1.TextInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type BatchUpdateIntentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Converts this TextInput to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchDeleteIntents}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type BatchDeleteIntentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of an EventInput. */ - interface IEventInput { + /** Properties of an Intent. */ + interface IIntent { - /** EventInput name */ + /** Intent name */ name?: (string|null); - /** EventInput parameters */ - parameters?: (google.protobuf.IStruct|null); + /** Intent displayName */ + displayName?: (string|null); - /** EventInput languageCode */ - languageCode?: (string|null); - } + /** Intent webhookState */ + webhookState?: (google.cloud.dialogflow.v2beta1.Intent.WebhookState|keyof typeof google.cloud.dialogflow.v2beta1.Intent.WebhookState|null); - /** Represents an EventInput. */ - class EventInput implements IEventInput { + /** Intent priority */ + priority?: (number|null); - /** - * Constructs a new EventInput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IEventInput); + /** Intent isFallback */ + isFallback?: (boolean|null); - /** EventInput name. */ - public name: string; + /** Intent mlEnabled */ + mlEnabled?: (boolean|null); - /** EventInput parameters. */ - public parameters?: (google.protobuf.IStruct|null); + /** Intent mlDisabled */ + mlDisabled?: (boolean|null); - /** EventInput languageCode. */ - public languageCode: string; + /** Intent liveAgentHandoff */ + liveAgentHandoff?: (boolean|null); - /** - * Creates a new EventInput instance using the specified properties. - * @param [properties] Properties to set - * @returns EventInput instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IEventInput): google.cloud.dialogflow.v2beta1.EventInput; + /** Intent endInteraction */ + endInteraction?: (boolean|null); - /** - * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; + /** Intent inputContextNames */ + inputContextNames?: (string[]|null); - /** - * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IEventInput, writer?: $protobuf.Writer): $protobuf.Writer; + /** Intent events */ + events?: (string[]|null); - /** - * 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 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.v2beta1.EventInput; + /** Intent trainingPhrases */ + trainingPhrases?: (google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase[]|null); - /** - * Decodes an EventInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.v2beta1.EventInput; + /** Intent action */ + action?: (string|null); - /** - * 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); + /** Intent outputContexts */ + outputContexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); - /** - * Creates an EventInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventInput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EventInput; + /** Intent resetContexts */ + resetContexts?: (boolean|null); - /** - * 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.v2beta1.EventInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Intent parameters */ + parameters?: (google.cloud.dialogflow.v2beta1.Intent.IParameter[]|null); - /** - * Converts this EventInput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Intent messages */ + messages?: (google.cloud.dialogflow.v2beta1.Intent.IMessage[]|null); - /** Properties of a SentimentAnalysisRequestConfig. */ - interface ISentimentAnalysisRequestConfig { + /** Intent defaultResponsePlatforms */ + defaultResponsePlatforms?: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform[]|null); - /** SentimentAnalysisRequestConfig analyzeQueryTextSentiment */ - analyzeQueryTextSentiment?: (boolean|null); + /** Intent rootFollowupIntentName */ + rootFollowupIntentName?: (string|null); + + /** Intent parentFollowupIntentName */ + parentFollowupIntentName?: (string|null); + + /** Intent followupIntentInfo */ + followupIntentInfo?: (google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo[]|null); } - /** Represents a SentimentAnalysisRequestConfig. */ - class SentimentAnalysisRequestConfig implements ISentimentAnalysisRequestConfig { + /** Represents an Intent. */ + class Intent implements IIntent { /** - * Constructs a new SentimentAnalysisRequestConfig. + * Constructs a new Intent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IIntent); - /** SentimentAnalysisRequestConfig analyzeQueryTextSentiment. */ - public analyzeQueryTextSentiment: boolean; + /** Intent name. */ + public name: string; - /** - * Creates a new SentimentAnalysisRequestConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SentimentAnalysisRequestConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig): google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig; + /** Intent displayName. */ + public displayName: string; - /** - * Encodes the specified SentimentAnalysisRequestConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. - * @param message SentimentAnalysisRequestConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Intent webhookState. */ + public webhookState: (google.cloud.dialogflow.v2beta1.Intent.WebhookState|keyof typeof google.cloud.dialogflow.v2beta1.Intent.WebhookState); - /** - * Encodes the specified SentimentAnalysisRequestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. - * @param message SentimentAnalysisRequestConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Intent priority. */ + public priority: number; - /** - * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SentimentAnalysisRequestConfig - * @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.v2beta1.SentimentAnalysisRequestConfig; + /** Intent isFallback. */ + public isFallback: boolean; - /** - * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SentimentAnalysisRequestConfig - * @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.v2beta1.SentimentAnalysisRequestConfig; + /** Intent mlEnabled. */ + public mlEnabled: boolean; - /** - * Verifies a SentimentAnalysisRequestConfig 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); + /** Intent mlDisabled. */ + public mlDisabled: boolean; - /** - * Creates a SentimentAnalysisRequestConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SentimentAnalysisRequestConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig; + /** Intent liveAgentHandoff. */ + public liveAgentHandoff: boolean; - /** - * Creates a plain object from a SentimentAnalysisRequestConfig message. Also converts values to other types if specified. - * @param message SentimentAnalysisRequestConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Intent endInteraction. */ + public endInteraction: boolean; - /** - * Converts this SentimentAnalysisRequestConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Intent inputContextNames. */ + public inputContextNames: string[]; - /** Properties of a SentimentAnalysisResult. */ - interface ISentimentAnalysisResult { + /** Intent events. */ + public events: string[]; - /** SentimentAnalysisResult queryTextSentiment */ - queryTextSentiment?: (google.cloud.dialogflow.v2beta1.ISentiment|null); - } + /** Intent trainingPhrases. */ + public trainingPhrases: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase[]; - /** Represents a SentimentAnalysisResult. */ - class SentimentAnalysisResult implements ISentimentAnalysisResult { + /** Intent action. */ + public action: string; - /** - * Constructs a new SentimentAnalysisResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult); + /** Intent outputContexts. */ + public outputContexts: google.cloud.dialogflow.v2beta1.IContext[]; - /** SentimentAnalysisResult queryTextSentiment. */ - public queryTextSentiment?: (google.cloud.dialogflow.v2beta1.ISentiment|null); + /** Intent resetContexts. */ + public resetContexts: boolean; + + /** Intent parameters. */ + public parameters: google.cloud.dialogflow.v2beta1.Intent.IParameter[]; + + /** Intent messages. */ + public messages: google.cloud.dialogflow.v2beta1.Intent.IMessage[]; + + /** Intent defaultResponsePlatforms. */ + public defaultResponsePlatforms: google.cloud.dialogflow.v2beta1.Intent.Message.Platform[]; + + /** Intent rootFollowupIntentName. */ + public rootFollowupIntentName: string; + + /** Intent parentFollowupIntentName. */ + public parentFollowupIntentName: string; + + /** Intent followupIntentInfo. */ + public followupIntentInfo: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo[]; /** - * Creates a new SentimentAnalysisResult instance using the specified properties. + * Creates a new Intent instance using the specified properties. * @param [properties] Properties to set - * @returns SentimentAnalysisResult instance + * @returns Intent instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult): google.cloud.dialogflow.v2beta1.SentimentAnalysisResult; + public static create(properties?: google.cloud.dialogflow.v2beta1.IIntent): google.cloud.dialogflow.v2beta1.Intent; /** - * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. - * @param message SentimentAnalysisResult message or plain object to encode + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. - * @param message SentimentAnalysisResult message or plain object to encode + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ISentimentAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SentimentAnalysisResult 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 SentimentAnalysisResult + * @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.v2beta1.SentimentAnalysisResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent; /** - * Decodes a SentimentAnalysisResult 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 SentimentAnalysisResult + * @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.v2beta1.SentimentAnalysisResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent; /** - * Verifies a SentimentAnalysisResult 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 SentimentAnalysisResult 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 SentimentAnalysisResult + * @returns Intent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SentimentAnalysisResult; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent; /** - * Creates a plain object from a SentimentAnalysisResult message. Also converts values to other types if specified. - * @param message SentimentAnalysisResult + * 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.v2beta1.SentimentAnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SentimentAnalysisResult to JSON. + * Converts this Intent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Sentiment. */ - interface ISentiment { - - /** Sentiment score */ - score?: (number|null); + namespace Intent { - /** Sentiment magnitude */ - magnitude?: (number|null); - } + /** WebhookState enum. */ + enum WebhookState { + WEBHOOK_STATE_UNSPECIFIED = 0, + WEBHOOK_STATE_ENABLED = 1, + WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 + } - /** Represents a Sentiment. */ - class Sentiment implements ISentiment { + /** Properties of a TrainingPhrase. */ + interface ITrainingPhrase { - /** - * Constructs a new Sentiment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISentiment); + /** TrainingPhrase name */ + name?: (string|null); - /** Sentiment score. */ - public score: number; + /** TrainingPhrase type */ + type?: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|keyof typeof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|null); - /** Sentiment magnitude. */ - public magnitude: number; + /** TrainingPhrase parts */ + parts?: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart[]|null); - /** - * Creates a new Sentiment instance using the specified properties. - * @param [properties] Properties to set - * @returns Sentiment instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISentiment): google.cloud.dialogflow.v2beta1.Sentiment; + /** TrainingPhrase timesAddedCount */ + timesAddedCount?: (number|null); + } - /** - * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. - * @param message Sentiment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a TrainingPhrase. */ + class TrainingPhrase implements ITrainingPhrase { - /** - * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. - * @param message Sentiment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISentiment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new TrainingPhrase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase); - /** - * Decodes a Sentiment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Sentiment - * @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.v2beta1.Sentiment; + /** TrainingPhrase name. */ + public name: string; - /** - * Decodes a Sentiment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Sentiment - * @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.v2beta1.Sentiment; + /** TrainingPhrase type. */ + public type: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|keyof typeof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type); - /** - * Verifies a Sentiment 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); + /** TrainingPhrase parts. */ + public parts: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart[]; - /** - * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Sentiment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Sentiment; + /** TrainingPhrase timesAddedCount. */ + public timesAddedCount: number; - /** - * Creates a plain object from a Sentiment message. Also converts values to other types if specified. - * @param message Sentiment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Sentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new TrainingPhrase instance using the specified properties. + * @param [properties] Properties to set + * @returns TrainingPhrase instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase): google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase; - /** - * Converts this Sentiment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Contexts */ - class Contexts extends $protobuf.rpc.Service { + /** + * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Contexts 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); + /** + * 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.v2beta1.Intent.TrainingPhrase; - /** - * Creates new Contexts 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): Contexts; + /** + * 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.v2beta1.Intent.TrainingPhrase; - /** - * Calls ListContexts. - * @param request ListContextsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListContextsResponse - */ - public listContexts(request: google.cloud.dialogflow.v2beta1.IListContextsRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.ListContextsCallback): void; + /** + * 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); - /** - * Calls ListContexts. - * @param request ListContextsRequest message or plain object - * @returns Promise - */ - public listContexts(request: google.cloud.dialogflow.v2beta1.IListContextsRequest): Promise; + /** + * 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.v2beta1.Intent.TrainingPhrase; - /** - * Calls GetContext. - * @param request GetContextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Context - */ - public getContext(request: google.cloud.dialogflow.v2beta1.IGetContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.GetContextCallback): 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.v2beta1.Intent.TrainingPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls GetContext. - * @param request GetContextRequest message or plain object - * @returns Promise - */ - public getContext(request: google.cloud.dialogflow.v2beta1.IGetContextRequest): Promise; + /** + * Converts this TrainingPhrase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls CreateContext. - * @param request CreateContextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Context - */ - public createContext(request: google.cloud.dialogflow.v2beta1.ICreateContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.CreateContextCallback): void; + namespace TrainingPhrase { - /** - * Calls CreateContext. - * @param request CreateContextRequest message or plain object - * @returns Promise - */ - public createContext(request: google.cloud.dialogflow.v2beta1.ICreateContextRequest): Promise; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + EXAMPLE = 1, + TEMPLATE = 2 + } - /** - * Calls UpdateContext. - * @param request UpdateContextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Context - */ - public updateContext(request: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.UpdateContextCallback): void; + /** Properties of a Part. */ + interface IPart { - /** - * Calls UpdateContext. - * @param request UpdateContextRequest message or plain object - * @returns Promise - */ - public updateContext(request: google.cloud.dialogflow.v2beta1.IUpdateContextRequest): Promise; + /** Part text */ + text?: (string|null); - /** - * Calls DeleteContext. - * @param request DeleteContextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteContext(request: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.DeleteContextCallback): void; + /** Part entityType */ + entityType?: (string|null); - /** - * Calls DeleteContext. - * @param request DeleteContextRequest message or plain object - * @returns Promise - */ - public deleteContext(request: google.cloud.dialogflow.v2beta1.IDeleteContextRequest): Promise; + /** Part alias */ + alias?: (string|null); - /** - * Calls DeleteAllContexts. - * @param request DeleteAllContextsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteAllContexts(request: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, callback: google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContextsCallback): void; + /** Part userDefined */ + userDefined?: (boolean|null); + } - /** - * Calls DeleteAllContexts. - * @param request DeleteAllContextsRequest message or plain object - * @returns Promise - */ - public deleteAllContexts(request: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest): Promise; - } + /** Represents a Part. */ + class Part implements IPart { - namespace Contexts { + /** + * Constructs a new Part. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart); - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#listContexts}. - * @param error Error, if any - * @param [response] ListContextsResponse - */ - type ListContextsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListContextsResponse) => void; + /** Part text. */ + public text: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#getContext}. - * @param error Error, if any - * @param [response] Context - */ - type GetContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; + /** Part entityType. */ + public entityType: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#createContext}. - * @param error Error, if any - * @param [response] Context - */ - type CreateContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#updateContext}. - * @param error Error, if any - * @param [response] Context - */ - type UpdateContextCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Context) => void; + /** Part alias. */ + public alias: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteContext}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteContextCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** Part userDefined. */ + public userDefined: boolean; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteAllContexts}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteAllContextsCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } + /** + * Creates a new Part instance using the specified properties. + * @param [properties] Properties to set + * @returns Part instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart): google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part; - /** Properties of a Context. */ - interface IContext { + /** + * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - /** Context name */ - name?: (string|null); + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - /** Context lifespanCount */ - lifespanCount?: (number|null); + /** + * 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.v2beta1.Intent.TrainingPhrase.Part; - /** Context parameters */ - parameters?: (google.protobuf.IStruct|null); - } + /** + * 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.v2beta1.Intent.TrainingPhrase.Part; - /** Represents a Context. */ - class Context implements IContext { + /** + * 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); - /** - * Constructs a new Context. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IContext); + /** + * 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.v2beta1.Intent.TrainingPhrase.Part; - /** Context name. */ - public name: string; + /** + * 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.v2beta1.Intent.TrainingPhrase.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Context lifespanCount. */ - public lifespanCount: number; + /** + * Converts this Part to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Context parameters. */ - public parameters?: (google.protobuf.IStruct|null); + /** Properties of a Parameter. */ + interface IParameter { - /** - * Creates a new Context instance using the specified properties. - * @param [properties] Properties to set - * @returns Context instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IContext): google.cloud.dialogflow.v2beta1.Context; + /** Parameter name */ + name?: (string|null); - /** - * Encodes the specified Context message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. - * @param message Context message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** Parameter displayName */ + displayName?: (string|null); - /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. - * @param message Context message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + /** Parameter value */ + value?: (string|null); - /** - * Decodes a Context message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Context - * @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.v2beta1.Context; + /** Parameter defaultValue */ + defaultValue?: (string|null); - /** - * Decodes a Context message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Context - * @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.v2beta1.Context; + /** Parameter entityTypeDisplayName */ + entityTypeDisplayName?: (string|null); - /** - * Verifies a Context 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 mandatory */ + mandatory?: (boolean|null); - /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Context - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Context; + /** Parameter prompts */ + prompts?: (string[]|null); - /** - * Creates a plain object from a Context message. Also converts values to other types if specified. - * @param message Context - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Parameter isList */ + isList?: (boolean|null); + } - /** - * Converts this Context to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a Parameter. */ + class Parameter implements IParameter { - /** Properties of a ListContextsRequest. */ - interface IListContextsRequest { + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IParameter); - /** ListContextsRequest parent */ - parent?: (string|null); + /** Parameter name. */ + public name: string; - /** ListContextsRequest pageSize */ - pageSize?: (number|null); + /** Parameter displayName. */ + public displayName: string; - /** ListContextsRequest pageToken */ - pageToken?: (string|null); - } + /** Parameter value. */ + public value: string; - /** Represents a ListContextsRequest. */ - class ListContextsRequest implements IListContextsRequest { + /** Parameter defaultValue. */ + public defaultValue: string; - /** - * Constructs a new ListContextsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListContextsRequest); + /** Parameter entityTypeDisplayName. */ + public entityTypeDisplayName: string; - /** ListContextsRequest parent. */ - public parent: string; + /** Parameter mandatory. */ + public mandatory: boolean; - /** ListContextsRequest pageSize. */ - public pageSize: number; + /** Parameter prompts. */ + public prompts: string[]; - /** ListContextsRequest pageToken. */ - public pageToken: string; + /** Parameter isList. */ + public isList: boolean; - /** - * Creates a new ListContextsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListContextsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListContextsRequest): google.cloud.dialogflow.v2beta1.ListContextsRequest; + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IParameter): google.cloud.dialogflow.v2beta1.Intent.Parameter; - /** - * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. - * @param message ListContextsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. - * @param message ListContextsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListContextsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListContextsRequest - * @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.v2beta1.ListContextsRequest; + /** + * 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.v2beta1.Intent.Parameter; - /** - * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListContextsRequest - * @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.v2beta1.ListContextsRequest; + /** + * 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.v2beta1.Intent.Parameter; - /** - * Verifies a ListContextsRequest 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 ListContextsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListContextsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListContextsRequest; + /** + * 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.v2beta1.Intent.Parameter; - /** - * Creates a plain object from a ListContextsRequest message. Also converts values to other types if specified. - * @param message ListContextsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListContextsRequest, 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.v2beta1.Intent.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListContextsRequest 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 ListContextsResponse. */ - interface IListContextsResponse { + /** Properties of a Message. */ + interface IMessage { - /** ListContextsResponse contexts */ - contexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); + /** Message text */ + text?: (google.cloud.dialogflow.v2beta1.Intent.Message.IText|null); - /** ListContextsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Message image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** Represents a ListContextsResponse. */ - class ListContextsResponse implements IListContextsResponse { + /** Message quickReplies */ + quickReplies?: (google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null); - /** - * Constructs a new ListContextsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListContextsResponse); + /** Message card */ + card?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null); - /** ListContextsResponse contexts. */ - public contexts: google.cloud.dialogflow.v2beta1.IContext[]; + /** Message payload */ + payload?: (google.protobuf.IStruct|null); - /** ListContextsResponse nextPageToken. */ - public nextPageToken: string; + /** Message simpleResponses */ + simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null); - /** - * Creates a new ListContextsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListContextsResponse instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListContextsResponse): google.cloud.dialogflow.v2beta1.ListContextsResponse; + /** Message basicCard */ + basicCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null); - /** - * Encodes the specified ListContextsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. - * @param message ListContextsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListContextsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Message suggestions */ + suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null); - /** - * Encodes the specified ListContextsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. - * @param message ListContextsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListContextsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Message linkOutSuggestion */ + linkOutSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null); - /** - * Decodes a ListContextsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListContextsResponse - * @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.v2beta1.ListContextsResponse; + /** Message listSelect */ + listSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null); - /** - * Decodes a ListContextsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListContextsResponse - * @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.v2beta1.ListContextsResponse; + /** Message carouselSelect */ + carouselSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null); - /** - * Verifies a ListContextsResponse 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); + /** Message telephonyPlayAudio */ + telephonyPlayAudio?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null); - /** - * Creates a ListContextsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListContextsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListContextsResponse; + /** Message telephonySynthesizeSpeech */ + telephonySynthesizeSpeech?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null); - /** - * Creates a plain object from a ListContextsResponse message. Also converts values to other types if specified. - * @param message ListContextsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListContextsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Message telephonyTransferCall */ + telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null); - /** - * Converts this ListContextsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Message rbmText */ + rbmText?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null); - /** Properties of a GetContextRequest. */ - interface IGetContextRequest { + /** Message rbmStandaloneRichCard */ + rbmStandaloneRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null); - /** GetContextRequest name */ - name?: (string|null); - } + /** Message rbmCarouselRichCard */ + rbmCarouselRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null); - /** Represents a GetContextRequest. */ - class GetContextRequest implements IGetContextRequest { + /** Message browseCarouselCard */ + browseCarouselCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null); - /** - * Constructs a new GetContextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetContextRequest); + /** Message tableCard */ + tableCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null); - /** GetContextRequest name. */ - public name: string; + /** Message mediaContent */ + mediaContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null); - /** - * Creates a new GetContextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetContextRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetContextRequest): google.cloud.dialogflow.v2beta1.GetContextRequest; + /** Message platform */ + platform?: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.Platform|null); + } - /** - * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. - * @param message GetContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Message. */ + class Message implements IMessage { - /** - * Encodes the specified GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. - * @param message GetContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IMessage); - /** - * Decodes a GetContextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetContextRequest - * @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.v2beta1.GetContextRequest; + /** Message text. */ + public text?: (google.cloud.dialogflow.v2beta1.Intent.Message.IText|null); - /** - * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetContextRequest - * @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.v2beta1.GetContextRequest; + /** Message image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** - * Verifies a GetContextRequest 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); + /** Message quickReplies. */ + public quickReplies?: (google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null); - /** - * Creates a GetContextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetContextRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetContextRequest; + /** Message card. */ + public card?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null); - /** - * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. - * @param message GetContextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Message payload. */ + public payload?: (google.protobuf.IStruct|null); - /** - * Converts this GetContextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Message simpleResponses. */ + public simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null); - /** Properties of a CreateContextRequest. */ - interface ICreateContextRequest { + /** Message basicCard. */ + public basicCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null); - /** CreateContextRequest parent */ - parent?: (string|null); + /** Message suggestions. */ + public suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null); - /** CreateContextRequest context */ - context?: (google.cloud.dialogflow.v2beta1.IContext|null); - } + /** Message linkOutSuggestion. */ + public linkOutSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null); - /** Represents a CreateContextRequest. */ - class CreateContextRequest implements ICreateContextRequest { + /** Message listSelect. */ + public listSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null); - /** - * Constructs a new CreateContextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateContextRequest); + /** Message carouselSelect. */ + public carouselSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null); - /** CreateContextRequest parent. */ - public parent: string; + /** Message telephonyPlayAudio. */ + public telephonyPlayAudio?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null); - /** CreateContextRequest context. */ - public context?: (google.cloud.dialogflow.v2beta1.IContext|null); + /** Message telephonySynthesizeSpeech. */ + public telephonySynthesizeSpeech?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null); - /** - * Creates a new CreateContextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateContextRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateContextRequest): google.cloud.dialogflow.v2beta1.CreateContextRequest; + /** Message telephonyTransferCall. */ + public telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null); - /** - * Encodes the specified CreateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. - * @param message CreateContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Message rbmText. */ + public rbmText?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null); - /** - * Encodes the specified CreateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. - * @param message CreateContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Message rbmStandaloneRichCard. */ + public rbmStandaloneRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null); - /** - * Decodes a CreateContextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateContextRequest - * @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.v2beta1.CreateContextRequest; + /** Message rbmCarouselRichCard. */ + public rbmCarouselRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null); - /** - * Decodes a CreateContextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateContextRequest - * @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.v2beta1.CreateContextRequest; + /** Message browseCarouselCard. */ + public browseCarouselCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null); - /** - * Verifies a CreateContextRequest 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); + /** Message tableCard. */ + public tableCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null); - /** - * Creates a CreateContextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateContextRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateContextRequest; + /** Message mediaContent. */ + public mediaContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null); - /** - * Creates a plain object from a CreateContextRequest message. Also converts values to other types if specified. - * @param message CreateContextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Message platform. */ + public platform: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.Platform); - /** - * Converts this CreateContextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Message message. */ + public message?: ("text"|"image"|"quickReplies"|"card"|"payload"|"simpleResponses"|"basicCard"|"suggestions"|"linkOutSuggestion"|"listSelect"|"carouselSelect"|"telephonyPlayAudio"|"telephonySynthesizeSpeech"|"telephonyTransferCall"|"rbmText"|"rbmStandaloneRichCard"|"rbmCarouselRichCard"|"browseCarouselCard"|"tableCard"|"mediaContent"); - /** Properties of an UpdateContextRequest. */ - interface IUpdateContextRequest { + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IMessage): google.cloud.dialogflow.v2beta1.Intent.Message; - /** UpdateContextRequest context */ - context?: (google.cloud.dialogflow.v2beta1.IContext|null); + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - /** UpdateContextRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an UpdateContextRequest. */ - class UpdateContextRequest implements IUpdateContextRequest { + /** + * Decodes a Message message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Message + * @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.v2beta1.Intent.Message; - /** - * Constructs a new UpdateContextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateContextRequest); + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Message + * @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.v2beta1.Intent.Message; - /** UpdateContextRequest context. */ - public context?: (google.cloud.dialogflow.v2beta1.IContext|null); + /** + * Verifies a Message 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); - /** UpdateContextRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message; - /** - * Creates a new UpdateContextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateContextRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateContextRequest): google.cloud.dialogflow.v2beta1.UpdateContextRequest; + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @param message Message + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified UpdateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. - * @param message UpdateContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified UpdateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. - * @param message UpdateContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + namespace Message { - /** - * Decodes an UpdateContextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateContextRequest - * @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.v2beta1.UpdateContextRequest; + /** Platform enum. */ + enum Platform { + PLATFORM_UNSPECIFIED = 0, + FACEBOOK = 1, + SLACK = 2, + TELEGRAM = 3, + KIK = 4, + SKYPE = 5, + LINE = 6, + VIBER = 7, + ACTIONS_ON_GOOGLE = 8, + TELEPHONY = 10, + GOOGLE_HANGOUTS = 11 + } - /** - * Decodes an UpdateContextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateContextRequest - * @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.v2beta1.UpdateContextRequest; + /** Properties of a Text. */ + interface IText { - /** - * Verifies an UpdateContextRequest 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); + /** Text text */ + text?: (string[]|null); + } - /** - * Creates an UpdateContextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateContextRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateContextRequest; + /** Represents a Text. */ + class Text implements IText { - /** - * Creates a plain object from an UpdateContextRequest message. Also converts values to other types if specified. - * @param message UpdateContextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Text. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IText); - /** - * Converts this UpdateContextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Text text. */ + public text: string[]; - /** Properties of a DeleteContextRequest. */ - interface IDeleteContextRequest { + /** + * Creates a new Text instance using the specified properties. + * @param [properties] Properties to set + * @returns Text instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IText): google.cloud.dialogflow.v2beta1.Intent.Message.Text; - /** DeleteContextRequest name */ - name?: (string|null); - } + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.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.v2beta1.Intent.Message.IText, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a DeleteContextRequest. */ - class DeleteContextRequest implements IDeleteContextRequest { + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.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.v2beta1.Intent.Message.IText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DeleteContextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteContextRequest); + /** + * 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.v2beta1.Intent.Message.Text; - /** DeleteContextRequest name. */ - public name: string; + /** + * 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.v2beta1.Intent.Message.Text; - /** - * Creates a new DeleteContextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteContextRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteContextRequest): google.cloud.dialogflow.v2beta1.DeleteContextRequest; + /** + * 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); - /** - * Encodes the specified DeleteContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. - * @param message DeleteContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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.v2beta1.Intent.Message.Text; - /** - * Encodes the specified DeleteContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. - * @param message DeleteContextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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.v2beta1.Intent.Message.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a DeleteContextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteContextRequest - * @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.v2beta1.DeleteContextRequest; + /** + * Converts this Text to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a DeleteContextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteContextRequest - * @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.v2beta1.DeleteContextRequest; + /** Properties of an Image. */ + interface IImage { - /** - * Verifies a DeleteContextRequest 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); + /** Image imageUri */ + imageUri?: (string|null); - /** - * Creates a DeleteContextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteContextRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteContextRequest; + /** Image accessibilityText */ + accessibilityText?: (string|null); + } - /** - * Creates a plain object from a DeleteContextRequest message. Also converts values to other types if specified. - * @param message DeleteContextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an Image. */ + class Image implements IImage { - /** - * Converts this DeleteContextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new Image. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IImage); - /** Properties of a DeleteAllContextsRequest. */ - interface IDeleteAllContextsRequest { + /** Image imageUri. */ + public imageUri: string; - /** DeleteAllContextsRequest parent */ - parent?: (string|null); - } + /** Image accessibilityText. */ + public accessibilityText: string; - /** Represents a DeleteAllContextsRequest. */ - class DeleteAllContextsRequest implements IDeleteAllContextsRequest { + /** + * Creates a new Image instance using the specified properties. + * @param [properties] Properties to set + * @returns Image instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IImage): google.cloud.dialogflow.v2beta1.Intent.Message.Image; - /** - * Constructs a new DeleteAllContextsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest); + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IImage, writer?: $protobuf.Writer): $protobuf.Writer; - /** DeleteAllContextsRequest parent. */ - public parent: string; + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * @param message Image message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IImage, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new DeleteAllContextsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteAllContextsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; + /** + * Decodes an Image message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Image + * @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.v2beta1.Intent.Message.Image; - /** - * Encodes the specified DeleteAllContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. - * @param message DeleteAllContextsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Image + * @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.v2beta1.Intent.Message.Image; - /** - * Encodes the specified DeleteAllContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. - * @param message DeleteAllContextsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an Image 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 DeleteAllContextsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteAllContextsRequest - * @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.v2beta1.DeleteAllContextsRequest; + /** + * Creates an Image message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Image + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Image; - /** - * Decodes a DeleteAllContextsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteAllContextsRequest - * @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.v2beta1.DeleteAllContextsRequest; + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @param message Image + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a DeleteAllContextsRequest 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 Image to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a DeleteAllContextsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteAllContextsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest; + /** Properties of a QuickReplies. */ + interface IQuickReplies { - /** - * Creates a plain object from a DeleteAllContextsRequest message. Also converts values to other types if specified. - * @param message DeleteAllContextsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** QuickReplies title */ + title?: (string|null); - /** - * Converts this DeleteAllContextsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** QuickReplies quickReplies */ + quickReplies?: (string[]|null); + } - /** Represents an Intents */ - class Intents extends $protobuf.rpc.Service { + /** Represents a QuickReplies. */ + class QuickReplies implements IQuickReplies { - /** - * 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 - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** + * Constructs a new QuickReplies. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies); - /** - * 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 static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Intents; + /** QuickReplies title. */ + public title: string; - /** - * Calls ListIntents. - * @param request ListIntentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListIntentsResponse - */ - public listIntents(request: google.cloud.dialogflow.v2beta1.IListIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.ListIntentsCallback): void; + /** QuickReplies quickReplies. */ + public quickReplies: string[]; - /** - * Calls ListIntents. - * @param request ListIntentsRequest message or plain object - * @returns Promise - */ - public listIntents(request: google.cloud.dialogflow.v2beta1.IListIntentsRequest): Promise; + /** + * Creates a new QuickReplies instance using the specified properties. + * @param [properties] Properties to set + * @returns QuickReplies instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies): google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies; - /** - * Calls GetIntent. - * @param request GetIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent - */ - public getIntent(request: google.cloud.dialogflow.v2beta1.IGetIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.GetIntentCallback): void; + /** + * Encodes the specified QuickReplies message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * @param message QuickReplies message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls GetIntent. - * @param request GetIntentRequest message or plain object - * @returns Promise - */ - public getIntent(request: google.cloud.dialogflow.v2beta1.IGetIntentRequest): Promise; + /** + * Encodes the specified QuickReplies message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * @param message QuickReplies message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Calls CreateIntent. - * @param request CreateIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent - */ - public createIntent(request: google.cloud.dialogflow.v2beta1.ICreateIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.CreateIntentCallback): void; + /** + * Decodes a QuickReplies message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuickReplies + * @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.v2beta1.Intent.Message.QuickReplies; - /** - * Calls CreateIntent. - * @param request CreateIntentRequest message or plain object - * @returns Promise - */ - public createIntent(request: google.cloud.dialogflow.v2beta1.ICreateIntentRequest): Promise; + /** + * Decodes a QuickReplies message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuickReplies + * @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.v2beta1.Intent.Message.QuickReplies; - /** - * Calls UpdateIntent. - * @param request UpdateIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Intent - */ - public updateIntent(request: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.UpdateIntentCallback): void; + /** + * Verifies a QuickReplies 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 UpdateIntent. - * @param request UpdateIntentRequest message or plain object - * @returns Promise - */ - public updateIntent(request: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest): Promise; - - /** - * Calls DeleteIntent. - * @param request DeleteIntentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteIntent(request: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest, callback: google.cloud.dialogflow.v2beta1.Intents.DeleteIntentCallback): void; + /** + * Creates a QuickReplies message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuickReplies + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies; - /** - * Calls DeleteIntent. - * @param request DeleteIntentRequest message or plain object - * @returns Promise - */ - public deleteIntent(request: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest): Promise; + /** + * Creates a plain object from a QuickReplies message. Also converts values to other types if specified. + * @param message QuickReplies + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls BatchUpdateIntents. - * @param request BatchUpdateIntentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public batchUpdateIntents(request: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntentsCallback): void; + /** + * Converts this QuickReplies to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Calls BatchUpdateIntents. - * @param request BatchUpdateIntentsRequest message or plain object - * @returns Promise - */ - public batchUpdateIntents(request: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest): Promise; + /** Properties of a Card. */ + interface ICard { - /** - * Calls BatchDeleteIntents. - * @param request BatchDeleteIntentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public batchDeleteIntents(request: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest, callback: google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntentsCallback): void; + /** Card title */ + title?: (string|null); - /** - * Calls BatchDeleteIntents. - * @param request BatchDeleteIntentsRequest message or plain object - * @returns Promise - */ - public batchDeleteIntents(request: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest): Promise; - } + /** Card subtitle */ + subtitle?: (string|null); - namespace Intents { + /** Card imageUri */ + imageUri?: (string|null); - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#listIntents}. - * @param error Error, if any - * @param [response] ListIntentsResponse - */ - type ListIntentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListIntentsResponse) => void; + /** Card buttons */ + buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton[]|null); + } - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#getIntent}. - * @param error Error, if any - * @param [response] Intent - */ - type GetIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; + /** Represents a Card. */ + class Card implements ICard { - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#createIntent}. - * @param error Error, if any - * @param [response] Intent - */ - type CreateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; + /** + * Constructs a new Card. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICard); - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#updateIntent}. - * @param error Error, if any - * @param [response] Intent - */ - type UpdateIntentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Intent) => void; + /** Card title. */ + public title: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#deleteIntent}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteIntentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** Card subtitle. */ + public subtitle: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchUpdateIntents}. - * @param error Error, if any - * @param [response] Operation - */ - type BatchUpdateIntentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** Card imageUri. */ + public imageUri: string; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchDeleteIntents}. - * @param error Error, if any - * @param [response] Operation - */ - type BatchDeleteIntentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } + /** Card buttons. */ + public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton[]; - /** Properties of an Intent. */ - interface IIntent { + /** + * Creates a new Card instance using the specified properties. + * @param [properties] Properties to set + * @returns Card instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICard): google.cloud.dialogflow.v2beta1.Intent.Message.Card; - /** Intent name */ - name?: (string|null); + /** + * Encodes the specified Card message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * @param message Card message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICard, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent displayName */ - displayName?: (string|null); + /** + * Encodes the specified Card message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * @param message Card message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICard, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent webhookState */ - webhookState?: (google.cloud.dialogflow.v2beta1.Intent.WebhookState|keyof typeof google.cloud.dialogflow.v2beta1.Intent.WebhookState|null); + /** + * Decodes a Card message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Card + * @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.v2beta1.Intent.Message.Card; - /** Intent priority */ - priority?: (number|null); + /** + * Decodes a Card message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Card + * @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.v2beta1.Intent.Message.Card; - /** Intent isFallback */ - isFallback?: (boolean|null); + /** + * Verifies a Card 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); - /** Intent mlEnabled */ - mlEnabled?: (boolean|null); + /** + * Creates a Card message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Card + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Card; - /** Intent mlDisabled */ - mlDisabled?: (boolean|null); + /** + * Creates a plain object from a Card message. Also converts values to other types if specified. + * @param message Card + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Intent liveAgentHandoff */ - liveAgentHandoff?: (boolean|null); + /** + * Converts this Card to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Intent endInteraction */ - endInteraction?: (boolean|null); + namespace Card { - /** Intent inputContextNames */ - inputContextNames?: (string[]|null); + /** Properties of a Button. */ + interface IButton { - /** Intent events */ - events?: (string[]|null); + /** Button text */ + text?: (string|null); - /** Intent trainingPhrases */ - trainingPhrases?: (google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase[]|null); + /** Button postback */ + postback?: (string|null); + } - /** Intent action */ - action?: (string|null); + /** Represents a Button. */ + class Button implements IButton { - /** Intent outputContexts */ - outputContexts?: (google.cloud.dialogflow.v2beta1.IContext[]|null); + /** + * Constructs a new Button. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton); - /** Intent resetContexts */ - resetContexts?: (boolean|null); + /** Button text. */ + public text: string; - /** Intent parameters */ - parameters?: (google.cloud.dialogflow.v2beta1.Intent.IParameter[]|null); + /** Button postback. */ + public postback: string; - /** Intent messages */ - messages?: (google.cloud.dialogflow.v2beta1.Intent.IMessage[]|null); + /** + * Creates a new Button instance using the specified properties. + * @param [properties] Properties to set + * @returns Button instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton): google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button; - /** Intent defaultResponsePlatforms */ - defaultResponsePlatforms?: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform[]|null); + /** + * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent rootFollowupIntentName */ - rootFollowupIntentName?: (string|null); + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent parentFollowupIntentName */ - parentFollowupIntentName?: (string|null); + /** + * Decodes a Button message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Button + * @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.v2beta1.Intent.Message.Card.Button; - /** Intent followupIntentInfo */ - followupIntentInfo?: (google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo[]|null); - } + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Button + * @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.v2beta1.Intent.Message.Card.Button; - /** Represents an Intent. */ - class Intent implements IIntent { + /** + * Verifies a Button 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 Intent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IIntent); + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Button + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button; - /** Intent name. */ - public name: string; + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @param message Button + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Intent displayName. */ - public displayName: string; + /** + * Converts this Button to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** Intent webhookState. */ - public webhookState: (google.cloud.dialogflow.v2beta1.Intent.WebhookState|keyof typeof google.cloud.dialogflow.v2beta1.Intent.WebhookState); + /** Properties of a SimpleResponse. */ + interface ISimpleResponse { - /** Intent priority. */ - public priority: number; + /** SimpleResponse textToSpeech */ + textToSpeech?: (string|null); - /** Intent isFallback. */ - public isFallback: boolean; + /** SimpleResponse ssml */ + ssml?: (string|null); - /** Intent mlEnabled. */ - public mlEnabled: boolean; + /** SimpleResponse displayText */ + displayText?: (string|null); + } - /** Intent mlDisabled. */ - public mlDisabled: boolean; + /** Represents a SimpleResponse. */ + class SimpleResponse implements ISimpleResponse { - /** Intent liveAgentHandoff. */ - public liveAgentHandoff: boolean; + /** + * Constructs a new SimpleResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse); - /** Intent endInteraction. */ - public endInteraction: boolean; + /** SimpleResponse textToSpeech. */ + public textToSpeech: string; - /** Intent inputContextNames. */ - public inputContextNames: string[]; + /** SimpleResponse ssml. */ + public ssml: string; - /** Intent events. */ - public events: string[]; + /** SimpleResponse displayText. */ + public displayText: string; - /** Intent trainingPhrases. */ - public trainingPhrases: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase[]; + /** + * Creates a new SimpleResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SimpleResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse; - /** Intent action. */ - public action: string; + /** + * Encodes the specified SimpleResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. + * @param message SimpleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent outputContexts. */ - public outputContexts: google.cloud.dialogflow.v2beta1.IContext[]; + /** + * Encodes the specified SimpleResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. + * @param message SimpleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Intent resetContexts. */ - public resetContexts: boolean; + /** + * Decodes a SimpleResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimpleResponse + * @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.v2beta1.Intent.Message.SimpleResponse; - /** Intent parameters. */ - public parameters: google.cloud.dialogflow.v2beta1.Intent.IParameter[]; + /** + * Decodes a SimpleResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimpleResponse + * @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.v2beta1.Intent.Message.SimpleResponse; - /** Intent messages. */ - public messages: google.cloud.dialogflow.v2beta1.Intent.IMessage[]; + /** + * Verifies a SimpleResponse 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); - /** Intent defaultResponsePlatforms. */ - public defaultResponsePlatforms: google.cloud.dialogflow.v2beta1.Intent.Message.Platform[]; + /** + * Creates a SimpleResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimpleResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse; - /** Intent rootFollowupIntentName. */ - public rootFollowupIntentName: string; + /** + * Creates a plain object from a SimpleResponse message. Also converts values to other types if specified. + * @param message SimpleResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Intent parentFollowupIntentName. */ - public parentFollowupIntentName: string; + /** + * Converts this SimpleResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Intent followupIntentInfo. */ - public followupIntentInfo: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo[]; + /** Properties of a SimpleResponses. */ + interface ISimpleResponses { - /** - * Creates a new Intent instance using the specified properties. - * @param [properties] Properties to set - * @returns Intent instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IIntent): google.cloud.dialogflow.v2beta1.Intent; + /** SimpleResponses simpleResponses */ + simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse[]|null); + } - /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a SimpleResponses. */ + class SimpleResponses implements ISimpleResponses { - /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new SimpleResponses. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses); - /** - * 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 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.v2beta1.Intent; + /** SimpleResponses simpleResponses. */ + public simpleResponses: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse[]; - /** - * Decodes an Intent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.v2beta1.Intent; - - /** - * 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 an Intent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Intent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent; - - /** - * 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.v2beta1.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Intent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Intent { - - /** WebhookState enum. */ - enum WebhookState { - WEBHOOK_STATE_UNSPECIFIED = 0, - WEBHOOK_STATE_ENABLED = 1, - WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 - } - - /** Properties of a TrainingPhrase. */ - interface ITrainingPhrase { - - /** TrainingPhrase name */ - name?: (string|null); - - /** TrainingPhrase type */ - type?: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|keyof typeof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|null); - - /** TrainingPhrase parts */ - parts?: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart[]|null); - - /** TrainingPhrase timesAddedCount */ - timesAddedCount?: (number|null); - } - - /** Represents a TrainingPhrase. */ - class TrainingPhrase implements ITrainingPhrase { - - /** - * Constructs a new TrainingPhrase. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase); - - /** TrainingPhrase name. */ - public name: string; - - /** TrainingPhrase type. */ - public type: (google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|keyof typeof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type); - - /** TrainingPhrase parts. */ - public parts: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart[]; - - /** TrainingPhrase timesAddedCount. */ - public timesAddedCount: number; - - /** - * Creates a new TrainingPhrase instance using the specified properties. - * @param [properties] Properties to set - * @returns TrainingPhrase instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase): google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase; - - /** - * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.ITrainingPhrase, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.v2beta1.Intent.TrainingPhrase; - - /** - * 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.v2beta1.Intent.TrainingPhrase; - - /** - * 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); - - /** - * 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.v2beta1.Intent.TrainingPhrase; - - /** - * 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.v2beta1.Intent.TrainingPhrase, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TrainingPhrase to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace TrainingPhrase { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - EXAMPLE = 1, - TEMPLATE = 2 - } - - /** Properties of a Part. */ - interface IPart { - - /** Part text */ - text?: (string|null); - - /** Part entityType */ - entityType?: (string|null); - - /** Part alias */ - alias?: (string|null); - - /** Part userDefined */ - userDefined?: (boolean|null); - } - - /** Represents a Part. */ - class Part implements IPart { - - /** - * Constructs a new Part. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart); - - /** Part text. */ - public text: string; - - /** Part entityType. */ - public entityType: string; - - /** Part alias. */ - public alias: string; - - /** Part userDefined. */ - public userDefined: boolean; + /** + * Creates a new SimpleResponses instance using the specified properties. + * @param [properties] Properties to set + * @returns SimpleResponses instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; /** - * Creates a new Part instance using the specified properties. - * @param [properties] Properties to set - * @returns Part instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart): google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part; - - /** - * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. - * @param message Part message or plain object to encode + * Encodes the specified SimpleResponses message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * @param message SimpleResponses message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. - * @param message Part message or plain object to encode + * Encodes the specified SimpleResponses message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * @param message SimpleResponses message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Part message from the specified reader or buffer. + * Decodes a SimpleResponses 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 SimpleResponses * @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.v2beta1.Intent.TrainingPhrase.Part; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; /** - * Decodes a Part message from the specified reader or buffer, length delimited. + * Decodes a SimpleResponses message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Part + * @returns SimpleResponses * @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.v2beta1.Intent.TrainingPhrase.Part; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; /** - * Verifies a Part message. + * Verifies a SimpleResponses 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 SimpleResponses message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Part + * @returns SimpleResponses */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; /** - * 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 SimpleResponses message. Also converts values to other types if specified. + * @param message SimpleResponses * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Part to JSON. + * Converts this SimpleResponses to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - /** Properties of a Parameter. */ - interface IParameter { + /** Properties of a BasicCard. */ + interface IBasicCard { - /** Parameter name */ - name?: (string|null); + /** BasicCard title */ + title?: (string|null); - /** Parameter displayName */ - displayName?: (string|null); + /** BasicCard subtitle */ + subtitle?: (string|null); - /** Parameter value */ - value?: (string|null); + /** BasicCard formattedText */ + formattedText?: (string|null); - /** Parameter defaultValue */ - defaultValue?: (string|null); - - /** Parameter entityTypeDisplayName */ - entityTypeDisplayName?: (string|null); - - /** Parameter mandatory */ - mandatory?: (boolean|null); + /** BasicCard image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** Parameter prompts */ - prompts?: (string[]|null); + /** BasicCard buttons */ + buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]|null); + } - /** Parameter isList */ - isList?: (boolean|null); - } + /** Represents a BasicCard. */ + class BasicCard implements IBasicCard { - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** + * Constructs a new BasicCard. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard); - /** - * Constructs a new Parameter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IParameter); + /** BasicCard title. */ + public title: string; - /** Parameter name. */ - public name: string; + /** BasicCard subtitle. */ + public subtitle: string; - /** Parameter displayName. */ - public displayName: string; + /** BasicCard formattedText. */ + public formattedText: string; - /** Parameter value. */ - public value: string; + /** BasicCard image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** Parameter defaultValue. */ - public defaultValue: string; + /** BasicCard buttons. */ + public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]; - /** Parameter entityTypeDisplayName. */ - public entityTypeDisplayName: string; + /** + * Creates a new BasicCard instance using the specified properties. + * @param [properties] Properties to set + * @returns BasicCard instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard; - /** Parameter mandatory. */ - public mandatory: boolean; + /** + * Encodes the specified BasicCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * @param message BasicCard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter prompts. */ - public prompts: string[]; + /** + * Encodes the specified BasicCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * @param message BasicCard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard, writer?: $protobuf.Writer): $protobuf.Writer; - /** Parameter isList. */ - public isList: boolean; + /** + * Decodes a BasicCard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BasicCard + * @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.v2beta1.Intent.Message.BasicCard; - /** - * Creates a new Parameter instance using the specified properties. - * @param [properties] Properties to set - * @returns Parameter instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IParameter): google.cloud.dialogflow.v2beta1.Intent.Parameter; + /** + * Decodes a BasicCard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BasicCard + * @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.v2beta1.Intent.Message.BasicCard; - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a BasicCard 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 Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a BasicCard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BasicCard + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard; - /** - * 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.v2beta1.Intent.Parameter; + /** + * Creates a plain object from a BasicCard message. Also converts values to other types if specified. + * @param message BasicCard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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.v2beta1.Intent.Parameter; + /** + * Converts this BasicCard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * 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); + namespace BasicCard { - /** - * 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.v2beta1.Intent.Parameter; + /** Properties of a Button. */ + interface IButton { - /** - * 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.v2beta1.Intent.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Button title */ + title?: (string|null); - /** - * Converts this Parameter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Button openUriAction */ + openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null); + } - /** Properties of a Message. */ - interface IMessage { + /** Represents a Button. */ + class Button implements IButton { - /** Message text */ - text?: (google.cloud.dialogflow.v2beta1.Intent.Message.IText|null); + /** + * Constructs a new Button. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton); - /** Message image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** Button title. */ + public title: string; - /** Message quickReplies */ - quickReplies?: (google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null); + /** Button openUriAction. */ + public openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null); - /** Message card */ - card?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null); + /** + * Creates a new Button instance using the specified properties. + * @param [properties] Properties to set + * @returns Button instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button; - /** Message payload */ - payload?: (google.protobuf.IStruct|null); + /** + * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** Message simpleResponses */ - simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null); + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * @param message Button message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton, writer?: $protobuf.Writer): $protobuf.Writer; - /** Message basicCard */ - basicCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null); + /** + * Decodes a Button message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Button + * @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.v2beta1.Intent.Message.BasicCard.Button; - /** Message suggestions */ - suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null); + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Button + * @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.v2beta1.Intent.Message.BasicCard.Button; - /** Message linkOutSuggestion */ - linkOutSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null); + /** + * Verifies a Button 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); - /** Message listSelect */ - listSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null); + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Button + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button; - /** Message carouselSelect */ - carouselSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null); + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @param message Button + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Message telephonyPlayAudio */ - telephonyPlayAudio?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null); + /** + * Converts this Button to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Message telephonySynthesizeSpeech */ - telephonySynthesizeSpeech?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null); + namespace Button { - /** Message telephonyTransferCall */ - telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null); + /** Properties of an OpenUriAction. */ + interface IOpenUriAction { - /** Message rbmText */ - rbmText?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null); + /** OpenUriAction uri */ + uri?: (string|null); + } - /** Message rbmStandaloneRichCard */ - rbmStandaloneRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null); + /** Represents an OpenUriAction. */ + class OpenUriAction implements IOpenUriAction { - /** Message rbmCarouselRichCard */ - rbmCarouselRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null); + /** + * Constructs a new OpenUriAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction); - /** Message browseCarouselCard */ - browseCarouselCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null); + /** OpenUriAction uri. */ + public uri: string; - /** Message tableCard */ - tableCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null); + /** + * Creates a new OpenUriAction instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenUriAction instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - /** Message mediaContent */ - mediaContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null); + /** + * Encodes the specified OpenUriAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * @param message OpenUriAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction, writer?: $protobuf.Writer): $protobuf.Writer; - /** Message platform */ - platform?: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.Platform|null); - } + /** + * Encodes the specified OpenUriAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * @param message OpenUriAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Message. */ - class Message implements IMessage { + /** + * Decodes an OpenUriAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenUriAction + * @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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - /** - * Constructs a new Message. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IMessage); + /** + * Decodes an OpenUriAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenUriAction + * @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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - /** Message text. */ - public text?: (google.cloud.dialogflow.v2beta1.Intent.Message.IText|null); + /** + * Verifies an OpenUriAction 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); - /** Message image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** + * Creates an OpenUriAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenUriAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - /** Message quickReplies. */ - public quickReplies?: (google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null); + /** + * Creates a plain object from an OpenUriAction message. Also converts values to other types if specified. + * @param message OpenUriAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Message card. */ - public card?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null); + /** + * Converts this OpenUriAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } - /** Message payload. */ - public payload?: (google.protobuf.IStruct|null); + /** Properties of a Suggestion. */ + interface ISuggestion { - /** Message simpleResponses. */ - public simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null); + /** Suggestion title */ + title?: (string|null); + } - /** Message basicCard. */ - public basicCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null); + /** Represents a Suggestion. */ + class Suggestion implements ISuggestion { - /** Message suggestions. */ - public suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null); + /** + * Constructs a new Suggestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion); - /** Message linkOutSuggestion. */ - public linkOutSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null); + /** Suggestion title. */ + public title: string; - /** Message listSelect. */ - public listSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null); + /** + * Creates a new Suggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns Suggestion instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion; - /** Message carouselSelect. */ - public carouselSelect?: (google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null); + /** + * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; - /** Message telephonyPlayAudio. */ - public telephonyPlayAudio?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null); + /** + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; - /** Message telephonySynthesizeSpeech. */ - public telephonySynthesizeSpeech?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null); + /** + * Decodes a Suggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Suggestion + * @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.v2beta1.Intent.Message.Suggestion; - /** Message telephonyTransferCall. */ - public telephonyTransferCall?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null); + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Suggestion + * @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.v2beta1.Intent.Message.Suggestion; - /** Message rbmText. */ - public rbmText?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null); + /** + * Verifies a Suggestion 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); - /** Message rbmStandaloneRichCard. */ - public rbmStandaloneRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null); + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Suggestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion; - /** Message rbmCarouselRichCard. */ - public rbmCarouselRichCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null); + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @param message Suggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Message browseCarouselCard. */ - public browseCarouselCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null); + /** + * Converts this Suggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Message tableCard. */ - public tableCard?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null); + /** Properties of a Suggestions. */ + interface ISuggestions { - /** Message mediaContent. */ - public mediaContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null); - - /** Message platform. */ - public platform: (google.cloud.dialogflow.v2beta1.Intent.Message.Platform|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.Platform); - - /** Message message. */ - public message?: ("text"|"image"|"quickReplies"|"card"|"payload"|"simpleResponses"|"basicCard"|"suggestions"|"linkOutSuggestion"|"listSelect"|"carouselSelect"|"telephonyPlayAudio"|"telephonySynthesizeSpeech"|"telephonyTransferCall"|"rbmText"|"rbmStandaloneRichCard"|"rbmCarouselRichCard"|"browseCarouselCard"|"tableCard"|"mediaContent"); - - /** - * Creates a new Message instance using the specified properties. - * @param [properties] Properties to set - * @returns Message instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IMessage): google.cloud.dialogflow.v2beta1.Intent.Message; - - /** - * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. - * @param message Message message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. - * @param message Message message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Message message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Message - * @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.v2beta1.Intent.Message; - - /** - * Decodes a Message message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Message - * @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.v2beta1.Intent.Message; - - /** - * Verifies a Message 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 Message message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Message - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message; - - /** - * Creates a plain object from a Message message. Also converts values to other types if specified. - * @param message Message - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Message to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace Message { - - /** Platform enum. */ - enum Platform { - PLATFORM_UNSPECIFIED = 0, - FACEBOOK = 1, - SLACK = 2, - TELEGRAM = 3, - KIK = 4, - SKYPE = 5, - LINE = 6, - VIBER = 7, - ACTIONS_ON_GOOGLE = 8, - TELEPHONY = 10, - GOOGLE_HANGOUTS = 11 - } - - /** Properties of a Text. */ - interface IText { - - /** Text text */ - text?: (string[]|null); + /** Suggestions suggestions */ + suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion[]|null); } - /** Represents a Text. */ - class Text implements IText { + /** Represents a Suggestions. */ + class Suggestions implements ISuggestions { /** - * Constructs a new Text. + * Constructs a new Suggestions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IText); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions); - /** Text text. */ - public text: string[]; + /** Suggestions suggestions. */ + public suggestions: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion[]; /** - * Creates a new Text instance using the specified properties. + * Creates a new Suggestions instance using the specified properties. * @param [properties] Properties to set - * @returns Text instance + * @returns Suggestions instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IText): google.cloud.dialogflow.v2beta1.Intent.Message.Text; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified Suggestions message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. + * @param message Suggestions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. - * @param message Text message or plain object to encode + * Encodes the specified Suggestions message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. + * @param message Suggestions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IText, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a Suggestions 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 Suggestions * @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.v2beta1.Intent.Message.Text; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; /** - * Decodes a Text message from the specified reader or buffer, length delimited. + * Decodes a Suggestions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Text + * @returns Suggestions * @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.v2beta1.Intent.Message.Text; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; /** - * Verifies a Text message. + * Verifies a Suggestions 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 Suggestions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Text + * @returns Suggestions */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Text; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; /** - * 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 Suggestions message. Also converts values to other types if specified. + * @param message Suggestions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Text, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Text to JSON. + * Converts this Suggestions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an Image. */ - interface IImage { + /** Properties of a LinkOutSuggestion. */ + interface ILinkOutSuggestion { - /** Image imageUri */ - imageUri?: (string|null); + /** LinkOutSuggestion destinationName */ + destinationName?: (string|null); - /** Image accessibilityText */ - accessibilityText?: (string|null); + /** LinkOutSuggestion uri */ + uri?: (string|null); } - /** Represents an Image. */ - class Image implements IImage { + /** Represents a LinkOutSuggestion. */ + class LinkOutSuggestion implements ILinkOutSuggestion { /** - * Constructs a new Image. + * Constructs a new LinkOutSuggestion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IImage); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion); - /** Image imageUri. */ - public imageUri: string; + /** LinkOutSuggestion destinationName. */ + public destinationName: string; - /** Image accessibilityText. */ - public accessibilityText: string; + /** LinkOutSuggestion uri. */ + public uri: string; /** - * Creates a new Image instance using the specified properties. + * Creates a new LinkOutSuggestion instance using the specified properties. * @param [properties] Properties to set - * @returns Image instance + * @returns LinkOutSuggestion instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IImage): google.cloud.dialogflow.v2beta1.Intent.Message.Image; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified LinkOutSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. + * @param message LinkOutSuggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. - * @param message Image message or plain object to encode + * Encodes the specified LinkOutSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. + * @param message LinkOutSuggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IImage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes a LinkOutSuggestion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Image + * @returns LinkOutSuggestion * @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.v2beta1.Intent.Message.Image; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes a LinkOutSuggestion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Image + * @returns LinkOutSuggestion * @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.v2beta1.Intent.Message.Image; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; /** - * Verifies an Image message. + * Verifies a LinkOutSuggestion 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 Image message from a plain object. Also converts values to their respective internal types. + * Creates a LinkOutSuggestion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Image + * @returns LinkOutSuggestion */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Image; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. - * @param message Image + * Creates a plain object from a LinkOutSuggestion message. Also converts values to other types if specified. + * @param message LinkOutSuggestion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Image to JSON. + * Converts this LinkOutSuggestion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a QuickReplies. */ - interface IQuickReplies { + /** Properties of a ListSelect. */ + interface IListSelect { - /** QuickReplies title */ + /** ListSelect title */ title?: (string|null); - /** QuickReplies quickReplies */ - quickReplies?: (string[]|null); + /** ListSelect items */ + items?: (google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem[]|null); + + /** ListSelect subtitle */ + subtitle?: (string|null); } - /** Represents a QuickReplies. */ - class QuickReplies implements IQuickReplies { + /** Represents a ListSelect. */ + class ListSelect implements IListSelect { /** - * Constructs a new QuickReplies. + * Constructs a new ListSelect. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect); - /** QuickReplies title. */ + /** ListSelect title. */ public title: string; - /** QuickReplies quickReplies. */ - public quickReplies: string[]; - - /** - * Creates a new QuickReplies instance using the specified properties. - * @param [properties] Properties to set - * @returns QuickReplies instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies): google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies; - - /** - * Encodes the specified QuickReplies message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. - * @param message QuickReplies message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuickReplies message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. - * @param message QuickReplies message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuickReplies message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuickReplies - * @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.v2beta1.Intent.Message.QuickReplies; - - /** - * Decodes a QuickReplies message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuickReplies - * @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.v2beta1.Intent.Message.QuickReplies; - - /** - * Verifies a QuickReplies 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 QuickReplies message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuickReplies - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies; - - /** - * Creates a plain object from a QuickReplies message. Also converts values to other types if specified. - * @param message QuickReplies - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuickReplies to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Card. */ - interface ICard { - - /** Card title */ - title?: (string|null); - - /** Card subtitle */ - subtitle?: (string|null); - - /** Card imageUri */ - imageUri?: (string|null); - - /** Card buttons */ - buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton[]|null); - } - - /** Represents a Card. */ - class Card implements ICard { - - /** - * Constructs a new Card. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICard); - - /** Card title. */ - public title: string; + /** ListSelect items. */ + public items: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem[]; - /** Card subtitle. */ + /** ListSelect subtitle. */ public subtitle: string; - /** Card imageUri. */ - public imageUri: string; - - /** Card buttons. */ - public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton[]; - /** - * Creates a new Card instance using the specified properties. + * Creates a new ListSelect instance using the specified properties. * @param [properties] Properties to set - * @returns Card instance + * @returns ListSelect instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICard): google.cloud.dialogflow.v2beta1.Intent.Message.Card; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; /** - * Encodes the specified Card message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. - * @param message Card message or plain object to encode + * Encodes the specified ListSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * @param message ListSelect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Card message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. - * @param message Card message or plain object to encode + * Encodes the specified ListSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * @param message ListSelect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Card message from the specified reader or buffer. + * Decodes a ListSelect message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Card + * @returns ListSelect * @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.v2beta1.Intent.Message.Card; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; /** - * Decodes a Card message from the specified reader or buffer, length delimited. + * Decodes a ListSelect message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Card + * @returns ListSelect * @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.v2beta1.Intent.Message.Card; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; /** - * Verifies a Card message. + * Verifies a ListSelect 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 Card message from a plain object. Also converts values to their respective internal types. + * Creates a ListSelect message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Card + * @returns ListSelect */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Card; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; /** - * Creates a plain object from a Card message. Also converts values to other types if specified. - * @param message Card + * Creates a plain object from a ListSelect message. Also converts values to other types if specified. + * @param message ListSelect * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Card to JSON. + * Converts this ListSelect to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Card { + namespace ListSelect { - /** Properties of a Button. */ - interface IButton { + /** Properties of an Item. */ + interface IItem { - /** Button text */ - text?: (string|null); + /** Item info */ + info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); - /** Button postback */ - postback?: (string|null); + /** Item title */ + title?: (string|null); + + /** Item description */ + description?: (string|null); + + /** Item image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); } - /** Represents a Button. */ - class Button implements IButton { + /** Represents an Item. */ + class Item implements IItem { /** - * Constructs a new Button. + * Constructs a new Item. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem); - /** Button text. */ - public text: string; + /** Item info. */ + public info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); - /** Button postback. */ - public postback: string; + /** Item title. */ + public title: string; + + /** Item description. */ + public description: string; + + /** Item image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); /** - * Creates a new Button instance using the specified properties. + * Creates a new Item instance using the specified properties. * @param [properties] Properties to set - * @returns Button instance + * @returns Item instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton): google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; /** - * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. - * @param message Button message or plain object to encode + * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. + * @param message Item message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. - * @param message Button message or plain object to encode + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. + * @param message Item message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Button message from the specified reader or buffer. + * Decodes an Item message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Button + * @returns Item * @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.v2beta1.Intent.Message.Card.Button; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; /** - * Decodes a Button message from the specified reader or buffer, length delimited. + * Decodes an Item message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Button + * @returns Item * @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.v2beta1.Intent.Message.Card.Button; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; /** - * Verifies a Button message. + * Verifies an Item 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 Button message from a plain object. Also converts values to their respective internal types. + * Creates an Item message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Button + * @returns Item */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; /** - * Creates a plain object from a Button message. Also converts values to other types if specified. - * @param message Button + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Button to JSON. + * Converts this Item to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a SimpleResponse. */ - interface ISimpleResponse { + /** Properties of a CarouselSelect. */ + interface ICarouselSelect { - /** SimpleResponse textToSpeech */ - textToSpeech?: (string|null); + /** CarouselSelect items */ + items?: (google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem[]|null); + } - /** SimpleResponse ssml */ - ssml?: (string|null); - - /** SimpleResponse displayText */ - displayText?: (string|null); - } - - /** Represents a SimpleResponse. */ - class SimpleResponse implements ISimpleResponse { + /** Represents a CarouselSelect. */ + class CarouselSelect implements ICarouselSelect { /** - * Constructs a new SimpleResponse. + * Constructs a new CarouselSelect. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse); - - /** SimpleResponse textToSpeech. */ - public textToSpeech: string; - - /** SimpleResponse ssml. */ - public ssml: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect); - /** SimpleResponse displayText. */ - public displayText: string; + /** CarouselSelect items. */ + public items: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem[]; /** - * Creates a new SimpleResponse instance using the specified properties. + * Creates a new CarouselSelect instance using the specified properties. * @param [properties] Properties to set - * @returns SimpleResponse instance + * @returns CarouselSelect instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; /** - * Encodes the specified SimpleResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. - * @param message SimpleResponse message or plain object to encode + * Encodes the specified CarouselSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * @param message CarouselSelect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SimpleResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. - * @param message SimpleResponse message or plain object to encode + * Encodes the specified CarouselSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * @param message CarouselSelect message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SimpleResponse message from the specified reader or buffer. + * Decodes a CarouselSelect message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SimpleResponse + * @returns CarouselSelect * @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.v2beta1.Intent.Message.SimpleResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; /** - * Decodes a SimpleResponse message from the specified reader or buffer, length delimited. + * Decodes a CarouselSelect message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SimpleResponse + * @returns CarouselSelect * @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.v2beta1.Intent.Message.SimpleResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; /** - * Verifies a SimpleResponse message. + * Verifies a CarouselSelect 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 SimpleResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CarouselSelect message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SimpleResponse + * @returns CarouselSelect */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; /** - * Creates a plain object from a SimpleResponse message. Also converts values to other types if specified. - * @param message SimpleResponse + * Creates a plain object from a CarouselSelect message. Also converts values to other types if specified. + * @param message CarouselSelect * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SimpleResponse to JSON. + * Converts this CarouselSelect to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SimpleResponses. */ - interface ISimpleResponses { + namespace CarouselSelect { - /** SimpleResponses simpleResponses */ - simpleResponses?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse[]|null); + /** Properties of an Item. */ + interface IItem { + + /** Item info */ + info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); + + /** Item title */ + title?: (string|null); + + /** Item description */ + description?: (string|null); + + /** Item image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + } + + /** Represents an Item. */ + class Item implements IItem { + + /** + * Constructs a new Item. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem); + + /** Item info. */ + public info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); + + /** Item title. */ + public title: string; + + /** Item description. */ + public description: string; + + /** Item image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + + /** + * Creates a new Item instance using the specified properties. + * @param [properties] Properties to set + * @returns Item instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. + * @param message Item message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Item message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Item + * @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.v2beta1.Intent.Message.CarouselSelect.Item; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Item + * @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.v2beta1.Intent.Message.CarouselSelect.Item; + + /** + * Verifies an Item 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 Item message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Item + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @param message Item + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Item to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a SimpleResponses. */ - class SimpleResponses implements ISimpleResponses { + /** Properties of a SelectItemInfo. */ + interface ISelectItemInfo { + + /** SelectItemInfo key */ + key?: (string|null); + + /** SelectItemInfo synonyms */ + synonyms?: (string[]|null); + } + + /** Represents a SelectItemInfo. */ + class SelectItemInfo implements ISelectItemInfo { /** - * Constructs a new SimpleResponses. + * Constructs a new SelectItemInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo); - /** SimpleResponses simpleResponses. */ - public simpleResponses: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse[]; + /** SelectItemInfo key. */ + public key: string; + + /** SelectItemInfo synonyms. */ + public synonyms: string[]; /** - * Creates a new SimpleResponses instance using the specified properties. + * Creates a new SelectItemInfo instance using the specified properties. * @param [properties] Properties to set - * @returns SimpleResponses instance + * @returns SelectItemInfo instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; /** - * Encodes the specified SimpleResponses message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. - * @param message SimpleResponses message or plain object to encode + * Encodes the specified SelectItemInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * @param message SelectItemInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SimpleResponses message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. - * @param message SimpleResponses message or plain object to encode + * Encodes the specified SelectItemInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * @param message SelectItemInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SimpleResponses message from the specified reader or buffer. + * Decodes a SelectItemInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SimpleResponses + * @returns SelectItemInfo * @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.v2beta1.Intent.Message.SimpleResponses; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; /** - * Decodes a SimpleResponses message from the specified reader or buffer, length delimited. + * Decodes a SelectItemInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SimpleResponses + * @returns SelectItemInfo * @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.v2beta1.Intent.Message.SimpleResponses; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; /** - * Verifies a SimpleResponses message. + * Verifies a SelectItemInfo 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 SimpleResponses message from a plain object. Also converts values to their respective internal types. + * Creates a SelectItemInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SimpleResponses + * @returns SelectItemInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; /** - * Creates a plain object from a SimpleResponses message. Also converts values to other types if specified. - * @param message SimpleResponses + * Creates a plain object from a SelectItemInfo message. Also converts values to other types if specified. + * @param message SelectItemInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SimpleResponses to JSON. + * Converts this SelectItemInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BasicCard. */ - interface IBasicCard { - - /** BasicCard title */ - title?: (string|null); - - /** BasicCard subtitle */ - subtitle?: (string|null); - - /** BasicCard formattedText */ - formattedText?: (string|null); - - /** BasicCard image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** Properties of a TelephonyPlayAudio. */ + interface ITelephonyPlayAudio { - /** BasicCard buttons */ - buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]|null); + /** TelephonyPlayAudio audioUri */ + audioUri?: (string|null); } - /** Represents a BasicCard. */ - class BasicCard implements IBasicCard { + /** Represents a TelephonyPlayAudio. */ + class TelephonyPlayAudio implements ITelephonyPlayAudio { /** - * Constructs a new BasicCard. + * Constructs a new TelephonyPlayAudio. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard); - - /** BasicCard title. */ - public title: string; - - /** BasicCard subtitle. */ - public subtitle: string; - - /** BasicCard formattedText. */ - public formattedText: string; - - /** BasicCard image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio); - /** BasicCard buttons. */ - public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]; + /** TelephonyPlayAudio audioUri. */ + public audioUri: string; /** - * Creates a new BasicCard instance using the specified properties. + * Creates a new TelephonyPlayAudio instance using the specified properties. * @param [properties] Properties to set - * @returns BasicCard instance + * @returns TelephonyPlayAudio instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; /** - * Encodes the specified BasicCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. - * @param message BasicCard message or plain object to encode + * Encodes the specified TelephonyPlayAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * @param message TelephonyPlayAudio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BasicCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. - * @param message BasicCard message or plain object to encode + * Encodes the specified TelephonyPlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * @param message TelephonyPlayAudio message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BasicCard message from the specified reader or buffer. + * Decodes a TelephonyPlayAudio message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BasicCard + * @returns TelephonyPlayAudio * @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.v2beta1.Intent.Message.BasicCard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; /** - * Decodes a BasicCard message from the specified reader or buffer, length delimited. + * Decodes a TelephonyPlayAudio message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BasicCard + * @returns TelephonyPlayAudio * @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.v2beta1.Intent.Message.BasicCard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; /** - * Verifies a BasicCard message. + * Verifies a TelephonyPlayAudio 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 BasicCard message from a plain object. Also converts values to their respective internal types. + * Creates a TelephonyPlayAudio message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BasicCard + * @returns TelephonyPlayAudio */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; /** - * Creates a plain object from a BasicCard message. Also converts values to other types if specified. - * @param message BasicCard + * Creates a plain object from a TelephonyPlayAudio message. Also converts values to other types if specified. + * @param message TelephonyPlayAudio * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BasicCard to JSON. + * Converts this TelephonyPlayAudio to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace BasicCard { - - /** Properties of a Button. */ - interface IButton { + /** Properties of a TelephonySynthesizeSpeech. */ + interface ITelephonySynthesizeSpeech { - /** Button title */ - title?: (string|null); + /** TelephonySynthesizeSpeech text */ + text?: (string|null); - /** Button openUriAction */ - openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null); - } + /** TelephonySynthesizeSpeech ssml */ + ssml?: (string|null); + } - /** Represents a Button. */ - class Button implements IButton { + /** Represents a TelephonySynthesizeSpeech. */ + class TelephonySynthesizeSpeech implements ITelephonySynthesizeSpeech { - /** - * Constructs a new Button. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton); + /** + * Constructs a new TelephonySynthesizeSpeech. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech); - /** Button title. */ - public title: string; + /** TelephonySynthesizeSpeech text. */ + public text?: (string|null); - /** Button openUriAction. */ - public openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null); + /** TelephonySynthesizeSpeech ssml. */ + public ssml?: (string|null); - /** - * Creates a new Button instance using the specified properties. - * @param [properties] Properties to set - * @returns Button instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button; + /** TelephonySynthesizeSpeech source. */ + public source?: ("text"|"ssml"); - /** - * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. - * @param message Button message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new TelephonySynthesizeSpeech instance using the specified properties. + * @param [properties] Properties to set + * @returns TelephonySynthesizeSpeech instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech; - /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. - * @param message Button message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TelephonySynthesizeSpeech message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. + * @param message TelephonySynthesizeSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Button message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Button - * @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.v2beta1.Intent.Message.BasicCard.Button; + /** + * Encodes the specified TelephonySynthesizeSpeech message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. + * @param message TelephonySynthesizeSpeech message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Button message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Button - * @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.v2beta1.Intent.Message.BasicCard.Button; + /** + * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TelephonySynthesizeSpeech + * @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.v2beta1.Intent.Message.TelephonySynthesizeSpeech; - /** - * Verifies a Button 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 TelephonySynthesizeSpeech message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TelephonySynthesizeSpeech + * @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.v2beta1.Intent.Message.TelephonySynthesizeSpeech; - /** - * Creates a Button message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Button - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button; + /** + * Verifies a TelephonySynthesizeSpeech 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 Button message. Also converts values to other types if specified. - * @param message Button - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a TelephonySynthesizeSpeech message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TelephonySynthesizeSpeech + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech; - /** - * Converts this Button to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a TelephonySynthesizeSpeech message. Also converts values to other types if specified. + * @param message TelephonySynthesizeSpeech + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace Button { + /** + * Converts this TelephonySynthesizeSpeech to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of an OpenUriAction. */ - interface IOpenUriAction { + /** Properties of a TelephonyTransferCall. */ + interface ITelephonyTransferCall { - /** OpenUriAction uri */ - uri?: (string|null); - } - - /** Represents an OpenUriAction. */ - class OpenUriAction implements IOpenUriAction { - - /** - * Constructs a new OpenUriAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction); - - /** OpenUriAction uri. */ - public uri: string; - - /** - * Creates a new OpenUriAction instance using the specified properties. - * @param [properties] Properties to set - * @returns OpenUriAction instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - - /** - * Encodes the specified OpenUriAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. - * @param message OpenUriAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OpenUriAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. - * @param message OpenUriAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OpenUriAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OpenUriAction - * @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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - - /** - * Decodes an OpenUriAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OpenUriAction - * @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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - - /** - * Verifies an OpenUriAction 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 OpenUriAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OpenUriAction - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction; - - /** - * Creates a plain object from an OpenUriAction message. Also converts values to other types if specified. - * @param message OpenUriAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OpenUriAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Properties of a Suggestion. */ - interface ISuggestion { - - /** Suggestion title */ - title?: (string|null); + /** TelephonyTransferCall phoneNumber */ + phoneNumber?: (string|null); } - /** Represents a Suggestion. */ - class Suggestion implements ISuggestion { + /** Represents a TelephonyTransferCall. */ + class TelephonyTransferCall implements ITelephonyTransferCall { /** - * Constructs a new Suggestion. + * Constructs a new TelephonyTransferCall. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall); - /** Suggestion title. */ - public title: string; + /** TelephonyTransferCall phoneNumber. */ + public phoneNumber: string; /** - * Creates a new Suggestion instance using the specified properties. + * Creates a new TelephonyTransferCall instance using the specified properties. * @param [properties] Properties to set - * @returns Suggestion instance + * @returns TelephonyTransferCall instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode + * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. + * @param message TelephonyTransferCall message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode + * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. + * @param message TelephonyTransferCall message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Suggestion message from the specified reader or buffer. + * Decodes a TelephonyTransferCall message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Suggestion + * @returns TelephonyTransferCall * @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.v2beta1.Intent.Message.Suggestion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Suggestion + * @returns TelephonyTransferCall * @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.v2beta1.Intent.Message.Suggestion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; /** - * Verifies a Suggestion message. + * Verifies a TelephonyTransferCall 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 Suggestion message from a plain object. Also converts values to their respective internal types. + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Suggestion + * @returns TelephonyTransferCall */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @param message Suggestion + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @param message TelephonyTransferCall * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Suggestion to JSON. + * Converts this TelephonyTransferCall to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Suggestions. */ - interface ISuggestions { + /** Properties of a RbmText. */ + interface IRbmText { - /** Suggestions suggestions */ - suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion[]|null); + /** RbmText text */ + text?: (string|null); + + /** RbmText rbmSuggestion */ + rbmSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]|null); } - /** Represents a Suggestions. */ - class Suggestions implements ISuggestions { + /** Represents a RbmText. */ + class RbmText implements IRbmText { /** - * Constructs a new Suggestions. + * Constructs a new RbmText. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText); - /** Suggestions suggestions. */ - public suggestions: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion[]; + /** RbmText text. */ + public text: string; + + /** RbmText rbmSuggestion. */ + public rbmSuggestion: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]; /** - * Creates a new Suggestions instance using the specified properties. + * Creates a new RbmText instance using the specified properties. * @param [properties] Properties to set - * @returns Suggestions instance + * @returns RbmText instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; /** - * Encodes the specified Suggestions message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. - * @param message Suggestions message or plain object to encode + * Encodes the specified RbmText message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. + * @param message RbmText message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Suggestions message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. - * @param message Suggestions message or plain object to encode + * Encodes the specified RbmText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. + * @param message RbmText message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Suggestions message from the specified reader or buffer. + * Decodes a RbmText message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Suggestions + * @returns RbmText * @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.v2beta1.Intent.Message.Suggestions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; /** - * Decodes a Suggestions message from the specified reader or buffer, length delimited. + * Decodes a RbmText message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Suggestions + * @returns RbmText * @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.v2beta1.Intent.Message.Suggestions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; /** - * Verifies a Suggestions message. + * Verifies a RbmText 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 Suggestions message from a plain object. Also converts values to their respective internal types. + * Creates a RbmText message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Suggestions + * @returns RbmText */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; /** - * Creates a plain object from a Suggestions message. Also converts values to other types if specified. - * @param message Suggestions + * Creates a plain object from a RbmText message. Also converts values to other types if specified. + * @param message RbmText * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmText, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Suggestions to JSON. + * Converts this RbmText to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a LinkOutSuggestion. */ - interface ILinkOutSuggestion { + /** Properties of a RbmCarouselCard. */ + interface IRbmCarouselCard { - /** LinkOutSuggestion destinationName */ - destinationName?: (string|null); + /** RbmCarouselCard cardWidth */ + cardWidth?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|null); - /** LinkOutSuggestion uri */ - uri?: (string|null); + /** RbmCarouselCard cardContents */ + cardContents?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent[]|null); } - /** Represents a LinkOutSuggestion. */ - class LinkOutSuggestion implements ILinkOutSuggestion { + /** Represents a RbmCarouselCard. */ + class RbmCarouselCard implements IRbmCarouselCard { /** - * Constructs a new LinkOutSuggestion. + * Constructs a new RbmCarouselCard. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard); - /** LinkOutSuggestion destinationName. */ - public destinationName: string; + /** RbmCarouselCard cardWidth. */ + public cardWidth: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth); - /** LinkOutSuggestion uri. */ - public uri: string; + /** RbmCarouselCard cardContents. */ + public cardContents: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent[]; /** - * Creates a new LinkOutSuggestion instance using the specified properties. + * Creates a new RbmCarouselCard instance using the specified properties. * @param [properties] Properties to set - * @returns LinkOutSuggestion instance + * @returns RbmCarouselCard instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; /** - * Encodes the specified LinkOutSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. - * @param message LinkOutSuggestion message or plain object to encode + * Encodes the specified RbmCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. + * @param message RbmCarouselCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LinkOutSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. - * @param message LinkOutSuggestion message or plain object to encode + * Encodes the specified RbmCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. + * @param message RbmCarouselCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LinkOutSuggestion message from the specified reader or buffer. + * Decodes a RbmCarouselCard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LinkOutSuggestion + * @returns RbmCarouselCard * @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.v2beta1.Intent.Message.LinkOutSuggestion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; /** - * Decodes a LinkOutSuggestion message from the specified reader or buffer, length delimited. + * Decodes a RbmCarouselCard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LinkOutSuggestion + * @returns RbmCarouselCard * @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.v2beta1.Intent.Message.LinkOutSuggestion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; /** - * Verifies a LinkOutSuggestion message. + * Verifies a RbmCarouselCard 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 LinkOutSuggestion message from a plain object. Also converts values to their respective internal types. + * Creates a RbmCarouselCard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LinkOutSuggestion + * @returns RbmCarouselCard */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; /** - * Creates a plain object from a LinkOutSuggestion message. Also converts values to other types if specified. - * @param message LinkOutSuggestion + * Creates a plain object from a RbmCarouselCard message. Also converts values to other types if specified. + * @param message RbmCarouselCard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LinkOutSuggestion to JSON. + * Converts this RbmCarouselCard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListSelect. */ - interface IListSelect { + namespace RbmCarouselCard { - /** ListSelect title */ - title?: (string|null); + /** CardWidth enum. */ + enum CardWidth { + CARD_WIDTH_UNSPECIFIED = 0, + SMALL = 1, + MEDIUM = 2 + } + } - /** ListSelect items */ - items?: (google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem[]|null); + /** Properties of a RbmStandaloneCard. */ + interface IRbmStandaloneCard { - /** ListSelect subtitle */ - subtitle?: (string|null); + /** RbmStandaloneCard cardOrientation */ + cardOrientation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|null); + + /** RbmStandaloneCard thumbnailImageAlignment */ + thumbnailImageAlignment?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|null); + + /** RbmStandaloneCard cardContent */ + cardContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null); } - /** Represents a ListSelect. */ - class ListSelect implements IListSelect { + /** Represents a RbmStandaloneCard. */ + class RbmStandaloneCard implements IRbmStandaloneCard { /** - * Constructs a new ListSelect. + * Constructs a new RbmStandaloneCard. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard); - /** ListSelect title. */ - public title: string; + /** RbmStandaloneCard cardOrientation. */ + public cardOrientation: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation); - /** ListSelect items. */ - public items: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem[]; + /** RbmStandaloneCard thumbnailImageAlignment. */ + public thumbnailImageAlignment: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment); - /** ListSelect subtitle. */ - public subtitle: string; + /** RbmStandaloneCard cardContent. */ + public cardContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null); /** - * Creates a new ListSelect instance using the specified properties. + * Creates a new RbmStandaloneCard instance using the specified properties. * @param [properties] Properties to set - * @returns ListSelect instance + * @returns RbmStandaloneCard instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; /** - * Encodes the specified ListSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. - * @param message ListSelect message or plain object to encode + * Encodes the specified RbmStandaloneCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. + * @param message RbmStandaloneCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. - * @param message ListSelect message or plain object to encode + * Encodes the specified RbmStandaloneCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. + * @param message RbmStandaloneCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSelect message from the specified reader or buffer. + * Decodes a RbmStandaloneCard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSelect + * @returns RbmStandaloneCard * @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.v2beta1.Intent.Message.ListSelect; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; /** - * Decodes a ListSelect message from the specified reader or buffer, length delimited. + * Decodes a RbmStandaloneCard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSelect + * @returns RbmStandaloneCard * @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.v2beta1.Intent.Message.ListSelect; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; /** - * Verifies a ListSelect message. + * Verifies a RbmStandaloneCard 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 ListSelect message from a plain object. Also converts values to their respective internal types. + * Creates a RbmStandaloneCard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSelect + * @returns RbmStandaloneCard */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; /** - * Creates a plain object from a ListSelect message. Also converts values to other types if specified. - * @param message ListSelect + * Creates a plain object from a RbmStandaloneCard message. Also converts values to other types if specified. + * @param message RbmStandaloneCard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSelect to JSON. + * Converts this RbmStandaloneCard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ListSelect { - - /** Properties of an Item. */ - interface IItem { - - /** Item info */ - info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); - - /** Item title */ - title?: (string|null); + namespace RbmStandaloneCard { - /** Item description */ - description?: (string|null); + /** CardOrientation enum. */ + enum CardOrientation { + CARD_ORIENTATION_UNSPECIFIED = 0, + HORIZONTAL = 1, + VERTICAL = 2 + } - /** Item image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** ThumbnailImageAlignment enum. */ + enum ThumbnailImageAlignment { + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0, + LEFT = 1, + RIGHT = 2 } + } - /** Represents an Item. */ - class Item implements IItem { + /** Properties of a RbmCardContent. */ + interface IRbmCardContent { - /** - * Constructs a new Item. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem); + /** RbmCardContent title */ + title?: (string|null); - /** Item info. */ - public info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); + /** RbmCardContent description */ + description?: (string|null); - /** Item title. */ - public title: string; + /** RbmCardContent media */ + media?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null); - /** Item description. */ - public description: string; + /** RbmCardContent suggestions */ + suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]|null); + } - /** Item image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** Represents a RbmCardContent. */ + class RbmCardContent implements IRbmCardContent { - /** - * Creates a new Item instance using the specified properties. - * @param [properties] Properties to set - * @returns Item instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; + /** + * Constructs a new RbmCardContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent); - /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. - * @param message Item message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + /** RbmCardContent title. */ + public title: string; - /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. - * @param message Item message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + /** RbmCardContent description. */ + public description: string; - /** - * Decodes an Item message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Item - * @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.v2beta1.Intent.Message.ListSelect.Item; + /** RbmCardContent media. */ + public media?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null); - /** - * Decodes an Item message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Item - * @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.v2beta1.Intent.Message.ListSelect.Item; + /** RbmCardContent suggestions. */ + public suggestions: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]; - /** - * Verifies an Item 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 Item message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Item - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item; - - /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @param message Item - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Item to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a CarouselSelect. */ - interface ICarouselSelect { - - /** CarouselSelect items */ - items?: (google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem[]|null); - } - - /** Represents a CarouselSelect. */ - class CarouselSelect implements ICarouselSelect { - - /** - * Constructs a new CarouselSelect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect); - - /** CarouselSelect items. */ - public items: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem[]; - - /** - * Creates a new CarouselSelect instance using the specified properties. - * @param [properties] Properties to set - * @returns CarouselSelect instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; + /** + * Creates a new RbmCardContent instance using the specified properties. + * @param [properties] Properties to set + * @returns RbmCardContent instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; /** - * Encodes the specified CarouselSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. - * @param message CarouselSelect message or plain object to encode + * Encodes the specified RbmCardContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. + * @param message RbmCardContent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CarouselSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. - * @param message CarouselSelect message or plain object to encode + * Encodes the specified RbmCardContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. + * @param message RbmCardContent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CarouselSelect message from the specified reader or buffer. + * Decodes a RbmCardContent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CarouselSelect + * @returns RbmCardContent * @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.v2beta1.Intent.Message.CarouselSelect; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; /** - * Decodes a CarouselSelect message from the specified reader or buffer, length delimited. + * Decodes a RbmCardContent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CarouselSelect + * @returns RbmCardContent * @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.v2beta1.Intent.Message.CarouselSelect; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; /** - * Verifies a CarouselSelect message. + * Verifies a RbmCardContent 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 CarouselSelect message from a plain object. Also converts values to their respective internal types. + * Creates a RbmCardContent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CarouselSelect + * @returns RbmCardContent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; /** - * Creates a plain object from a CarouselSelect message. Also converts values to other types if specified. - * @param message CarouselSelect + * Creates a plain object from a RbmCardContent message. Also converts values to other types if specified. + * @param message RbmCardContent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CarouselSelect to JSON. + * Converts this RbmCardContent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CarouselSelect { - - /** Properties of an Item. */ - interface IItem { + namespace RbmCardContent { - /** Item info */ - info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); + /** Properties of a RbmMedia. */ + interface IRbmMedia { - /** Item title */ - title?: (string|null); + /** RbmMedia fileUri */ + fileUri?: (string|null); - /** Item description */ - description?: (string|null); + /** RbmMedia thumbnailUri */ + thumbnailUri?: (string|null); - /** Item image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** RbmMedia height */ + height?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|null); } - /** Represents an Item. */ - class Item implements IItem { + /** Represents a RbmMedia. */ + class RbmMedia implements IRbmMedia { /** - * Constructs a new Item. + * Constructs a new RbmMedia. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem); - - /** Item info. */ - public info?: (google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia); - /** Item title. */ - public title: string; + /** RbmMedia fileUri. */ + public fileUri: string; - /** Item description. */ - public description: string; + /** RbmMedia thumbnailUri. */ + public thumbnailUri: string; - /** Item image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** RbmMedia height. */ + public height: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height); /** - * Creates a new Item instance using the specified properties. + * Creates a new RbmMedia instance using the specified properties. * @param [properties] Properties to set - * @returns Item instance + * @returns RbmMedia instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Encodes the specified RbmMedia message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. + * @param message RbmMedia message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. - * @param message Item message or plain object to encode + * Encodes the specified RbmMedia message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. + * @param message RbmMedia message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Item message from the specified reader or buffer. + * Decodes a RbmMedia message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Item + * @returns RbmMedia * @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.v2beta1.Intent.Message.CarouselSelect.Item; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; /** - * Decodes an Item message from the specified reader or buffer, length delimited. + * Decodes a RbmMedia message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Item + * @returns RbmMedia * @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.v2beta1.Intent.Message.CarouselSelect.Item; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; /** - * Verifies an Item message. + * Verifies a RbmMedia 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 Item message from a plain object. Also converts values to their respective internal types. + * Creates a RbmMedia message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Item + * @returns RbmMedia */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @param message Item + * Creates a plain object from a RbmMedia message. Also converts values to other types if specified. + * @param message RbmMedia * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Item to JSON. + * Converts this RbmMedia to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + + namespace RbmMedia { + + /** Height enum. */ + enum Height { + HEIGHT_UNSPECIFIED = 0, + SHORT = 1, + MEDIUM = 2, + TALL = 3 + } + } } - /** Properties of a SelectItemInfo. */ - interface ISelectItemInfo { + /** Properties of a RbmSuggestion. */ + interface IRbmSuggestion { - /** SelectItemInfo key */ - key?: (string|null); + /** RbmSuggestion reply */ + reply?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null); - /** SelectItemInfo synonyms */ - synonyms?: (string[]|null); + /** RbmSuggestion action */ + action?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null); } - /** Represents a SelectItemInfo. */ - class SelectItemInfo implements ISelectItemInfo { + /** Represents a RbmSuggestion. */ + class RbmSuggestion implements IRbmSuggestion { /** - * Constructs a new SelectItemInfo. + * Constructs a new RbmSuggestion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion); - /** SelectItemInfo key. */ - public key: string; + /** RbmSuggestion reply. */ + public reply?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null); - /** SelectItemInfo synonyms. */ - public synonyms: string[]; + /** RbmSuggestion action. */ + public action?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null); + + /** RbmSuggestion suggestion. */ + public suggestion?: ("reply"|"action"); /** - * Creates a new SelectItemInfo instance using the specified properties. + * Creates a new RbmSuggestion instance using the specified properties. * @param [properties] Properties to set - * @returns SelectItemInfo instance + * @returns RbmSuggestion instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; /** - * Encodes the specified SelectItemInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. - * @param message SelectItemInfo message or plain object to encode + * Encodes the specified RbmSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. + * @param message RbmSuggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SelectItemInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. - * @param message SelectItemInfo message or plain object to encode + * Encodes the specified RbmSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. + * @param message RbmSuggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SelectItemInfo message from the specified reader or buffer. + * Decodes a RbmSuggestion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SelectItemInfo + * @returns RbmSuggestion * @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.v2beta1.Intent.Message.SelectItemInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; /** - * Decodes a SelectItemInfo message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SelectItemInfo + * @returns RbmSuggestion * @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.v2beta1.Intent.Message.SelectItemInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; /** - * Verifies a SelectItemInfo message. + * Verifies a RbmSuggestion 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 SelectItemInfo message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SelectItemInfo + * @returns RbmSuggestion */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; /** - * Creates a plain object from a SelectItemInfo message. Also converts values to other types if specified. - * @param message SelectItemInfo + * Creates a plain object from a RbmSuggestion message. Also converts values to other types if specified. + * @param message RbmSuggestion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SelectItemInfo to JSON. + * Converts this RbmSuggestion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TelephonyPlayAudio. */ - interface ITelephonyPlayAudio { + /** Properties of a RbmSuggestedReply. */ + interface IRbmSuggestedReply { - /** TelephonyPlayAudio audioUri */ - audioUri?: (string|null); + /** RbmSuggestedReply text */ + text?: (string|null); + + /** RbmSuggestedReply postbackData */ + postbackData?: (string|null); } - /** Represents a TelephonyPlayAudio. */ - class TelephonyPlayAudio implements ITelephonyPlayAudio { + /** Represents a RbmSuggestedReply. */ + class RbmSuggestedReply implements IRbmSuggestedReply { /** - * Constructs a new TelephonyPlayAudio. + * Constructs a new RbmSuggestedReply. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply); - /** TelephonyPlayAudio audioUri. */ - public audioUri: string; + /** RbmSuggestedReply text. */ + public text: string; + + /** RbmSuggestedReply postbackData. */ + public postbackData: string; /** - * Creates a new TelephonyPlayAudio instance using the specified properties. + * Creates a new RbmSuggestedReply instance using the specified properties. * @param [properties] Properties to set - * @returns TelephonyPlayAudio instance + * @returns RbmSuggestedReply instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; /** - * Encodes the specified TelephonyPlayAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. - * @param message TelephonyPlayAudio message or plain object to encode + * Encodes the specified RbmSuggestedReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. + * @param message RbmSuggestedReply message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TelephonyPlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. - * @param message TelephonyPlayAudio message or plain object to encode + * Encodes the specified RbmSuggestedReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. + * @param message RbmSuggestedReply message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TelephonyPlayAudio message from the specified reader or buffer. + * Decodes a RbmSuggestedReply message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TelephonyPlayAudio + * @returns RbmSuggestedReply * @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.v2beta1.Intent.Message.TelephonyPlayAudio; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; /** - * Decodes a TelephonyPlayAudio message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestedReply message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TelephonyPlayAudio + * @returns RbmSuggestedReply * @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.v2beta1.Intent.Message.TelephonyPlayAudio; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; /** - * Verifies a TelephonyPlayAudio message. + * Verifies a RbmSuggestedReply 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 TelephonyPlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestedReply message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TelephonyPlayAudio + * @returns RbmSuggestedReply */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; /** - * Creates a plain object from a TelephonyPlayAudio message. Also converts values to other types if specified. - * @param message TelephonyPlayAudio + * Creates a plain object from a RbmSuggestedReply message. Also converts values to other types if specified. + * @param message RbmSuggestedReply * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TelephonyPlayAudio to JSON. + * Converts this RbmSuggestedReply to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TelephonySynthesizeSpeech. */ - interface ITelephonySynthesizeSpeech { + /** Properties of a RbmSuggestedAction. */ + interface IRbmSuggestedAction { - /** TelephonySynthesizeSpeech text */ + /** RbmSuggestedAction text */ text?: (string|null); - /** TelephonySynthesizeSpeech ssml */ - ssml?: (string|null); + /** RbmSuggestedAction postbackData */ + postbackData?: (string|null); + + /** RbmSuggestedAction dial */ + dial?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null); + + /** RbmSuggestedAction openUrl */ + openUrl?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null); + + /** RbmSuggestedAction shareLocation */ + shareLocation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null); } - /** Represents a TelephonySynthesizeSpeech. */ - class TelephonySynthesizeSpeech implements ITelephonySynthesizeSpeech { + /** Represents a RbmSuggestedAction. */ + class RbmSuggestedAction implements IRbmSuggestedAction { /** - * Constructs a new TelephonySynthesizeSpeech. + * Constructs a new RbmSuggestedAction. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction); - /** TelephonySynthesizeSpeech text. */ - public text?: (string|null); + /** RbmSuggestedAction text. */ + public text: string; - /** TelephonySynthesizeSpeech ssml. */ - public ssml?: (string|null); + /** RbmSuggestedAction postbackData. */ + public postbackData: string; - /** TelephonySynthesizeSpeech source. */ - public source?: ("text"|"ssml"); + /** RbmSuggestedAction dial. */ + public dial?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null); + + /** RbmSuggestedAction openUrl. */ + public openUrl?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null); + + /** RbmSuggestedAction shareLocation. */ + public shareLocation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null); + + /** RbmSuggestedAction action. */ + public action?: ("dial"|"openUrl"|"shareLocation"); /** - * Creates a new TelephonySynthesizeSpeech instance using the specified properties. + * Creates a new RbmSuggestedAction instance using the specified properties. * @param [properties] Properties to set - * @returns TelephonySynthesizeSpeech instance + * @returns RbmSuggestedAction instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; /** - * Encodes the specified TelephonySynthesizeSpeech message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. - * @param message TelephonySynthesizeSpeech message or plain object to encode + * Encodes the specified RbmSuggestedAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. + * @param message RbmSuggestedAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TelephonySynthesizeSpeech message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. - * @param message TelephonySynthesizeSpeech message or plain object to encode + * Encodes the specified RbmSuggestedAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. + * @param message RbmSuggestedAction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer. + * Decodes a RbmSuggestedAction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TelephonySynthesizeSpeech + * @returns RbmSuggestedAction * @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.v2beta1.Intent.Message.TelephonySynthesizeSpeech; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; /** - * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestedAction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TelephonySynthesizeSpeech + * @returns RbmSuggestedAction * @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.v2beta1.Intent.Message.TelephonySynthesizeSpeech; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; /** - * Verifies a TelephonySynthesizeSpeech message. + * Verifies a RbmSuggestedAction 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 TelephonySynthesizeSpeech message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestedAction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TelephonySynthesizeSpeech + * @returns RbmSuggestedAction */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; /** - * Creates a plain object from a TelephonySynthesizeSpeech message. Also converts values to other types if specified. - * @param message TelephonySynthesizeSpeech + * Creates a plain object from a RbmSuggestedAction message. Also converts values to other types if specified. + * @param message RbmSuggestedAction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TelephonySynthesizeSpeech to JSON. + * Converts this RbmSuggestedAction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TelephonyTransferCall. */ - interface ITelephonyTransferCall { + namespace RbmSuggestedAction { - /** TelephonyTransferCall phoneNumber */ - phoneNumber?: (string|null); - } + /** Properties of a RbmSuggestedActionDial. */ + interface IRbmSuggestedActionDial { - /** Represents a TelephonyTransferCall. */ - class TelephonyTransferCall implements ITelephonyTransferCall { + /** RbmSuggestedActionDial phoneNumber */ + phoneNumber?: (string|null); + } - /** - * Constructs a new TelephonyTransferCall. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall); + /** Represents a RbmSuggestedActionDial. */ + class RbmSuggestedActionDial implements IRbmSuggestedActionDial { - /** TelephonyTransferCall phoneNumber. */ - public phoneNumber: string; + /** + * Constructs a new RbmSuggestedActionDial. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial); - /** - * Creates a new TelephonyTransferCall instance using the specified properties. - * @param [properties] Properties to set - * @returns TelephonyTransferCall instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; + /** RbmSuggestedActionDial phoneNumber. */ + public phoneNumber: string; - /** - * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. - * @param message TelephonyTransferCall message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new RbmSuggestedActionDial instance using the specified properties. + * @param [properties] Properties to set + * @returns RbmSuggestedActionDial instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; - /** - * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. - * @param message TelephonyTransferCall message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified RbmSuggestedActionDial message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. + * @param message RbmSuggestedActionDial message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TelephonyTransferCall - * @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.v2beta1.Intent.Message.TelephonyTransferCall; + /** + * Encodes the specified RbmSuggestedActionDial message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. + * @param message RbmSuggestedActionDial message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TelephonyTransferCall - * @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.v2beta1.Intent.Message.TelephonyTransferCall; - - /** - * Verifies a TelephonyTransferCall 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 RbmSuggestedActionDial message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RbmSuggestedActionDial + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; - /** - * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TelephonyTransferCall - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall; + /** + * Decodes a RbmSuggestedActionDial message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RbmSuggestedActionDial + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @param message TelephonyTransferCall - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a RbmSuggestedActionDial 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 TelephonyTransferCall to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a RbmSuggestedActionDial message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RbmSuggestedActionDial + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; - /** Properties of a RbmText. */ - interface IRbmText { + /** + * Creates a plain object from a RbmSuggestedActionDial message. Also converts values to other types if specified. + * @param message RbmSuggestedActionDial + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RbmText text */ - text?: (string|null); + /** + * Converts this RbmSuggestedActionDial to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** RbmText rbmSuggestion */ - rbmSuggestion?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]|null); - } + /** Properties of a RbmSuggestedActionOpenUri. */ + interface IRbmSuggestedActionOpenUri { - /** Represents a RbmText. */ - class RbmText implements IRbmText { + /** RbmSuggestedActionOpenUri uri */ + uri?: (string|null); + } - /** - * Constructs a new RbmText. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText); + /** Represents a RbmSuggestedActionOpenUri. */ + class RbmSuggestedActionOpenUri implements IRbmSuggestedActionOpenUri { - /** RbmText text. */ - public text: string; + /** + * Constructs a new RbmSuggestedActionOpenUri. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri); - /** RbmText rbmSuggestion. */ - public rbmSuggestion: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]; + /** RbmSuggestedActionOpenUri uri. */ + public uri: string; - /** - * Creates a new RbmText instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmText instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; + /** + * Creates a new RbmSuggestedActionOpenUri instance using the specified properties. + * @param [properties] Properties to set + * @returns RbmSuggestedActionOpenUri instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; - /** - * Encodes the specified RbmText message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. - * @param message RbmText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified RbmSuggestedActionOpenUri message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. + * @param message RbmSuggestedActionOpenUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified RbmText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. - * @param message RbmText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified RbmSuggestedActionOpenUri message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. + * @param message RbmSuggestedActionOpenUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RbmText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmText - * @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.v2beta1.Intent.Message.RbmText; + /** + * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RbmSuggestedActionOpenUri + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; - /** - * Decodes a RbmText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmText - * @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.v2beta1.Intent.Message.RbmText; + /** + * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RbmSuggestedActionOpenUri + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; - /** - * Verifies a RbmText 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 RbmSuggestedActionOpenUri 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 RbmText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmText - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmText; + /** + * Creates a RbmSuggestedActionOpenUri message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RbmSuggestedActionOpenUri + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; - /** - * Creates a plain object from a RbmText message. Also converts values to other types if specified. - * @param message RbmText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a RbmSuggestedActionOpenUri message. Also converts values to other types if specified. + * @param message RbmSuggestedActionOpenUri + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this RbmText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this RbmSuggestedActionOpenUri to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a RbmCarouselCard. */ - interface IRbmCarouselCard { + /** Properties of a RbmSuggestedActionShareLocation. */ + interface IRbmSuggestedActionShareLocation { + } - /** RbmCarouselCard cardWidth */ - cardWidth?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|null); + /** Represents a RbmSuggestedActionShareLocation. */ + class RbmSuggestedActionShareLocation implements IRbmSuggestedActionShareLocation { - /** RbmCarouselCard cardContents */ - cardContents?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent[]|null); - } + /** + * Constructs a new RbmSuggestedActionShareLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation); - /** Represents a RbmCarouselCard. */ - class RbmCarouselCard implements IRbmCarouselCard { + /** + * Creates a new RbmSuggestedActionShareLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns RbmSuggestedActionShareLocation instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - /** - * Constructs a new RbmCarouselCard. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard); - - /** RbmCarouselCard cardWidth. */ - public cardWidth: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth); - - /** RbmCarouselCard cardContents. */ - public cardContents: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent[]; - - /** - * Creates a new RbmCarouselCard instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmCarouselCard instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; - - /** - * Encodes the specified RbmCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. - * @param message RbmCarouselCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RbmCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. - * @param message RbmCarouselCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RbmCarouselCard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmCarouselCard - * @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.v2beta1.Intent.Message.RbmCarouselCard; + /** + * Encodes the specified RbmSuggestedActionShareLocation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. + * @param message RbmSuggestedActionShareLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RbmCarouselCard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmCarouselCard - * @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.v2beta1.Intent.Message.RbmCarouselCard; + /** + * Encodes the specified RbmSuggestedActionShareLocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. + * @param message RbmSuggestedActionShareLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a RbmCarouselCard 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 RbmSuggestedActionShareLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RbmSuggestedActionShareLocation + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - /** - * Creates a RbmCarouselCard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmCarouselCard - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard; + /** + * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RbmSuggestedActionShareLocation + * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - /** - * Creates a plain object from a RbmCarouselCard message. Also converts values to other types if specified. - * @param message RbmCarouselCard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a RbmSuggestedActionShareLocation 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 RbmCarouselCard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a RbmSuggestedActionShareLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RbmSuggestedActionShareLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - namespace RbmCarouselCard { + /** + * Creates a plain object from a RbmSuggestedActionShareLocation message. Also converts values to other types if specified. + * @param message RbmSuggestedActionShareLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CardWidth enum. */ - enum CardWidth { - CARD_WIDTH_UNSPECIFIED = 0, - SMALL = 1, - MEDIUM = 2 + /** + * Converts this RbmSuggestedActionShareLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } } - /** Properties of a RbmStandaloneCard. */ - interface IRbmStandaloneCard { - - /** RbmStandaloneCard cardOrientation */ - cardOrientation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|null); + /** Properties of a MediaContent. */ + interface IMediaContent { - /** RbmStandaloneCard thumbnailImageAlignment */ - thumbnailImageAlignment?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|null); + /** MediaContent mediaType */ + mediaType?: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|null); - /** RbmStandaloneCard cardContent */ - cardContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null); + /** MediaContent mediaObjects */ + mediaObjects?: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject[]|null); } - /** Represents a RbmStandaloneCard. */ - class RbmStandaloneCard implements IRbmStandaloneCard { + /** Represents a MediaContent. */ + class MediaContent implements IMediaContent { /** - * Constructs a new RbmStandaloneCard. + * Constructs a new MediaContent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard); - - /** RbmStandaloneCard cardOrientation. */ - public cardOrientation: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent); - /** RbmStandaloneCard thumbnailImageAlignment. */ - public thumbnailImageAlignment: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment); + /** MediaContent mediaType. */ + public mediaType: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType); - /** RbmStandaloneCard cardContent. */ - public cardContent?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null); + /** MediaContent mediaObjects. */ + public mediaObjects: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject[]; /** - * Creates a new RbmStandaloneCard instance using the specified properties. + * Creates a new MediaContent instance using the specified properties. * @param [properties] Properties to set - * @returns RbmStandaloneCard instance + * @returns MediaContent instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; /** - * Encodes the specified RbmStandaloneCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. - * @param message RbmStandaloneCard message or plain object to encode + * Encodes the specified MediaContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. + * @param message MediaContent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RbmStandaloneCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. - * @param message RbmStandaloneCard message or plain object to encode + * Encodes the specified MediaContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. + * @param message MediaContent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RbmStandaloneCard message from the specified reader or buffer. + * Decodes a MediaContent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RbmStandaloneCard + * @returns MediaContent * @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.v2beta1.Intent.Message.RbmStandaloneCard; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; /** - * Decodes a RbmStandaloneCard message from the specified reader or buffer, length delimited. + * Decodes a MediaContent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RbmStandaloneCard + * @returns MediaContent * @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.v2beta1.Intent.Message.RbmStandaloneCard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; /** - * Verifies a RbmStandaloneCard message. + * Verifies a MediaContent 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 RbmStandaloneCard message from a plain object. Also converts values to their respective internal types. + * Creates a MediaContent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RbmStandaloneCard + * @returns MediaContent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; /** - * Creates a plain object from a RbmStandaloneCard message. Also converts values to other types if specified. - * @param message RbmStandaloneCard + * Creates a plain object from a MediaContent message. Also converts values to other types if specified. + * @param message MediaContent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RbmStandaloneCard to JSON. + * Converts this MediaContent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace RbmStandaloneCard { - - /** CardOrientation enum. */ - enum CardOrientation { - CARD_ORIENTATION_UNSPECIFIED = 0, - HORIZONTAL = 1, - VERTICAL = 2 - } + namespace MediaContent { - /** ThumbnailImageAlignment enum. */ - enum ThumbnailImageAlignment { - THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0, - LEFT = 1, - RIGHT = 2 + /** ResponseMediaType enum. */ + enum ResponseMediaType { + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0, + AUDIO = 1 } - } - /** Properties of a RbmCardContent. */ - interface IRbmCardContent { + /** Properties of a ResponseMediaObject. */ + interface IResponseMediaObject { - /** RbmCardContent title */ - title?: (string|null); + /** ResponseMediaObject name */ + name?: (string|null); - /** RbmCardContent description */ - description?: (string|null); + /** ResponseMediaObject description */ + description?: (string|null); - /** RbmCardContent media */ - media?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null); + /** ResponseMediaObject largeImage */ + largeImage?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** RbmCardContent suggestions */ - suggestions?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]|null); - } + /** ResponseMediaObject icon */ + icon?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** Represents a RbmCardContent. */ - class RbmCardContent implements IRbmCardContent { - - /** - * Constructs a new RbmCardContent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent); - - /** RbmCardContent title. */ - public title: string; - - /** RbmCardContent description. */ - public description: string; - - /** RbmCardContent media. */ - public media?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null); - - /** RbmCardContent suggestions. */ - public suggestions: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion[]; - - /** - * Creates a new RbmCardContent instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmCardContent instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; - - /** - * Encodes the specified RbmCardContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. - * @param message RbmCardContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RbmCardContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. - * @param message RbmCardContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RbmCardContent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmCardContent - * @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.v2beta1.Intent.Message.RbmCardContent; - - /** - * Decodes a RbmCardContent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmCardContent - * @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.v2beta1.Intent.Message.RbmCardContent; - - /** - * Verifies a RbmCardContent 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 RbmCardContent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmCardContent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent; - - /** - * Creates a plain object from a RbmCardContent message. Also converts values to other types if specified. - * @param message RbmCardContent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RbmCardContent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace RbmCardContent { - - /** Properties of a RbmMedia. */ - interface IRbmMedia { - - /** RbmMedia fileUri */ - fileUri?: (string|null); - - /** RbmMedia thumbnailUri */ - thumbnailUri?: (string|null); - - /** RbmMedia height */ - height?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|null); + /** ResponseMediaObject contentUrl */ + contentUrl?: (string|null); } - /** Represents a RbmMedia. */ - class RbmMedia implements IRbmMedia { + /** Represents a ResponseMediaObject. */ + class ResponseMediaObject implements IResponseMediaObject { /** - * Constructs a new RbmMedia. + * Constructs a new ResponseMediaObject. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject); - /** RbmMedia fileUri. */ - public fileUri: string; + /** ResponseMediaObject name. */ + public name: string; - /** RbmMedia thumbnailUri. */ - public thumbnailUri: string; + /** ResponseMediaObject description. */ + public description: string; - /** RbmMedia height. */ - public height: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height); + /** ResponseMediaObject largeImage. */ + public largeImage?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + + /** ResponseMediaObject icon. */ + public icon?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + + /** ResponseMediaObject contentUrl. */ + public contentUrl: string; + + /** ResponseMediaObject image. */ + public image?: ("largeImage"|"icon"); /** - * Creates a new RbmMedia instance using the specified properties. + * Creates a new ResponseMediaObject instance using the specified properties. * @param [properties] Properties to set - * @returns RbmMedia instance + * @returns ResponseMediaObject instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; /** - * Encodes the specified RbmMedia message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. - * @param message RbmMedia message or plain object to encode + * Encodes the specified ResponseMediaObject message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. + * @param message ResponseMediaObject message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RbmMedia message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. - * @param message RbmMedia message or plain object to encode + * Encodes the specified ResponseMediaObject message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. + * @param message ResponseMediaObject message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RbmMedia message from the specified reader or buffer. + * Decodes a ResponseMediaObject message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RbmMedia + * @returns ResponseMediaObject * @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.v2beta1.Intent.Message.RbmCardContent.RbmMedia; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; /** - * Decodes a RbmMedia message from the specified reader or buffer, length delimited. + * Decodes a ResponseMediaObject message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RbmMedia + * @returns ResponseMediaObject * @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.v2beta1.Intent.Message.RbmCardContent.RbmMedia; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; /** - * Verifies a RbmMedia message. + * Verifies a ResponseMediaObject 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 RbmMedia message from a plain object. Also converts values to their respective internal types. + * Creates a ResponseMediaObject message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RbmMedia + * @returns ResponseMediaObject */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; /** - * Creates a plain object from a RbmMedia message. Also converts values to other types if specified. - * @param message RbmMedia + * Creates a plain object from a ResponseMediaObject message. Also converts values to other types if specified. + * @param message ResponseMediaObject * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RbmMedia to JSON. + * Converts this ResponseMediaObject to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - - namespace RbmMedia { - - /** Height enum. */ - enum Height { - HEIGHT_UNSPECIFIED = 0, - SHORT = 1, - MEDIUM = 2, - TALL = 3 - } - } } - /** Properties of a RbmSuggestion. */ - interface IRbmSuggestion { + /** Properties of a BrowseCarouselCard. */ + interface IBrowseCarouselCard { - /** RbmSuggestion reply */ - reply?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null); + /** BrowseCarouselCard items */ + items?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem[]|null); - /** RbmSuggestion action */ - action?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null); + /** BrowseCarouselCard imageDisplayOptions */ + imageDisplayOptions?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|null); } - /** Represents a RbmSuggestion. */ - class RbmSuggestion implements IRbmSuggestion { + /** Represents a BrowseCarouselCard. */ + class BrowseCarouselCard implements IBrowseCarouselCard { /** - * Constructs a new RbmSuggestion. + * Constructs a new BrowseCarouselCard. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion); - - /** RbmSuggestion reply. */ - public reply?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard); - /** RbmSuggestion action. */ - public action?: (google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null); + /** BrowseCarouselCard items. */ + public items: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem[]; - /** RbmSuggestion suggestion. */ - public suggestion?: ("reply"|"action"); + /** BrowseCarouselCard imageDisplayOptions. */ + public imageDisplayOptions: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions); /** - * Creates a new RbmSuggestion instance using the specified properties. + * Creates a new BrowseCarouselCard instance using the specified properties. * @param [properties] Properties to set - * @returns RbmSuggestion instance + * @returns BrowseCarouselCard instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; /** - * Encodes the specified RbmSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. - * @param message RbmSuggestion message or plain object to encode + * Encodes the specified BrowseCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. + * @param message BrowseCarouselCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RbmSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. - * @param message RbmSuggestion message or plain object to encode + * Encodes the specified BrowseCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. + * @param message BrowseCarouselCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RbmSuggestion message from the specified reader or buffer. + * Decodes a BrowseCarouselCard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RbmSuggestion + * @returns BrowseCarouselCard * @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.v2beta1.Intent.Message.RbmSuggestion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; /** - * Decodes a RbmSuggestion message from the specified reader or buffer, length delimited. + * Decodes a BrowseCarouselCard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RbmSuggestion + * @returns BrowseCarouselCard * @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.v2beta1.Intent.Message.RbmSuggestion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; /** - * Verifies a RbmSuggestion message. + * Verifies a BrowseCarouselCard 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 RbmSuggestion message from a plain object. Also converts values to their respective internal types. + * Creates a BrowseCarouselCard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RbmSuggestion + * @returns BrowseCarouselCard */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; /** - * Creates a plain object from a RbmSuggestion message. Also converts values to other types if specified. - * @param message RbmSuggestion + * Creates a plain object from a BrowseCarouselCard message. Also converts values to other types if specified. + * @param message BrowseCarouselCard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RbmSuggestion to JSON. + * Converts this BrowseCarouselCard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a RbmSuggestedReply. */ - interface IRbmSuggestedReply { + namespace BrowseCarouselCard { - /** RbmSuggestedReply text */ - text?: (string|null); + /** Properties of a BrowseCarouselCardItem. */ + interface IBrowseCarouselCardItem { - /** RbmSuggestedReply postbackData */ - postbackData?: (string|null); - } + /** BrowseCarouselCardItem openUriAction */ + openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null); - /** Represents a RbmSuggestedReply. */ - class RbmSuggestedReply implements IRbmSuggestedReply { + /** BrowseCarouselCardItem title */ + title?: (string|null); - /** - * Constructs a new RbmSuggestedReply. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply); + /** BrowseCarouselCardItem description */ + description?: (string|null); - /** RbmSuggestedReply text. */ - public text: string; + /** BrowseCarouselCardItem image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** RbmSuggestedReply postbackData. */ - public postbackData: string; + /** BrowseCarouselCardItem footer */ + footer?: (string|null); + } - /** - * Creates a new RbmSuggestedReply instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmSuggestedReply instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; + /** Represents a BrowseCarouselCardItem. */ + class BrowseCarouselCardItem implements IBrowseCarouselCardItem { - /** - * Encodes the specified RbmSuggestedReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. - * @param message RbmSuggestedReply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new BrowseCarouselCardItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem); - /** - * Encodes the specified RbmSuggestedReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. - * @param message RbmSuggestedReply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply, writer?: $protobuf.Writer): $protobuf.Writer; + /** BrowseCarouselCardItem openUriAction. */ + public openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null); - /** - * Decodes a RbmSuggestedReply message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmSuggestedReply - * @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.v2beta1.Intent.Message.RbmSuggestedReply; + /** BrowseCarouselCardItem title. */ + public title: string; - /** - * Decodes a RbmSuggestedReply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmSuggestedReply - * @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.v2beta1.Intent.Message.RbmSuggestedReply; + /** BrowseCarouselCardItem description. */ + public description: string; - /** - * Verifies a RbmSuggestedReply 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); + /** BrowseCarouselCardItem image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); - /** - * Creates a RbmSuggestedReply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmSuggestedReply - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply; + /** BrowseCarouselCardItem footer. */ + public footer: string; - /** - * Creates a plain object from a RbmSuggestedReply message. Also converts values to other types if specified. - * @param message RbmSuggestedReply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new BrowseCarouselCardItem instance using the specified properties. + * @param [properties] Properties to set + * @returns BrowseCarouselCardItem instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; - /** - * Converts this RbmSuggestedReply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified BrowseCarouselCardItem message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. + * @param message BrowseCarouselCardItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a RbmSuggestedAction. */ - interface IRbmSuggestedAction { + /** + * Encodes the specified BrowseCarouselCardItem message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. + * @param message BrowseCarouselCardItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem, writer?: $protobuf.Writer): $protobuf.Writer; - /** RbmSuggestedAction text */ - text?: (string|null); + /** + * Decodes a BrowseCarouselCardItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BrowseCarouselCardItem + * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; - /** RbmSuggestedAction postbackData */ - postbackData?: (string|null); + /** + * Decodes a BrowseCarouselCardItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BrowseCarouselCardItem + * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; - /** RbmSuggestedAction dial */ - dial?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null); + /** + * Verifies a BrowseCarouselCardItem 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); - /** RbmSuggestedAction openUrl */ - openUrl?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null); + /** + * Creates a BrowseCarouselCardItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BrowseCarouselCardItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; - /** RbmSuggestedAction shareLocation */ - shareLocation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null); - } + /** + * Creates a plain object from a BrowseCarouselCardItem message. Also converts values to other types if specified. + * @param message BrowseCarouselCardItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a RbmSuggestedAction. */ - class RbmSuggestedAction implements IRbmSuggestedAction { + /** + * Converts this BrowseCarouselCardItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new RbmSuggestedAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction); + namespace BrowseCarouselCardItem { - /** RbmSuggestedAction text. */ - public text: string; + /** Properties of an OpenUrlAction. */ + interface IOpenUrlAction { - /** RbmSuggestedAction postbackData. */ - public postbackData: string; + /** OpenUrlAction url */ + url?: (string|null); - /** RbmSuggestedAction dial. */ - public dial?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null); + /** OpenUrlAction urlTypeHint */ + urlTypeHint?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|null); + } - /** RbmSuggestedAction openUrl. */ - public openUrl?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null); + /** Represents an OpenUrlAction. */ + class OpenUrlAction implements IOpenUrlAction { - /** RbmSuggestedAction shareLocation. */ - public shareLocation?: (google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null); + /** + * Constructs a new OpenUrlAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction); - /** RbmSuggestedAction action. */ - public action?: ("dial"|"openUrl"|"shareLocation"); + /** OpenUrlAction url. */ + public url: string; - /** - * Creates a new RbmSuggestedAction instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmSuggestedAction instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; + /** OpenUrlAction urlTypeHint. */ + public urlTypeHint: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint); - /** - * Encodes the specified RbmSuggestedAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. - * @param message RbmSuggestedAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new OpenUrlAction instance using the specified properties. + * @param [properties] Properties to set + * @returns OpenUrlAction instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + + /** + * Encodes the specified OpenUrlAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. + * @param message OpenUrlAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpenUrlAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. + * @param message OpenUrlAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpenUrlAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpenUrlAction + * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + + /** + * Decodes an OpenUrlAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpenUrlAction + * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + + /** + * Verifies an OpenUrlAction 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 OpenUrlAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpenUrlAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + + /** + * Creates a plain object from an OpenUrlAction message. Also converts values to other types if specified. + * @param message OpenUrlAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpenUrlAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace OpenUrlAction { + + /** UrlTypeHint enum. */ + enum UrlTypeHint { + URL_TYPE_HINT_UNSPECIFIED = 0, + AMP_ACTION = 1, + AMP_CONTENT = 2 + } + } + } + + /** ImageDisplayOptions enum. */ + enum ImageDisplayOptions { + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0, + GRAY = 1, + WHITE = 2, + CROPPED = 3, + BLURRED_BACKGROUND = 4 + } + } + + /** Properties of a TableCard. */ + interface ITableCard { + + /** TableCard title */ + title?: (string|null); + + /** TableCard subtitle */ + subtitle?: (string|null); + + /** TableCard image */ + image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + + /** TableCard columnProperties */ + columnProperties?: (google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties[]|null); + + /** TableCard rows */ + rows?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow[]|null); + + /** TableCard buttons */ + buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]|null); + } + + /** Represents a TableCard. */ + class TableCard implements ITableCard { /** - * Encodes the specified RbmSuggestedAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. - * @param message RbmSuggestedAction message or plain object to encode + * Constructs a new TableCard. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard); + + /** TableCard title. */ + public title: string; + + /** TableCard subtitle. */ + public subtitle: string; + + /** TableCard image. */ + public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + + /** TableCard columnProperties. */ + public columnProperties: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties[]; + + /** TableCard rows. */ + public rows: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow[]; + + /** TableCard buttons. */ + public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]; + + /** + * Creates a new TableCard instance using the specified properties. + * @param [properties] Properties to set + * @returns TableCard instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; + + /** + * Encodes the specified TableCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. + * @param message TableCard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RbmSuggestedAction message from the specified reader or buffer. + * Encodes the specified TableCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. + * @param message TableCard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableCard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RbmSuggestedAction + * @returns TableCard * @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.v2beta1.Intent.Message.RbmSuggestedAction; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; /** - * Decodes a RbmSuggestedAction message from the specified reader or buffer, length delimited. + * Decodes a TableCard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RbmSuggestedAction + * @returns TableCard * @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.v2beta1.Intent.Message.RbmSuggestedAction; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; /** - * Verifies a RbmSuggestedAction message. + * Verifies a TableCard 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 RbmSuggestedAction message from a plain object. Also converts values to their respective internal types. + * Creates a TableCard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RbmSuggestedAction + * @returns TableCard */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; /** - * Creates a plain object from a RbmSuggestedAction message. Also converts values to other types if specified. - * @param message RbmSuggestedAction + * Creates a plain object from a TableCard message. Also converts values to other types if specified. + * @param message TableCard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RbmSuggestedAction to JSON. + * Converts this TableCard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace RbmSuggestedAction { + /** Properties of a ColumnProperties. */ + interface IColumnProperties { - /** Properties of a RbmSuggestedActionDial. */ - interface IRbmSuggestedActionDial { + /** ColumnProperties header */ + header?: (string|null); - /** RbmSuggestedActionDial phoneNumber */ - phoneNumber?: (string|null); - } + /** ColumnProperties horizontalAlignment */ + horizontalAlignment?: (google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|null); + } - /** Represents a RbmSuggestedActionDial. */ - class RbmSuggestedActionDial implements IRbmSuggestedActionDial { + /** Represents a ColumnProperties. */ + class ColumnProperties implements IColumnProperties { - /** - * Constructs a new RbmSuggestedActionDial. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial); + /** + * Constructs a new ColumnProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties); - /** RbmSuggestedActionDial phoneNumber. */ - public phoneNumber: string; + /** ColumnProperties header. */ + public header: string; - /** - * Creates a new RbmSuggestedActionDial instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmSuggestedActionDial instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; + /** ColumnProperties horizontalAlignment. */ + public horizontalAlignment: (google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment); - /** - * Encodes the specified RbmSuggestedActionDial message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. - * @param message RbmSuggestedActionDial message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ColumnProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnProperties instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties): google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties; - /** - * Encodes the specified RbmSuggestedActionDial message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. - * @param message RbmSuggestedActionDial message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ColumnProperties message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. + * @param message ColumnProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RbmSuggestedActionDial message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmSuggestedActionDial - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; + /** + * Encodes the specified ColumnProperties message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. + * @param message ColumnProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a RbmSuggestedActionDial message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmSuggestedActionDial - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; + /** + * Decodes a ColumnProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnProperties + * @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.v2beta1.Intent.Message.ColumnProperties; - /** - * Verifies a RbmSuggestedActionDial 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 ColumnProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnProperties + * @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.v2beta1.Intent.Message.ColumnProperties; - /** - * Creates a RbmSuggestedActionDial message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmSuggestedActionDial - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial; + /** + * Verifies a ColumnProperties 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 RbmSuggestedActionDial message. Also converts values to other types if specified. - * @param message RbmSuggestedActionDial - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ColumnProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties; - /** - * Converts this RbmSuggestedActionDial to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a ColumnProperties message. Also converts values to other types if specified. + * @param message ColumnProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a RbmSuggestedActionOpenUri. */ - interface IRbmSuggestedActionOpenUri { + /** + * Converts this ColumnProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** RbmSuggestedActionOpenUri uri */ - uri?: (string|null); + namespace ColumnProperties { + + /** HorizontalAlignment enum. */ + enum HorizontalAlignment { + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0, + LEADING = 1, + CENTER = 2, + TRAILING = 3 } + } - /** Represents a RbmSuggestedActionOpenUri. */ - class RbmSuggestedActionOpenUri implements IRbmSuggestedActionOpenUri { + /** Properties of a TableCardRow. */ + interface ITableCardRow { - /** - * Constructs a new RbmSuggestedActionOpenUri. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri); + /** TableCardRow cells */ + cells?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell[]|null); - /** RbmSuggestedActionOpenUri uri. */ - public uri: string; + /** TableCardRow dividerAfter */ + dividerAfter?: (boolean|null); + } - /** - * Creates a new RbmSuggestedActionOpenUri instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmSuggestedActionOpenUri instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; + /** Represents a TableCardRow. */ + class TableCardRow implements ITableCardRow { - /** - * Encodes the specified RbmSuggestedActionOpenUri message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. - * @param message RbmSuggestedActionOpenUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new TableCardRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow); - /** - * Encodes the specified RbmSuggestedActionOpenUri message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. - * @param message RbmSuggestedActionOpenUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri, writer?: $protobuf.Writer): $protobuf.Writer; + /** TableCardRow cells. */ + public cells: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell[]; - /** - * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmSuggestedActionOpenUri - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; + /** TableCardRow dividerAfter. */ + public dividerAfter: boolean; - /** - * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmSuggestedActionOpenUri - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; + /** + * Creates a new TableCardRow instance using the specified properties. + * @param [properties] Properties to set + * @returns TableCardRow instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow; - /** - * Verifies a RbmSuggestedActionOpenUri 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 TableCardRow message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. + * @param message TableCardRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a RbmSuggestedActionOpenUri message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmSuggestedActionOpenUri - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri; + /** + * Encodes the specified TableCardRow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. + * @param message TableCardRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a RbmSuggestedActionOpenUri message. Also converts values to other types if specified. - * @param message RbmSuggestedActionOpenUri - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a TableCardRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableCardRow + * @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.v2beta1.Intent.Message.TableCardRow; - /** - * Converts this RbmSuggestedActionOpenUri to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a TableCardRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableCardRow + * @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.v2beta1.Intent.Message.TableCardRow; - /** Properties of a RbmSuggestedActionShareLocation. */ - interface IRbmSuggestedActionShareLocation { - } + /** + * Verifies a TableCardRow 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 RbmSuggestedActionShareLocation. */ - class RbmSuggestedActionShareLocation implements IRbmSuggestedActionShareLocation { + /** + * Creates a TableCardRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableCardRow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow; - /** - * Constructs a new RbmSuggestedActionShareLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation); + /** + * Creates a plain object from a TableCardRow message. Also converts values to other types if specified. + * @param message TableCardRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new RbmSuggestedActionShareLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns RbmSuggestedActionShareLocation instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - - /** - * Encodes the specified RbmSuggestedActionShareLocation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. - * @param message RbmSuggestedActionShareLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RbmSuggestedActionShareLocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. - * @param message RbmSuggestedActionShareLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RbmSuggestedActionShareLocation - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - - /** - * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RbmSuggestedActionShareLocation - * @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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - - /** - * Verifies a RbmSuggestedActionShareLocation 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 RbmSuggestedActionShareLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RbmSuggestedActionShareLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation; - - /** - * Creates a plain object from a RbmSuggestedActionShareLocation message. Also converts values to other types if specified. - * @param message RbmSuggestedActionShareLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RbmSuggestedActionShareLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this TableCardRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a MediaContent. */ - interface IMediaContent { - - /** MediaContent mediaType */ - mediaType?: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|null); + /** Properties of a TableCardCell. */ + interface ITableCardCell { - /** MediaContent mediaObjects */ - mediaObjects?: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject[]|null); + /** TableCardCell text */ + text?: (string|null); } - /** Represents a MediaContent. */ - class MediaContent implements IMediaContent { + /** Represents a TableCardCell. */ + class TableCardCell implements ITableCardCell { /** - * Constructs a new MediaContent. + * Constructs a new TableCardCell. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent); - - /** MediaContent mediaType. */ - public mediaType: (google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType); + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell); - /** MediaContent mediaObjects. */ - public mediaObjects: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject[]; + /** TableCardCell text. */ + public text: string; /** - * Creates a new MediaContent instance using the specified properties. + * Creates a new TableCardCell instance using the specified properties. * @param [properties] Properties to set - * @returns MediaContent instance + * @returns TableCardCell instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; /** - * Encodes the specified MediaContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. - * @param message MediaContent message or plain object to encode + * Encodes the specified TableCardCell message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. + * @param message TableCardCell message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MediaContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. - * @param message MediaContent message or plain object to encode + * Encodes the specified TableCardCell message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. + * @param message TableCardCell message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MediaContent message from the specified reader or buffer. + * Decodes a TableCardCell message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MediaContent + * @returns TableCardCell * @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.v2beta1.Intent.Message.MediaContent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; /** - * Decodes a MediaContent message from the specified reader or buffer, length delimited. + * Decodes a TableCardCell message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MediaContent + * @returns TableCardCell * @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.v2beta1.Intent.Message.MediaContent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; /** - * Verifies a MediaContent message. + * Verifies a TableCardCell 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 MediaContent message from a plain object. Also converts values to their respective internal types. + * Creates a TableCardCell message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MediaContent + * @returns TableCardCell */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; /** - * Creates a plain object from a MediaContent message. Also converts values to other types if specified. - * @param message MediaContent + * Creates a plain object from a TableCardCell message. Also converts values to other types if specified. + * @param message TableCardCell * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MediaContent to JSON. + * Converts this TableCardCell to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - namespace MediaContent { + /** Properties of a FollowupIntentInfo. */ + interface IFollowupIntentInfo { - /** ResponseMediaType enum. */ - enum ResponseMediaType { - RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0, - AUDIO = 1 - } + /** FollowupIntentInfo followupIntentName */ + followupIntentName?: (string|null); - /** Properties of a ResponseMediaObject. */ - interface IResponseMediaObject { + /** FollowupIntentInfo parentFollowupIntentName */ + parentFollowupIntentName?: (string|null); + } - /** ResponseMediaObject name */ - name?: (string|null); + /** Represents a FollowupIntentInfo. */ + class FollowupIntentInfo implements IFollowupIntentInfo { - /** ResponseMediaObject description */ - description?: (string|null); + /** + * Constructs a new FollowupIntentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo); - /** ResponseMediaObject largeImage */ - largeImage?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** FollowupIntentInfo followupIntentName. */ + public followupIntentName: string; - /** ResponseMediaObject icon */ - icon?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** FollowupIntentInfo parentFollowupIntentName. */ + public parentFollowupIntentName: string; - /** ResponseMediaObject contentUrl */ - contentUrl?: (string|null); - } + /** + * Creates a new FollowupIntentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FollowupIntentInfo instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo): google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo; - /** Represents a ResponseMediaObject. */ - class ResponseMediaObject implements IResponseMediaObject { + /** + * Encodes the specified FollowupIntentInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. + * @param message FollowupIntentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ResponseMediaObject. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject); + /** + * Encodes the specified FollowupIntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. + * @param message FollowupIntentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResponseMediaObject name. */ - public name: string; + /** + * Decodes a FollowupIntentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FollowupIntentInfo + * @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.v2beta1.Intent.FollowupIntentInfo; - /** ResponseMediaObject description. */ - public description: string; + /** + * Decodes a FollowupIntentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FollowupIntentInfo + * @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.v2beta1.Intent.FollowupIntentInfo; - /** ResponseMediaObject largeImage. */ - public largeImage?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** + * Verifies a FollowupIntentInfo 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); - /** ResponseMediaObject icon. */ - public icon?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** + * Creates a FollowupIntentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FollowupIntentInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo; - /** ResponseMediaObject contentUrl. */ - public contentUrl: string; + /** + * Creates a plain object from a FollowupIntentInfo message. Also converts values to other types if specified. + * @param message FollowupIntentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ResponseMediaObject image. */ - public image?: ("largeImage"|"icon"); - - /** - * Creates a new ResponseMediaObject instance using the specified properties. - * @param [properties] Properties to set - * @returns ResponseMediaObject instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; + /** + * Converts this FollowupIntentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** - * Encodes the specified ResponseMediaObject message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. - * @param message ResponseMediaObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a ListIntentsRequest. */ + interface IListIntentsRequest { - /** - * Encodes the specified ResponseMediaObject message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. - * @param message ResponseMediaObject message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListIntentsRequest parent */ + parent?: (string|null); - /** - * Decodes a ResponseMediaObject message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseMediaObject - * @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.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; + /** ListIntentsRequest languageCode */ + languageCode?: (string|null); - /** - * Decodes a ResponseMediaObject message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseMediaObject - * @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.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; + /** ListIntentsRequest intentView */ + intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); - /** - * Verifies a ResponseMediaObject 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); + /** ListIntentsRequest pageSize */ + pageSize?: (number|null); - /** - * Creates a ResponseMediaObject message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseMediaObject - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject; + /** ListIntentsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Creates a plain object from a ResponseMediaObject message. Also converts values to other types if specified. - * @param message ResponseMediaObject - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ListIntentsRequest. */ + class ListIntentsRequest implements IListIntentsRequest { - /** - * Converts this ResponseMediaObject to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Constructs a new ListIntentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListIntentsRequest); - /** Properties of a BrowseCarouselCard. */ - interface IBrowseCarouselCard { + /** ListIntentsRequest parent. */ + public parent: string; - /** BrowseCarouselCard items */ - items?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem[]|null); + /** ListIntentsRequest languageCode. */ + public languageCode: string; - /** BrowseCarouselCard imageDisplayOptions */ - imageDisplayOptions?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|null); - } + /** ListIntentsRequest intentView. */ + public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - /** Represents a BrowseCarouselCard. */ - class BrowseCarouselCard implements IBrowseCarouselCard { + /** ListIntentsRequest pageSize. */ + public pageSize: number; - /** - * Constructs a new BrowseCarouselCard. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard); + /** ListIntentsRequest pageToken. */ + public pageToken: string; - /** BrowseCarouselCard items. */ - public items: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem[]; + /** + * Creates a new ListIntentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIntentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListIntentsRequest): google.cloud.dialogflow.v2beta1.ListIntentsRequest; - /** BrowseCarouselCard imageDisplayOptions. */ - public imageDisplayOptions: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions); + /** + * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new BrowseCarouselCard instance using the specified properties. - * @param [properties] Properties to set - * @returns BrowseCarouselCard instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; + /** + * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BrowseCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. - * @param message BrowseCarouselCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 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.v2beta1.ListIntentsRequest; - /** - * Encodes the specified BrowseCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. - * @param message BrowseCarouselCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.ListIntentsRequest; - /** - * Decodes a BrowseCarouselCard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BrowseCarouselCard - * @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.v2beta1.Intent.Message.BrowseCarouselCard; + /** + * 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); - /** - * Decodes a BrowseCarouselCard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BrowseCarouselCard - * @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.v2beta1.Intent.Message.BrowseCarouselCard; + /** + * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIntentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListIntentsRequest; - /** - * Verifies a BrowseCarouselCard 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 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.v2beta1.ListIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a BrowseCarouselCard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BrowseCarouselCard - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard; + /** + * Converts this ListIntentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a plain object from a BrowseCarouselCard message. Also converts values to other types if specified. - * @param message BrowseCarouselCard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ListIntentsResponse. */ + interface IListIntentsResponse { - /** - * Converts this BrowseCarouselCard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListIntentsResponse intents */ + intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); - namespace BrowseCarouselCard { + /** ListIntentsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** Properties of a BrowseCarouselCardItem. */ - interface IBrowseCarouselCardItem { + /** Represents a ListIntentsResponse. */ + class ListIntentsResponse implements IListIntentsResponse { - /** BrowseCarouselCardItem openUriAction */ - openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null); - - /** BrowseCarouselCardItem title */ - title?: (string|null); + /** + * Constructs a new ListIntentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListIntentsResponse); - /** BrowseCarouselCardItem description */ - description?: (string|null); + /** ListIntentsResponse intents. */ + public intents: google.cloud.dialogflow.v2beta1.IIntent[]; - /** BrowseCarouselCardItem image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** ListIntentsResponse nextPageToken. */ + public nextPageToken: string; - /** BrowseCarouselCardItem footer */ - footer?: (string|null); - } + /** + * Creates a new ListIntentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIntentsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListIntentsResponse): google.cloud.dialogflow.v2beta1.ListIntentsResponse; - /** Represents a BrowseCarouselCardItem. */ - class BrowseCarouselCardItem implements IBrowseCarouselCardItem { + /** + * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new BrowseCarouselCardItem. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem); + /** + * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** BrowseCarouselCardItem openUriAction. */ - public openUriAction?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null); + /** + * 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 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.v2beta1.ListIntentsResponse; - /** BrowseCarouselCardItem title. */ - public title: string; + /** + * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.ListIntentsResponse; - /** BrowseCarouselCardItem description. */ - public description: string; + /** + * 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); - /** BrowseCarouselCardItem image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** + * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIntentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListIntentsResponse; - /** BrowseCarouselCardItem footer. */ - public footer: string; + /** + * 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.v2beta1.ListIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new BrowseCarouselCardItem instance using the specified properties. - * @param [properties] Properties to set - * @returns BrowseCarouselCardItem instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; + /** + * Converts this ListIntentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified BrowseCarouselCardItem message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. - * @param message BrowseCarouselCardItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a GetIntentRequest. */ + interface IGetIntentRequest { - /** - * Encodes the specified BrowseCarouselCardItem message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. - * @param message BrowseCarouselCardItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem, writer?: $protobuf.Writer): $protobuf.Writer; + /** GetIntentRequest name */ + name?: (string|null); - /** - * Decodes a BrowseCarouselCardItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BrowseCarouselCardItem - * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; + /** GetIntentRequest languageCode */ + languageCode?: (string|null); - /** - * Decodes a BrowseCarouselCardItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BrowseCarouselCardItem - * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; + /** GetIntentRequest intentView */ + intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + } - /** - * Verifies a BrowseCarouselCardItem 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 GetIntentRequest. */ + class GetIntentRequest implements IGetIntentRequest { - /** - * Creates a BrowseCarouselCardItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BrowseCarouselCardItem - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem; + /** + * Constructs a new GetIntentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetIntentRequest); - /** - * Creates a plain object from a BrowseCarouselCardItem message. Also converts values to other types if specified. - * @param message BrowseCarouselCardItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GetIntentRequest name. */ + public name: string; - /** - * Converts this BrowseCarouselCardItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GetIntentRequest languageCode. */ + public languageCode: string; - namespace BrowseCarouselCardItem { + /** GetIntentRequest intentView. */ + public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - /** Properties of an OpenUrlAction. */ - interface IOpenUrlAction { + /** + * Creates a new GetIntentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIntentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetIntentRequest): google.cloud.dialogflow.v2beta1.GetIntentRequest; - /** OpenUrlAction url */ - url?: (string|null); + /** + * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** OpenUrlAction urlTypeHint */ - urlTypeHint?: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|null); - } + /** + * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an OpenUrlAction. */ - class OpenUrlAction implements IOpenUrlAction { + /** + * 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 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.v2beta1.GetIntentRequest; - /** - * Constructs a new OpenUrlAction. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction); + /** + * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.GetIntentRequest; - /** OpenUrlAction url. */ - public url: string; + /** + * 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); - /** OpenUrlAction urlTypeHint. */ - public urlTypeHint: (google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint); + /** + * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIntentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetIntentRequest; - /** - * Creates a new OpenUrlAction instance using the specified properties. - * @param [properties] Properties to set - * @returns OpenUrlAction instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + /** + * 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.v2beta1.GetIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified OpenUrlAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. - * @param message OpenUrlAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this GetIntentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified OpenUrlAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. - * @param message OpenUrlAction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CreateIntentRequest. */ + interface ICreateIntentRequest { - /** - * Decodes an OpenUrlAction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OpenUrlAction - * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + /** CreateIntentRequest parent */ + parent?: (string|null); - /** - * Decodes an OpenUrlAction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OpenUrlAction - * @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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + /** CreateIntentRequest intent */ + intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - /** - * Verifies an OpenUrlAction 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); + /** CreateIntentRequest languageCode */ + languageCode?: (string|null); - /** - * Creates an OpenUrlAction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OpenUrlAction - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction; + /** CreateIntentRequest intentView */ + intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + } - /** - * Creates a plain object from an OpenUrlAction message. Also converts values to other types if specified. - * @param message OpenUrlAction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a CreateIntentRequest. */ + class CreateIntentRequest implements ICreateIntentRequest { - /** - * Converts this OpenUrlAction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new CreateIntentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateIntentRequest); - namespace OpenUrlAction { + /** CreateIntentRequest parent. */ + public parent: string; - /** UrlTypeHint enum. */ - enum UrlTypeHint { - URL_TYPE_HINT_UNSPECIFIED = 0, - AMP_ACTION = 1, - AMP_CONTENT = 2 - } - } - } + /** CreateIntentRequest intent. */ + public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - /** ImageDisplayOptions enum. */ - enum ImageDisplayOptions { - IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0, - GRAY = 1, - WHITE = 2, - CROPPED = 3, - BLURRED_BACKGROUND = 4 - } - } + /** CreateIntentRequest languageCode. */ + public languageCode: string; - /** Properties of a TableCard. */ - interface ITableCard { + /** CreateIntentRequest intentView. */ + public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - /** TableCard title */ - title?: (string|null); + /** + * Creates a new CreateIntentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateIntentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateIntentRequest): google.cloud.dialogflow.v2beta1.CreateIntentRequest; - /** TableCard subtitle */ - subtitle?: (string|null); + /** + * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** TableCard image */ - image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** + * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** TableCard columnProperties */ - columnProperties?: (google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties[]|null); + /** + * 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 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.v2beta1.CreateIntentRequest; - /** TableCard rows */ - rows?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow[]|null); + /** + * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.CreateIntentRequest; - /** TableCard buttons */ - buttons?: (google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]|null); - } + /** + * 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); - /** Represents a TableCard. */ - class TableCard implements ITableCard { + /** + * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateIntentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateIntentRequest; - /** - * Constructs a new TableCard. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard); + /** + * 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.v2beta1.CreateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** TableCard title. */ - public title: string; + /** + * Converts this CreateIntentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** TableCard subtitle. */ - public subtitle: string; + /** Properties of an UpdateIntentRequest. */ + interface IUpdateIntentRequest { - /** TableCard image. */ - public image?: (google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null); + /** UpdateIntentRequest intent */ + intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - /** TableCard columnProperties. */ - public columnProperties: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties[]; + /** UpdateIntentRequest languageCode */ + languageCode?: (string|null); - /** TableCard rows. */ - public rows: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow[]; + /** UpdateIntentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** TableCard buttons. */ - public buttons: google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton[]; + /** UpdateIntentRequest intentView */ + intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + } - /** - * Creates a new TableCard instance using the specified properties. - * @param [properties] Properties to set - * @returns TableCard instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; + /** Represents an UpdateIntentRequest. */ + class UpdateIntentRequest implements IUpdateIntentRequest { - /** - * Encodes the specified TableCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. - * @param message TableCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new UpdateIntentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest); - /** - * Encodes the specified TableCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. - * @param message TableCard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard, writer?: $protobuf.Writer): $protobuf.Writer; + /** UpdateIntentRequest intent. */ + public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - /** - * Decodes a TableCard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableCard - * @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.v2beta1.Intent.Message.TableCard; + /** UpdateIntentRequest languageCode. */ + public languageCode: string; - /** - * Decodes a TableCard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableCard - * @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.v2beta1.Intent.Message.TableCard; + /** UpdateIntentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** - * Verifies a TableCard 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); + /** UpdateIntentRequest intentView. */ + public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - /** - * Creates a TableCard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableCard - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCard; + /** + * Creates a new UpdateIntentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateIntentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest): google.cloud.dialogflow.v2beta1.UpdateIntentRequest; - /** - * Creates a plain object from a TableCard message. Also converts values to other types if specified. - * @param message TableCard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this TableCard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ColumnProperties. */ - interface IColumnProperties { + /** + * 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 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.v2beta1.UpdateIntentRequest; - /** ColumnProperties header */ - header?: (string|null); + /** + * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.UpdateIntentRequest; - /** ColumnProperties horizontalAlignment */ - horizontalAlignment?: (google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|null); - } + /** + * 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); - /** Represents a ColumnProperties. */ - class ColumnProperties implements IColumnProperties { + /** + * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateIntentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateIntentRequest; - /** - * Constructs a new ColumnProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties); + /** + * 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.v2beta1.UpdateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ColumnProperties header. */ - public header: string; + /** + * Converts this UpdateIntentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** ColumnProperties horizontalAlignment. */ - public horizontalAlignment: (google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|keyof typeof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment); + /** Properties of a DeleteIntentRequest. */ + interface IDeleteIntentRequest { - /** - * Creates a new ColumnProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnProperties instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties): google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties; + /** DeleteIntentRequest name */ + name?: (string|null); + } - /** - * Encodes the specified ColumnProperties message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. - * @param message ColumnProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a DeleteIntentRequest. */ + class DeleteIntentRequest implements IDeleteIntentRequest { - /** - * Encodes the specified ColumnProperties message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. - * @param message ColumnProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new DeleteIntentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest); - /** - * Decodes a ColumnProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnProperties - * @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.v2beta1.Intent.Message.ColumnProperties; + /** DeleteIntentRequest name. */ + public name: string; - /** - * Decodes a ColumnProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnProperties - * @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.v2beta1.Intent.Message.ColumnProperties; + /** + * Creates a new DeleteIntentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIntentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest): google.cloud.dialogflow.v2beta1.DeleteIntentRequest; - /** - * Verifies a ColumnProperties 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 DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ColumnProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties; + /** + * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ColumnProperties message. Also converts values to other types if specified. - * @param message ColumnProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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 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.v2beta1.DeleteIntentRequest; - /** - * Converts this ColumnProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.DeleteIntentRequest; - namespace ColumnProperties { + /** + * 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); - /** HorizontalAlignment enum. */ - enum HorizontalAlignment { - HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0, - LEADING = 1, - CENTER = 2, - TRAILING = 3 - } - } + /** + * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIntentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteIntentRequest; - /** Properties of a TableCardRow. */ - interface ITableCardRow { + /** + * 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.v2beta1.DeleteIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** TableCardRow cells */ - cells?: (google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell[]|null); + /** + * Converts this DeleteIntentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** TableCardRow dividerAfter */ - dividerAfter?: (boolean|null); - } + /** Properties of a BatchUpdateIntentsRequest. */ + interface IBatchUpdateIntentsRequest { - /** Represents a TableCardRow. */ - class TableCardRow implements ITableCardRow { + /** BatchUpdateIntentsRequest parent */ + parent?: (string|null); - /** - * Constructs a new TableCardRow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow); + /** BatchUpdateIntentsRequest intentBatchUri */ + intentBatchUri?: (string|null); - /** TableCardRow cells. */ - public cells: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell[]; + /** BatchUpdateIntentsRequest intentBatchInline */ + intentBatchInline?: (google.cloud.dialogflow.v2beta1.IIntentBatch|null); - /** TableCardRow dividerAfter. */ - public dividerAfter: boolean; + /** BatchUpdateIntentsRequest languageCode */ + languageCode?: (string|null); - /** - * Creates a new TableCardRow instance using the specified properties. - * @param [properties] Properties to set - * @returns TableCardRow instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow; + /** BatchUpdateIntentsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** - * Encodes the specified TableCardRow message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. - * @param message TableCardRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** BatchUpdateIntentsRequest intentView */ + intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + } - /** - * Encodes the specified TableCardRow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. - * @param message TableCardRow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a BatchUpdateIntentsRequest. */ + class BatchUpdateIntentsRequest implements IBatchUpdateIntentsRequest { - /** - * Decodes a TableCardRow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableCardRow - * @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.v2beta1.Intent.Message.TableCardRow; + /** + * Constructs a new BatchUpdateIntentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest); - /** - * Decodes a TableCardRow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableCardRow - * @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.v2beta1.Intent.Message.TableCardRow; + /** BatchUpdateIntentsRequest parent. */ + public parent: string; - /** - * Verifies a TableCardRow 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); + /** BatchUpdateIntentsRequest intentBatchUri. */ + public intentBatchUri?: (string|null); - /** - * Creates a TableCardRow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableCardRow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow; + /** BatchUpdateIntentsRequest intentBatchInline. */ + public intentBatchInline?: (google.cloud.dialogflow.v2beta1.IIntentBatch|null); - /** - * Creates a plain object from a TableCardRow message. Also converts values to other types if specified. - * @param message TableCardRow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** BatchUpdateIntentsRequest languageCode. */ + public languageCode: string; - /** - * Converts this TableCardRow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** BatchUpdateIntentsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** Properties of a TableCardCell. */ - interface ITableCardCell { + /** BatchUpdateIntentsRequest intentView. */ + public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - /** TableCardCell text */ - text?: (string|null); - } + /** BatchUpdateIntentsRequest intentBatch. */ + public intentBatch?: ("intentBatchUri"|"intentBatchInline"); - /** Represents a TableCardCell. */ - class TableCardCell implements ITableCardCell { + /** + * Creates a new BatchUpdateIntentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateIntentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest; - /** - * Constructs a new TableCardCell. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell); + /** + * Encodes the specified BatchUpdateIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * @param message BatchUpdateIntentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** TableCardCell text. */ - public text: string; + /** + * Encodes the specified BatchUpdateIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * @param message BatchUpdateIntentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new TableCardCell instance using the specified properties. - * @param [properties] Properties to set - * @returns TableCardCell instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; + /** + * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateIntentsRequest + * @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.v2beta1.BatchUpdateIntentsRequest; - /** - * Encodes the specified TableCardCell message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. - * @param message TableCardCell message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateIntentsRequest + * @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.v2beta1.BatchUpdateIntentsRequest; - /** - * Encodes the specified TableCardCell message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. - * @param message TableCardCell message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a BatchUpdateIntentsRequest 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 TableCardCell message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableCardCell - * @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.v2beta1.Intent.Message.TableCardCell; + /** + * Creates a BatchUpdateIntentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateIntentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest; - /** - * Decodes a TableCardCell message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableCardCell - * @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.v2beta1.Intent.Message.TableCardCell; + /** + * Creates a plain object from a BatchUpdateIntentsRequest message. Also converts values to other types if specified. + * @param message BatchUpdateIntentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a TableCardCell 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 BatchUpdateIntentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a TableCardCell message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableCardCell - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell; + /** Properties of a BatchUpdateIntentsResponse. */ + interface IBatchUpdateIntentsResponse { - /** - * Creates a plain object from a TableCardCell message. Also converts values to other types if specified. - * @param message TableCardCell - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableCardCell to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a FollowupIntentInfo. */ - interface IFollowupIntentInfo { - - /** FollowupIntentInfo followupIntentName */ - followupIntentName?: (string|null); - - /** FollowupIntentInfo parentFollowupIntentName */ - parentFollowupIntentName?: (string|null); - } - - /** Represents a FollowupIntentInfo. */ - class FollowupIntentInfo implements IFollowupIntentInfo { - - /** - * Constructs a new FollowupIntentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo); - - /** FollowupIntentInfo followupIntentName. */ - public followupIntentName: string; - - /** FollowupIntentInfo parentFollowupIntentName. */ - public parentFollowupIntentName: string; - - /** - * Creates a new FollowupIntentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FollowupIntentInfo instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo): google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo; - - /** - * Encodes the specified FollowupIntentInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. - * @param message FollowupIntentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FollowupIntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. - * @param message FollowupIntentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FollowupIntentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FollowupIntentInfo - * @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.v2beta1.Intent.FollowupIntentInfo; - - /** - * Decodes a FollowupIntentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FollowupIntentInfo - * @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.v2beta1.Intent.FollowupIntentInfo; - - /** - * Verifies a FollowupIntentInfo 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 FollowupIntentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FollowupIntentInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo; - - /** - * Creates a plain object from a FollowupIntentInfo message. Also converts values to other types if specified. - * @param message FollowupIntentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FollowupIntentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ListIntentsRequest. */ - interface IListIntentsRequest { - - /** ListIntentsRequest parent */ - parent?: (string|null); - - /** ListIntentsRequest languageCode */ - languageCode?: (string|null); - - /** ListIntentsRequest intentView */ - intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); - - /** ListIntentsRequest pageSize */ - pageSize?: (number|null); - - /** ListIntentsRequest pageToken */ - pageToken?: (string|null); + /** BatchUpdateIntentsResponse intents */ + intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); } - /** Represents a ListIntentsRequest. */ - class ListIntentsRequest implements IListIntentsRequest { + /** Represents a BatchUpdateIntentsResponse. */ + class BatchUpdateIntentsResponse implements IBatchUpdateIntentsResponse { /** - * Constructs a new ListIntentsRequest. + * Constructs a new BatchUpdateIntentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListIntentsRequest); - - /** ListIntentsRequest parent. */ - public parent: string; - - /** ListIntentsRequest languageCode. */ - public languageCode: string; - - /** ListIntentsRequest intentView. */ - public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); - - /** ListIntentsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse); - /** ListIntentsRequest pageToken. */ - public pageToken: string; + /** BatchUpdateIntentsResponse intents. */ + public intents: google.cloud.dialogflow.v2beta1.IIntent[]; /** - * Creates a new ListIntentsRequest instance using the specified properties. + * Creates a new BatchUpdateIntentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListIntentsRequest instance + * @returns BatchUpdateIntentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListIntentsRequest): google.cloud.dialogflow.v2beta1.ListIntentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; /** - * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. - * @param message ListIntentsRequest message or plain object to encode + * Encodes the specified BatchUpdateIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * @param message BatchUpdateIntentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. - * @param message ListIntentsRequest message or plain object to encode + * Encodes the specified BatchUpdateIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * @param message BatchUpdateIntentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer. + * Decodes a BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse * @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.v2beta1.ListIntentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateIntentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIntentsRequest + * @returns BatchUpdateIntentsResponse * @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.v2beta1.ListIntentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; /** - * Verifies a ListIntentsRequest message. + * Verifies a BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIntentsRequest + * @returns BatchUpdateIntentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListIntentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; /** - * 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 BatchUpdateIntentsResponse message. Also converts values to other types if specified. + * @param message BatchUpdateIntentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIntentsRequest to JSON. + * Converts this BatchUpdateIntentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListIntentsResponse. */ - interface IListIntentsResponse { + /** Properties of a BatchDeleteIntentsRequest. */ + interface IBatchDeleteIntentsRequest { - /** ListIntentsResponse intents */ - intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); + /** BatchDeleteIntentsRequest parent */ + parent?: (string|null); - /** ListIntentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** BatchDeleteIntentsRequest intents */ + intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); } - /** Represents a ListIntentsResponse. */ - class ListIntentsResponse implements IListIntentsResponse { + /** Represents a BatchDeleteIntentsRequest. */ + class BatchDeleteIntentsRequest implements IBatchDeleteIntentsRequest { /** - * Constructs a new ListIntentsResponse. + * Constructs a new BatchDeleteIntentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListIntentsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest); - /** ListIntentsResponse intents. */ - public intents: google.cloud.dialogflow.v2beta1.IIntent[]; + /** BatchDeleteIntentsRequest parent. */ + public parent: string; - /** ListIntentsResponse nextPageToken. */ - public nextPageToken: string; + /** BatchDeleteIntentsRequest intents. */ + public intents: google.cloud.dialogflow.v2beta1.IIntent[]; /** - * Creates a new ListIntentsResponse instance using the specified properties. + * Creates a new BatchDeleteIntentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListIntentsResponse instance + * @returns BatchDeleteIntentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListIntentsResponse): google.cloud.dialogflow.v2beta1.ListIntentsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; /** - * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. - * @param message ListIntentsResponse message or plain object to encode + * Encodes the specified BatchDeleteIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * @param message BatchDeleteIntentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. - * @param message ListIntentsResponse message or plain object to encode + * Encodes the specified BatchDeleteIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * @param message BatchDeleteIntentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer. + * Decodes a BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest * @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.v2beta1.ListIntentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteIntentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIntentsResponse + * @returns BatchDeleteIntentsRequest * @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.v2beta1.ListIntentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; /** - * Verifies a ListIntentsResponse message. + * Verifies a BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIntentsResponse + * @returns BatchDeleteIntentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListIntentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; /** - * 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 BatchDeleteIntentsRequest message. Also converts values to other types if specified. + * @param message BatchDeleteIntentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIntentsResponse to JSON. + * Converts this BatchDeleteIntentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetIntentRequest. */ - interface IGetIntentRequest { - - /** GetIntentRequest name */ - name?: (string|null); + /** IntentView enum. */ + enum IntentView { + INTENT_VIEW_UNSPECIFIED = 0, + INTENT_VIEW_FULL = 1 + } - /** GetIntentRequest languageCode */ - languageCode?: (string|null); + /** Properties of an IntentBatch. */ + interface IIntentBatch { - /** GetIntentRequest intentView */ - intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + /** IntentBatch intents */ + intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); } - /** Represents a GetIntentRequest. */ - class GetIntentRequest implements IGetIntentRequest { + /** Represents an IntentBatch. */ + class IntentBatch implements IIntentBatch { /** - * Constructs a new GetIntentRequest. + * Constructs a new IntentBatch. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetIntentRequest); - - /** GetIntentRequest name. */ - public name: string; - - /** GetIntentRequest languageCode. */ - public languageCode: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IIntentBatch); - /** GetIntentRequest intentView. */ - public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); + /** IntentBatch intents. */ + public intents: google.cloud.dialogflow.v2beta1.IIntent[]; /** - * Creates a new GetIntentRequest instance using the specified properties. + * Creates a new IntentBatch instance using the specified properties. * @param [properties] Properties to set - * @returns GetIntentRequest instance + * @returns IntentBatch instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetIntentRequest): google.cloud.dialogflow.v2beta1.GetIntentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IIntentBatch): google.cloud.dialogflow.v2beta1.IntentBatch; /** - * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. - * @param message GetIntentRequest message or plain object to encode + * Encodes the specified IntentBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * @param message IntentBatch message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IIntentBatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. - * @param message GetIntentRequest message or plain object to encode + * Encodes the specified IntentBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * @param message IntentBatch message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IIntentBatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetIntentRequest message from the specified reader or buffer. + * Decodes an IntentBatch 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 IntentBatch * @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.v2beta1.GetIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.IntentBatch; /** - * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an IntentBatch message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetIntentRequest + * @returns IntentBatch * @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.v2beta1.GetIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.IntentBatch; /** - * Verifies a GetIntentRequest message. + * Verifies an IntentBatch 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 an IntentBatch message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetIntentRequest + * @returns IntentBatch */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.IntentBatch; /** - * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. - * @param message GetIntentRequest + * Creates a plain object from an IntentBatch message. Also converts values to other types if specified. + * @param message IntentBatch * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.IntentBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetIntentRequest to JSON. + * Converts this IntentBatch to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateIntentRequest. */ - interface ICreateIntentRequest { - - /** CreateIntentRequest parent */ - parent?: (string|null); - - /** CreateIntentRequest intent */ - intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); - - /** CreateIntentRequest languageCode */ - languageCode?: (string|null); - - /** CreateIntentRequest intentView */ - intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); - } - - /** Represents a CreateIntentRequest. */ - class CreateIntentRequest implements ICreateIntentRequest { + /** Represents a SessionEntityTypes */ + class SessionEntityTypes extends $protobuf.rpc.Service { /** - * Constructs a new CreateIntentRequest. - * @param [properties] Properties to set + * 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(properties?: google.cloud.dialogflow.v2beta1.ICreateIntentRequest); - - /** CreateIntentRequest parent. */ - public parent: string; - - /** CreateIntentRequest intent. */ - public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** CreateIntentRequest languageCode. */ - public languageCode: string; + /** + * 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; - /** CreateIntentRequest intentView. */ - public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); + /** + * 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.v2beta1.IListSessionEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypesCallback): void; /** - * Creates a new CreateIntentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateIntentRequest instance + * Calls ListSessionEntityTypes. + * @param request ListSessionEntityTypesRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateIntentRequest): google.cloud.dialogflow.v2beta1.CreateIntentRequest; + public listSessionEntityTypes(request: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest): Promise; /** - * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. - * @param message CreateIntentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetSessionEntityType. + * @param request GetSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getSessionEntityType(request: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityTypeCallback): void; /** - * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. - * @param message CreateIntentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetSessionEntityType. + * @param request GetSessionEntityTypeRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getSessionEntityType(request: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest): Promise; /** - * 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 CreateIntentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateSessionEntityType. + * @param request CreateSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateIntentRequest; + public createSessionEntityType(request: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityTypeCallback): void; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateIntentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateSessionEntityType. + * @param request CreateSessionEntityTypeRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateIntentRequest; + public createSessionEntityType(request: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest): Promise; /** - * Verifies a CreateIntentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls UpdateSessionEntityType. + * @param request UpdateSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SessionEntityType */ - public static verify(message: { [k: string]: any }): (string|null); + public updateSessionEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityTypeCallback): void; /** - * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateIntentRequest + * Calls UpdateSessionEntityType. + * @param request UpdateSessionEntityTypeRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateIntentRequest; + public updateSessionEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest): Promise; /** - * 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 + * Calls DeleteSessionEntityType. + * @param request DeleteSessionEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteSessionEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityTypeCallback): void; /** - * Converts this CreateIntentRequest to JSON. - * @returns JSON object + * Calls DeleteSessionEntityType. + * @param request DeleteSessionEntityTypeRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public deleteSessionEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest): Promise; } - /** Properties of an UpdateIntentRequest. */ - interface IUpdateIntentRequest { - - /** UpdateIntentRequest intent */ - intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); + namespace SessionEntityTypes { - /** UpdateIntentRequest languageCode */ - languageCode?: (string|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#listSessionEntityTypes}. + * @param error Error, if any + * @param [response] ListSessionEntityTypesResponse + */ + type ListSessionEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse) => void; - /** UpdateIntentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#getSessionEntityType}. + * @param error Error, if any + * @param [response] SessionEntityType + */ + type GetSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; - /** UpdateIntentRequest intentView */ - intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#createSessionEntityType}. + * @param error Error, if any + * @param [response] SessionEntityType + */ + type CreateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#updateSessionEntityType}. + * @param error Error, if any + * @param [response] SessionEntityType + */ + type UpdateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#deleteSessionEntityType}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSessionEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } - /** Represents an UpdateIntentRequest. */ - class UpdateIntentRequest implements IUpdateIntentRequest { + /** Properties of a SessionEntityType. */ + interface ISessionEntityType { + + /** SessionEntityType name */ + name?: (string|null); + + /** SessionEntityType entityOverrideMode */ + entityOverrideMode?: (google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|null); + + /** SessionEntityType entities */ + entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + } + + /** Represents a SessionEntityType. */ + class SessionEntityType implements ISessionEntityType { /** - * Constructs a new UpdateIntentRequest. + * Constructs a new SessionEntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest); - - /** UpdateIntentRequest intent. */ - public intent?: (google.cloud.dialogflow.v2beta1.IIntent|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISessionEntityType); - /** UpdateIntentRequest languageCode. */ - public languageCode: string; + /** SessionEntityType name. */ + public name: string; - /** UpdateIntentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SessionEntityType entityOverrideMode. */ + public entityOverrideMode: (google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode); - /** UpdateIntentRequest intentView. */ - public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); + /** SessionEntityType entities. */ + public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; /** - * Creates a new UpdateIntentRequest instance using the specified properties. + * Creates a new SessionEntityType instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateIntentRequest instance + * @returns SessionEntityType instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateIntentRequest): google.cloud.dialogflow.v2beta1.UpdateIntentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISessionEntityType): google.cloud.dialogflow.v2beta1.SessionEntityType; /** - * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. - * @param message UpdateIntentRequest message or plain object to encode + * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. - * @param message UpdateIntentRequest message or plain object to encode + * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateIntentRequest 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 UpdateIntentRequest + * @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.v2beta1.UpdateIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SessionEntityType; /** - * Decodes an UpdateIntentRequest 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 UpdateIntentRequest + * @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.v2beta1.UpdateIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SessionEntityType; /** - * Verifies an UpdateIntentRequest 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 an UpdateIntentRequest 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 UpdateIntentRequest + * @returns SessionEntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SessionEntityType; /** - * 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 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.v2beta1.UpdateIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SessionEntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateIntentRequest to JSON. + * Converts this SessionEntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteIntentRequest. */ - interface IDeleteIntentRequest { + namespace SessionEntityType { - /** DeleteIntentRequest name */ - name?: (string|null); + /** EntityOverrideMode enum. */ + enum EntityOverrideMode { + ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0, + ENTITY_OVERRIDE_MODE_OVERRIDE = 1, + ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 + } } - /** Represents a DeleteIntentRequest. */ - class DeleteIntentRequest implements IDeleteIntentRequest { + /** Properties of a ListSessionEntityTypesRequest. */ + interface IListSessionEntityTypesRequest { + + /** ListSessionEntityTypesRequest parent */ + parent?: (string|null); + + /** ListSessionEntityTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListSessionEntityTypesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSessionEntityTypesRequest. */ + class ListSessionEntityTypesRequest implements IListSessionEntityTypesRequest { /** - * Constructs a new DeleteIntentRequest. + * Constructs a new ListSessionEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest); - /** DeleteIntentRequest name. */ - public name: string; + /** ListSessionEntityTypesRequest parent. */ + public parent: string; + + /** ListSessionEntityTypesRequest pageSize. */ + public pageSize: number; + + /** ListSessionEntityTypesRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteIntentRequest instance using the specified properties. + * Creates a new ListSessionEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteIntentRequest instance + * @returns ListSessionEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteIntentRequest): google.cloud.dialogflow.v2beta1.DeleteIntentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; /** - * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. - * @param message DeleteIntentRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. - * @param message DeleteIntentRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteIntentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteIntentRequest 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 DeleteIntentRequest + * @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.v2beta1.DeleteIntentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; /** - * Decodes a DeleteIntentRequest 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 DeleteIntentRequest + * @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.v2beta1.DeleteIntentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; /** - * Verifies a DeleteIntentRequest 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 DeleteIntentRequest 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 DeleteIntentRequest + * @returns ListSessionEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteIntentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; /** - * 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 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.v2beta1.DeleteIntentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteIntentRequest to JSON. + * Converts this ListSessionEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchUpdateIntentsRequest. */ - interface IBatchUpdateIntentsRequest { - - /** BatchUpdateIntentsRequest parent */ - parent?: (string|null); - - /** BatchUpdateIntentsRequest intentBatchUri */ - intentBatchUri?: (string|null); - - /** BatchUpdateIntentsRequest intentBatchInline */ - intentBatchInline?: (google.cloud.dialogflow.v2beta1.IIntentBatch|null); - - /** BatchUpdateIntentsRequest languageCode */ - languageCode?: (string|null); + /** Properties of a ListSessionEntityTypesResponse. */ + interface IListSessionEntityTypesResponse { - /** BatchUpdateIntentsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListSessionEntityTypesResponse sessionEntityTypes */ + sessionEntityTypes?: (google.cloud.dialogflow.v2beta1.ISessionEntityType[]|null); - /** BatchUpdateIntentsRequest intentView */ - intentView?: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView|null); + /** ListSessionEntityTypesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a BatchUpdateIntentsRequest. */ - class BatchUpdateIntentsRequest implements IBatchUpdateIntentsRequest { + /** Represents a ListSessionEntityTypesResponse. */ + class ListSessionEntityTypesResponse implements IListSessionEntityTypesResponse { /** - * Constructs a new BatchUpdateIntentsRequest. + * Constructs a new ListSessionEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest); - - /** BatchUpdateIntentsRequest parent. */ - public parent: string; - - /** BatchUpdateIntentsRequest intentBatchUri. */ - public intentBatchUri?: (string|null); - - /** BatchUpdateIntentsRequest intentBatchInline. */ - public intentBatchInline?: (google.cloud.dialogflow.v2beta1.IIntentBatch|null); - - /** BatchUpdateIntentsRequest languageCode. */ - public languageCode: string; - - /** BatchUpdateIntentsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse); - /** BatchUpdateIntentsRequest intentView. */ - public intentView: (google.cloud.dialogflow.v2beta1.IntentView|keyof typeof google.cloud.dialogflow.v2beta1.IntentView); + /** ListSessionEntityTypesResponse sessionEntityTypes. */ + public sessionEntityTypes: google.cloud.dialogflow.v2beta1.ISessionEntityType[]; - /** BatchUpdateIntentsRequest intentBatch. */ - public intentBatch?: ("intentBatchUri"|"intentBatchInline"); + /** ListSessionEntityTypesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new BatchUpdateIntentsRequest instance using the specified properties. + * Creates a new ListSessionEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateIntentsRequest instance + * @returns ListSessionEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; /** - * Encodes the specified BatchUpdateIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. - * @param message BatchUpdateIntentsRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchUpdateIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. - * @param message BatchUpdateIntentsRequest message or plain object to encode + * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchUpdateIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateIntentsRequest 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 BatchUpdateIntentsRequest + * @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.v2beta1.BatchUpdateIntentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; /** - * Decodes a BatchUpdateIntentsRequest 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 BatchUpdateIntentsRequest + * @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.v2beta1.BatchUpdateIntentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; /** - * Verifies a BatchUpdateIntentsRequest 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 BatchUpdateIntentsRequest 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 BatchUpdateIntentsRequest + * @returns ListSessionEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; /** - * Creates a plain object from a BatchUpdateIntentsRequest message. Also converts values to other types if specified. - * @param message BatchUpdateIntentsRequest + * 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.v2beta1.BatchUpdateIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateIntentsRequest to JSON. + * Converts this ListSessionEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchUpdateIntentsResponse. */ - interface IBatchUpdateIntentsResponse { + /** Properties of a GetSessionEntityTypeRequest. */ + interface IGetSessionEntityTypeRequest { - /** BatchUpdateIntentsResponse intents */ - intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); + /** GetSessionEntityTypeRequest name */ + name?: (string|null); } - /** Represents a BatchUpdateIntentsResponse. */ - class BatchUpdateIntentsResponse implements IBatchUpdateIntentsResponse { + /** Represents a GetSessionEntityTypeRequest. */ + class GetSessionEntityTypeRequest implements IGetSessionEntityTypeRequest { /** - * Constructs a new BatchUpdateIntentsResponse. + * Constructs a new GetSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest); - /** BatchUpdateIntentsResponse intents. */ - public intents: google.cloud.dialogflow.v2beta1.IIntent[]; + /** GetSessionEntityTypeRequest name. */ + public name: string; /** - * Creates a new BatchUpdateIntentsResponse instance using the specified properties. + * Creates a new GetSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateIntentsResponse instance + * @returns GetSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; /** - * Encodes the specified BatchUpdateIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. - * @param message BatchUpdateIntentsResponse message or plain object to encode + * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchUpdateIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. - * @param message BatchUpdateIntentsResponse message or plain object to encode + * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchUpdateIntentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse + * @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.v2beta1.BatchUpdateIntentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; /** - * Decodes a BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse + * @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.v2beta1.BatchUpdateIntentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; /** - * Verifies a BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse 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 BatchUpdateIntentsResponse + * @returns GetSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; /** - * Creates a plain object from a BatchUpdateIntentsResponse message. Also converts values to other types if specified. - * @param message BatchUpdateIntentsResponse + * 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.v2beta1.BatchUpdateIntentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateIntentsResponse to JSON. + * Converts this GetSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchDeleteIntentsRequest. */ - interface IBatchDeleteIntentsRequest { + /** Properties of a CreateSessionEntityTypeRequest. */ + interface ICreateSessionEntityTypeRequest { - /** BatchDeleteIntentsRequest parent */ + /** CreateSessionEntityTypeRequest parent */ parent?: (string|null); - /** BatchDeleteIntentsRequest intents */ - intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); + /** CreateSessionEntityTypeRequest sessionEntityType */ + sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); } - /** Represents a BatchDeleteIntentsRequest. */ - class BatchDeleteIntentsRequest implements IBatchDeleteIntentsRequest { + /** Represents a CreateSessionEntityTypeRequest. */ + class CreateSessionEntityTypeRequest implements ICreateSessionEntityTypeRequest { /** - * Constructs a new BatchDeleteIntentsRequest. + * Constructs a new CreateSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest); - /** BatchDeleteIntentsRequest parent. */ + /** CreateSessionEntityTypeRequest parent. */ public parent: string; - /** BatchDeleteIntentsRequest intents. */ - public intents: google.cloud.dialogflow.v2beta1.IIntent[]; + /** CreateSessionEntityTypeRequest sessionEntityType. */ + public sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); /** - * Creates a new BatchDeleteIntentsRequest instance using the specified properties. + * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchDeleteIntentsRequest instance + * @returns CreateSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; /** - * Encodes the specified BatchDeleteIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. - * @param message BatchDeleteIntentsRequest message or plain object to encode + * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchDeleteIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchDeleteIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. - * @param message BatchDeleteIntentsRequest message or plain object to encode + * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IBatchDeleteIntentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest + * @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.v2beta1.BatchDeleteIntentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; /** - * Decodes a BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest + * @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.v2beta1.BatchDeleteIntentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; /** - * Verifies a BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest 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 BatchDeleteIntentsRequest + * @returns CreateSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; /** - * Creates a plain object from a BatchDeleteIntentsRequest message. Also converts values to other types if specified. - * @param message BatchDeleteIntentsRequest + * 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.v2beta1.BatchDeleteIntentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchDeleteIntentsRequest to JSON. + * Converts this CreateSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** IntentView enum. */ - enum IntentView { - INTENT_VIEW_UNSPECIFIED = 0, - INTENT_VIEW_FULL = 1 - } + /** Properties of an UpdateSessionEntityTypeRequest. */ + interface IUpdateSessionEntityTypeRequest { - /** Properties of an IntentBatch. */ - interface IIntentBatch { + /** UpdateSessionEntityTypeRequest sessionEntityType */ + sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); - /** IntentBatch intents */ - intents?: (google.cloud.dialogflow.v2beta1.IIntent[]|null); + /** UpdateSessionEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an IntentBatch. */ - class IntentBatch implements IIntentBatch { + /** Represents an UpdateSessionEntityTypeRequest. */ + class UpdateSessionEntityTypeRequest implements IUpdateSessionEntityTypeRequest { /** - * Constructs a new IntentBatch. + * Constructs a new UpdateSessionEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IIntentBatch); + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest); - /** IntentBatch intents. */ - public intents: google.cloud.dialogflow.v2beta1.IIntent[]; + /** UpdateSessionEntityTypeRequest sessionEntityType. */ + public sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); + + /** UpdateSessionEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new IntentBatch instance using the specified properties. + * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns IntentBatch instance + * @returns UpdateSessionEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IIntentBatch): google.cloud.dialogflow.v2beta1.IntentBatch; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; /** - * Encodes the specified IntentBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. - * @param message IntentBatch message or plain object to encode + * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IIntentBatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IntentBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. - * @param message IntentBatch message or plain object to encode + * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IIntentBatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IntentBatch 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 IntentBatch + * @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.v2beta1.IntentBatch; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; /** - * Decodes an IntentBatch 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 IntentBatch + * @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.v2beta1.IntentBatch; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; /** - * Verifies an IntentBatch 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 an IntentBatch 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 IntentBatch + * @returns UpdateSessionEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.IntentBatch; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; /** - * Creates a plain object from an IntentBatch message. Also converts values to other types if specified. - * @param message IntentBatch + * 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.v2beta1.IntentBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IntentBatch to JSON. + * Converts this UpdateSessionEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a SessionEntityTypes */ - class SessionEntityTypes extends $protobuf.rpc.Service { + /** Properties of a DeleteSessionEntityTypeRequest. */ + interface IDeleteSessionEntityTypeRequest { - /** - * 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); + /** DeleteSessionEntityTypeRequest name */ + name?: (string|null); + } - /** - * 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; + /** Represents a DeleteSessionEntityTypeRequest. */ + class DeleteSessionEntityTypeRequest implements IDeleteSessionEntityTypeRequest { /** - * Calls ListSessionEntityTypes. - * @param request ListSessionEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse + * Constructs a new DeleteSessionEntityTypeRequest. + * @param [properties] Properties to set */ - public listSessionEntityTypes(request: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypesCallback): void; + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest); + + /** DeleteSessionEntityTypeRequest name. */ + public name: string; /** - * Calls ListSessionEntityTypes. - * @param request ListSessionEntityTypesRequest message or plain object - * @returns Promise + * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSessionEntityTypeRequest instance */ - public listSessionEntityTypes(request: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest): Promise; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; /** - * Calls GetSessionEntityType. - * @param request GetSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType + * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSessionEntityType(request: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityTypeCallback): void; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetSessionEntityType. - * @param request GetSessionEntityTypeRequest message or plain object - * @returns Promise + * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getSessionEntityType(request: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateSessionEntityType. - * @param request CreateSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType + * 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 DeleteSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSessionEntityType(request: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityTypeCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; /** - * Calls CreateSessionEntityType. - * @param request CreateSessionEntityTypeRequest message or plain object - * @returns Promise + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSessionEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createSessionEntityType(request: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; /** - * Calls UpdateSessionEntityType. - * @param request UpdateSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SessionEntityType + * Verifies a DeleteSessionEntityTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateSessionEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityTypeCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateSessionEntityType. - * @param request UpdateSessionEntityTypeRequest message or plain object - * @returns Promise + * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSessionEntityTypeRequest */ - public updateSessionEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; /** - * Calls DeleteSessionEntityType. - * @param request DeleteSessionEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * 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 deleteSessionEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityTypeCallback): void; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteSessionEntityType. - * @param request DeleteSessionEntityTypeRequest message or plain object - * @returns Promise + * Converts this DeleteSessionEntityTypeRequest to JSON. + * @returns JSON object */ - public deleteSessionEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest): Promise; + public toJSON(): { [k: string]: any }; } - namespace SessionEntityTypes { + /** Represents an EntityTypes */ + class EntityTypes extends $protobuf.rpc.Service { /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#listSessionEntityTypes}. - * @param error Error, if any - * @param [response] ListSessionEntityTypesResponse + * 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 */ - type ListSessionEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse) => void; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#getSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType + * 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. */ - type GetSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): EntityTypes; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#createSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse */ - type CreateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; + public listEntityTypes(request: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypesCallback): void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#updateSessionEntityType}. - * @param error Error, if any - * @param [response] SessionEntityType + * Calls ListEntityTypes. + * @param request ListEntityTypesRequest message or plain object + * @returns Promise */ - type UpdateSessionEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SessionEntityType) => void; + public listEntityTypes(request: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest): Promise; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#deleteSessionEntityType}. - * @param error Error, if any - * @param [response] Empty + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - type DeleteSessionEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - - /** Properties of a SessionEntityType. */ - interface ISessionEntityType { - - /** SessionEntityType name */ - name?: (string|null); - - /** SessionEntityType entityOverrideMode */ - entityOverrideMode?: (google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|null); - - /** SessionEntityType entities */ - entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); - } - - /** Represents a SessionEntityType. */ - class SessionEntityType implements ISessionEntityType { + public getEntityType(request: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityTypeCallback): void; /** - * Constructs a new SessionEntityType. - * @param [properties] Properties to set + * Calls GetEntityType. + * @param request GetEntityTypeRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ISessionEntityType); - - /** SessionEntityType name. */ - public name: string; - - /** SessionEntityType entityOverrideMode. */ - public entityOverrideMode: (google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|keyof typeof google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode); - - /** SessionEntityType entities. */ - public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + public getEntityType(request: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest): Promise; /** - * Creates a new SessionEntityType instance using the specified properties. - * @param [properties] Properties to set - * @returns SessionEntityType instance + * Calls CreateEntityType. + * @param request CreateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ISessionEntityType): google.cloud.dialogflow.v2beta1.SessionEntityType; + public createEntityType(request: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityTypeCallback): void; /** - * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. - * @param message SessionEntityType 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 encode(message: google.cloud.dialogflow.v2beta1.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public createEntityType(request: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest): Promise; /** - * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. - * @param message SessionEntityType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateEntityType. + * @param request UpdateEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EntityType */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISessionEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public updateEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityTypeCallback): void; /** - * 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 SessionEntityType - * @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 decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SessionEntityType; + public updateEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest): Promise; /** - * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SessionEntityType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteEntityType. + * @param request DeleteEntityTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SessionEntityType; + public deleteEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityTypeCallback): void; /** - * Verifies a SessionEntityType 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 + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest): Promise; /** - * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SessionEntityType + * Calls BatchUpdateEntityTypes. + * @param request BatchUpdateEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SessionEntityType; + public batchUpdateEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypesCallback): void; /** - * 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 + * Calls BatchUpdateEntityTypes. + * @param request BatchUpdateEntityTypesRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.v2beta1.SessionEntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public batchUpdateEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest): Promise; /** - * Converts this SessionEntityType to JSON. - * @returns JSON object + * Calls BatchDeleteEntityTypes. + * @param request BatchDeleteEntityTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; - } - - namespace SessionEntityType { - - /** EntityOverrideMode enum. */ - enum EntityOverrideMode { - ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0, - ENTITY_OVERRIDE_MODE_OVERRIDE = 1, - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 - } - } + public batchDeleteEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypesCallback): void; - /** Properties of a ListSessionEntityTypesRequest. */ - interface IListSessionEntityTypesRequest { + /** + * Calls BatchDeleteEntityTypes. + * @param request BatchDeleteEntityTypesRequest message or plain object + * @returns Promise + */ + public batchDeleteEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest): Promise; - /** ListSessionEntityTypesRequest parent */ - parent?: (string|null); + /** + * Calls BatchCreateEntities. + * @param request BatchCreateEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchCreateEntities(request: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntitiesCallback): void; - /** ListSessionEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** + * Calls BatchCreateEntities. + * @param request BatchCreateEntitiesRequest message or plain object + * @returns Promise + */ + public batchCreateEntities(request: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest): Promise; - /** ListSessionEntityTypesRequest pageToken */ - pageToken?: (string|null); - } + /** + * Calls BatchUpdateEntities. + * @param request BatchUpdateEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public batchUpdateEntities(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntitiesCallback): void; - /** Represents a ListSessionEntityTypesRequest. */ - class ListSessionEntityTypesRequest implements IListSessionEntityTypesRequest { + /** + * Calls BatchUpdateEntities. + * @param request BatchUpdateEntitiesRequest message or plain object + * @returns Promise + */ + public batchUpdateEntities(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest): Promise; /** - * Constructs a new ListSessionEntityTypesRequest. - * @param [properties] Properties to set + * Calls BatchDeleteEntities. + * @param request BatchDeleteEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest); + public batchDeleteEntities(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntitiesCallback): void; - /** ListSessionEntityTypesRequest parent. */ - public parent: string; + /** + * Calls BatchDeleteEntities. + * @param request BatchDeleteEntitiesRequest message or plain object + * @returns Promise + */ + public batchDeleteEntities(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest): Promise; + } - /** ListSessionEntityTypesRequest pageSize. */ - public pageSize: number; + namespace EntityTypes { - /** ListSessionEntityTypesRequest pageToken. */ - public pageToken: string; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#listEntityTypes}. + * @param error Error, if any + * @param [response] ListEntityTypesResponse + */ + type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListEntityTypesResponse) => void; /** - * Creates a new ListSessionEntityTypesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSessionEntityTypesRequest instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#getEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; + type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; /** - * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. - * @param message ListSessionEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#createEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; /** - * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. - * @param message ListSessionEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#updateEntityType}. + * @param error Error, if any + * @param [response] EntityType */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; /** - * 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 ListSessionEntityTypesRequest - * @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.v2beta1.EntityTypes#deleteEntityType}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; + type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSessionEntityTypesRequest - * @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.v2beta1.EntityTypes#batchUpdateEntityTypes}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; + type BatchUpdateEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a ListSessionEntityTypesRequest 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.v2beta1.EntityTypes#batchDeleteEntityTypes}. + * @param error Error, if any + * @param [response] Operation */ - public static verify(message: { [k: string]: any }): (string|null); + type BatchDeleteEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSessionEntityTypesRequest + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchCreateEntities}. + * @param error Error, if any + * @param [response] Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest; + type BatchCreateEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * 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 + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntities}. + * @param error Error, if any + * @param [response] Operation */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type BatchUpdateEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Converts this ListSessionEntityTypesRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntities}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type BatchDeleteEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of a ListSessionEntityTypesResponse. */ - interface IListSessionEntityTypesResponse { + /** Properties of an EntityType. */ + interface IEntityType { - /** ListSessionEntityTypesResponse sessionEntityTypes */ - sessionEntityTypes?: (google.cloud.dialogflow.v2beta1.ISessionEntityType[]|null); + /** EntityType name */ + name?: (string|null); - /** ListSessionEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** EntityType displayName */ + displayName?: (string|null); + + /** EntityType kind */ + kind?: (google.cloud.dialogflow.v2beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.Kind|null); + + /** EntityType autoExpansionMode */ + autoExpansionMode?: (google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|null); + + /** EntityType entities */ + entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + + /** EntityType enableFuzzyExtraction */ + enableFuzzyExtraction?: (boolean|null); } - /** Represents a ListSessionEntityTypesResponse. */ - class ListSessionEntityTypesResponse implements IListSessionEntityTypesResponse { + /** Represents an EntityType. */ + class EntityType implements IEntityType { /** - * Constructs a new ListSessionEntityTypesResponse. + * Constructs a new EntityType. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IEntityType); - /** ListSessionEntityTypesResponse sessionEntityTypes. */ - public sessionEntityTypes: google.cloud.dialogflow.v2beta1.ISessionEntityType[]; + /** EntityType name. */ + public name: string; - /** ListSessionEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + /** EntityType displayName. */ + public displayName: string; + + /** EntityType kind. */ + public kind: (google.cloud.dialogflow.v2beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.Kind); + + /** EntityType autoExpansionMode. */ + public autoExpansionMode: (google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode); + + /** EntityType entities. */ + public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + + /** EntityType enableFuzzyExtraction. */ + public enableFuzzyExtraction: boolean; /** - * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * Creates a new EntityType instance using the specified properties. * @param [properties] Properties to set - * @returns ListSessionEntityTypesResponse instance + * @returns EntityType instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IEntityType): google.cloud.dialogflow.v2beta1.EntityType; /** - * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. - * @param message ListSessionEntityTypesResponse message or plain object to encode + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. - * @param message ListSessionEntityTypesResponse message or plain object to encode + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListSessionEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSessionEntityTypesResponse 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 ListSessionEntityTypesResponse + * @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.v2beta1.ListSessionEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.EntityType; /** - * Decodes a ListSessionEntityTypesResponse 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 ListSessionEntityTypesResponse + * @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.v2beta1.ListSessionEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.EntityType; /** - * Verifies a ListSessionEntityTypesResponse 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 ListSessionEntityTypesResponse 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 ListSessionEntityTypesResponse + * @returns EntityType */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EntityType; /** - * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. - * @param message ListSessionEntityTypesResponse + * 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.v2beta1.ListSessionEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSessionEntityTypesResponse to JSON. + * Converts this EntityType to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetSessionEntityTypeRequest. */ - interface IGetSessionEntityTypeRequest { + namespace EntityType { - /** GetSessionEntityTypeRequest name */ - name?: (string|null); + /** 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 + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity value */ + value?: (string|null); + + /** Entity synonyms */ + synonyms?: (string[]|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.EntityType.IEntity); + + /** Entity value. */ + public value: string; + + /** 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.v2beta1.EntityType.IEntity): google.cloud.dialogflow.v2beta1.EntityType.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents a GetSessionEntityTypeRequest. */ - class GetSessionEntityTypeRequest implements IGetSessionEntityTypeRequest { + /** Properties of a ListEntityTypesRequest. */ + interface IListEntityTypesRequest { + + /** ListEntityTypesRequest parent */ + parent?: (string|null); + + /** ListEntityTypesRequest languageCode */ + languageCode?: (string|null); + + /** ListEntityTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListEntityTypesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEntityTypesRequest. */ + class ListEntityTypesRequest implements IListEntityTypesRequest { /** - * Constructs a new GetSessionEntityTypeRequest. + * Constructs a new ListEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest); - /** GetSessionEntityTypeRequest name. */ - public name: string; + /** ListEntityTypesRequest parent. */ + public parent: string; + + /** ListEntityTypesRequest languageCode. */ + public languageCode: string; + + /** ListEntityTypesRequest pageSize. */ + public pageSize: number; + + /** ListEntityTypesRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * Creates a new ListEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetSessionEntityTypeRequest instance + * @returns ListEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; /** - * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. - * @param message GetSessionEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. - * @param message GetSessionEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSessionEntityTypeRequest 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 GetSessionEntityTypeRequest + * @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.v2beta1.GetSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; /** - * Decodes a GetSessionEntityTypeRequest 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 GetSessionEntityTypeRequest + * @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.v2beta1.GetSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; /** - * Verifies a GetSessionEntityTypeRequest 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 GetSessionEntityTypeRequest 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 GetSessionEntityTypeRequest + * @returns ListEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; /** - * 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 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.v2beta1.GetSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSessionEntityTypeRequest to JSON. + * Converts this ListEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateSessionEntityTypeRequest. */ - interface ICreateSessionEntityTypeRequest { + /** Properties of a ListEntityTypesResponse. */ + interface IListEntityTypesResponse { - /** CreateSessionEntityTypeRequest parent */ - parent?: (string|null); + /** ListEntityTypesResponse entityTypes */ + entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); - /** CreateSessionEntityTypeRequest sessionEntityType */ - sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); + /** ListEntityTypesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateSessionEntityTypeRequest. */ - class CreateSessionEntityTypeRequest implements ICreateSessionEntityTypeRequest { + /** Represents a ListEntityTypesResponse. */ + class ListEntityTypesResponse implements IListEntityTypesResponse { /** - * Constructs a new CreateSessionEntityTypeRequest. + * Constructs a new ListEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse); - /** CreateSessionEntityTypeRequest parent. */ - public parent: string; + /** ListEntityTypesResponse entityTypes. */ + public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; - /** CreateSessionEntityTypeRequest sessionEntityType. */ - public sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); + /** ListEntityTypesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * Creates a new ListEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSessionEntityTypeRequest instance + * @returns ListEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; /** - * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. - * @param message CreateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. - * @param message CreateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSessionEntityTypeRequest 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 CreateSessionEntityTypeRequest + * @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.v2beta1.CreateSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; /** - * Decodes a CreateSessionEntityTypeRequest 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 CreateSessionEntityTypeRequest + * @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.v2beta1.CreateSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; /** - * Verifies a CreateSessionEntityTypeRequest 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 CreateSessionEntityTypeRequest 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 CreateSessionEntityTypeRequest + * @returns ListEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; /** - * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message CreateSessionEntityTypeRequest + * 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.v2beta1.CreateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSessionEntityTypeRequest to JSON. + * Converts this ListEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSessionEntityTypeRequest. */ - interface IUpdateSessionEntityTypeRequest { + /** Properties of a GetEntityTypeRequest. */ + interface IGetEntityTypeRequest { - /** UpdateSessionEntityTypeRequest sessionEntityType */ - sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); + /** GetEntityTypeRequest name */ + name?: (string|null); - /** UpdateSessionEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GetEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents an UpdateSessionEntityTypeRequest. */ - class UpdateSessionEntityTypeRequest implements IUpdateSessionEntityTypeRequest { + /** Represents a GetEntityTypeRequest. */ + class GetEntityTypeRequest implements IGetEntityTypeRequest { /** - * Constructs a new UpdateSessionEntityTypeRequest. + * Constructs a new GetEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest); - /** UpdateSessionEntityTypeRequest sessionEntityType. */ - public sessionEntityType?: (google.cloud.dialogflow.v2beta1.ISessionEntityType|null); + /** GetEntityTypeRequest name. */ + public name: string; - /** UpdateSessionEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GetEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * Creates a new GetEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSessionEntityTypeRequest instance + * @returns GetEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; /** - * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. - * @param message UpdateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. - * @param message UpdateSessionEntityTypeRequest message or plain object to encode + * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSessionEntityTypeRequest 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 UpdateSessionEntityTypeRequest + * @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.v2beta1.UpdateSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; /** - * Decodes an UpdateSessionEntityTypeRequest 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 UpdateSessionEntityTypeRequest + * @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.v2beta1.UpdateSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; /** - * Verifies an UpdateSessionEntityTypeRequest 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 UpdateSessionEntityTypeRequest 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 UpdateSessionEntityTypeRequest + * @returns GetEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; /** - * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message UpdateSessionEntityTypeRequest + * 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.v2beta1.UpdateSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSessionEntityTypeRequest to JSON. + * Converts this GetEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteSessionEntityTypeRequest. */ - interface IDeleteSessionEntityTypeRequest { + /** Properties of a CreateEntityTypeRequest. */ + interface ICreateEntityTypeRequest { - /** DeleteSessionEntityTypeRequest name */ - name?: (string|null); + /** CreateEntityTypeRequest parent */ + parent?: (string|null); + + /** CreateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + + /** CreateEntityTypeRequest languageCode */ + languageCode?: (string|null); } - /** Represents a DeleteSessionEntityTypeRequest. */ - class DeleteSessionEntityTypeRequest implements IDeleteSessionEntityTypeRequest { + /** Represents a CreateEntityTypeRequest. */ + class CreateEntityTypeRequest implements ICreateEntityTypeRequest { /** - * Constructs a new DeleteSessionEntityTypeRequest. + * Constructs a new CreateEntityTypeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest); - /** DeleteSessionEntityTypeRequest name. */ - public name: string; + /** CreateEntityTypeRequest parent. */ + public parent: string; + + /** CreateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + + /** CreateEntityTypeRequest languageCode. */ + public languageCode: string; /** - * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteSessionEntityTypeRequest instance + * @returns CreateEntityTypeRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; /** - * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. - * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. - * @param message DeleteSessionEntityTypeRequest message or plain object to encode + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IDeleteSessionEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteSessionEntityTypeRequest 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 DeleteSessionEntityTypeRequest + * @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.v2beta1.DeleteSessionEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; /** - * Decodes a DeleteSessionEntityTypeRequest 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 DeleteSessionEntityTypeRequest + * @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.v2beta1.DeleteSessionEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; /** - * Verifies a DeleteSessionEntityTypeRequest 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 DeleteSessionEntityTypeRequest 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 DeleteSessionEntityTypeRequest + * @returns CreateEntityTypeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; /** - * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteSessionEntityTypeRequest + * 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.v2beta1.DeleteSessionEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteSessionEntityTypeRequest to JSON. + * Converts this CreateEntityTypeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents an EntityTypes */ - class EntityTypes extends $protobuf.rpc.Service { + /** Properties of an UpdateEntityTypeRequest. */ + interface IUpdateEntityTypeRequest { - /** - * 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); + /** UpdateEntityTypeRequest entityType */ + entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); - /** - * 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; + /** UpdateEntityTypeRequest languageCode */ + languageCode?: (string|null); - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntityTypesResponse - */ - public listEntityTypes(request: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypesCallback): void; + /** UpdateEntityTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** - * Calls ListEntityTypes. - * @param request ListEntityTypesRequest message or plain object - * @returns Promise - */ - public listEntityTypes(request: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest): Promise; + /** Represents an UpdateEntityTypeRequest. */ + class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Constructs a new UpdateEntityTypeRequest. + * @param [properties] Properties to set */ - public getEntityType(request: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityTypeCallback): void; + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest); + + /** UpdateEntityTypeRequest entityType. */ + public entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + + /** UpdateEntityTypeRequest languageCode. */ + public languageCode: string; + + /** UpdateEntityTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Calls GetEntityType. - * @param request GetEntityTypeRequest message or plain object - * @returns Promise + * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEntityTypeRequest instance */ - public getEntityType(request: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest): Promise; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createEntityType(request: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityTypeCallback): void; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateEntityType. - * @param request CreateEntityTypeRequest message or plain object - * @returns Promise + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. + * @param message UpdateEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createEntityType(request: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest): Promise; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntityType - */ - public updateEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityTypeCallback): void; - - /** - * Calls UpdateEntityType. - * @param request UpdateEntityTypeRequest message or plain object - * @returns Promise - */ - public updateEntityType(request: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest): Promise; - - /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityTypeCallback): void; - - /** - * Calls DeleteEntityType. - * @param request DeleteEntityTypeRequest message or plain object - * @returns Promise - */ - public deleteEntityType(request: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest): Promise; - - /** - * Calls BatchUpdateEntityTypes. - * @param request BatchUpdateEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public batchUpdateEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypesCallback): void; - - /** - * Calls BatchUpdateEntityTypes. - * @param request BatchUpdateEntityTypesRequest message or plain object - * @returns Promise - */ - public batchUpdateEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest): Promise; - - /** - * Calls BatchDeleteEntityTypes. - * @param request BatchDeleteEntityTypesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * 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 UpdateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public batchDeleteEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; /** - * Calls BatchDeleteEntityTypes. - * @param request BatchDeleteEntityTypesRequest message or plain object - * @returns Promise + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public batchDeleteEntityTypes(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; /** - * Calls BatchCreateEntities. - * @param request BatchCreateEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies an UpdateEntityTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public batchCreateEntities(request: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntitiesCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls BatchCreateEntities. - * @param request BatchCreateEntitiesRequest message or plain object - * @returns Promise + * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEntityTypeRequest */ - public batchCreateEntities(request: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; /** - * Calls BatchUpdateEntities. - * @param request BatchUpdateEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * 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 batchUpdateEntities(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntitiesCallback): void; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls BatchUpdateEntities. - * @param request BatchUpdateEntitiesRequest message or plain object - * @returns Promise + * Converts this UpdateEntityTypeRequest to JSON. + * @returns JSON object */ - public batchUpdateEntities(request: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest): Promise; + public toJSON(): { [k: string]: any }; + } - /** - * Calls BatchDeleteEntities. - * @param request BatchDeleteEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public batchDeleteEntities(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, callback: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntitiesCallback): void; + /** Properties of a DeleteEntityTypeRequest. */ + interface IDeleteEntityTypeRequest { - /** - * Calls BatchDeleteEntities. - * @param request BatchDeleteEntitiesRequest message or plain object - * @returns Promise - */ - public batchDeleteEntities(request: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest): Promise; + /** DeleteEntityTypeRequest name */ + name?: (string|null); } - namespace EntityTypes { + /** Represents a DeleteEntityTypeRequest. */ + class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#listEntityTypes}. - * @param error Error, if any - * @param [response] ListEntityTypesResponse + * Constructs a new DeleteEntityTypeRequest. + * @param [properties] Properties to set */ - type ListEntityTypesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListEntityTypesResponse) => void; + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest); + + /** DeleteEntityTypeRequest name. */ + public name: string; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#getEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEntityTypeRequest instance */ - type GetEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#createEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#updateEntityType}. - * @param error Error, if any - * @param [response] EntityType + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. + * @param message DeleteEntityTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateEntityTypeCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EntityType) => void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#deleteEntityType}. - * @param error Error, if any - * @param [response] Empty + * 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 DeleteEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteEntityTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntityTypes}. - * @param error Error, if any - * @param [response] Operation + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEntityTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type BatchUpdateEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntityTypes}. - * @param error Error, if any - * @param [response] Operation + * Verifies a DeleteEntityTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type BatchDeleteEntityTypesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchCreateEntities}. - * @param error Error, if any - * @param [response] Operation + * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEntityTypeRequest */ - type BatchCreateEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntities}. - * @param error Error, if any - * @param [response] Operation + * 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 */ - type BatchUpdateEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntities}. - * @param error Error, if any - * @param [response] Operation + * Converts this DeleteEntityTypeRequest to JSON. + * @returns JSON object */ - type BatchDeleteEntitiesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of an EntityType. */ - interface IEntityType { - - /** EntityType name */ - name?: (string|null); + /** Properties of a BatchUpdateEntityTypesRequest. */ + interface IBatchUpdateEntityTypesRequest { - /** EntityType displayName */ - displayName?: (string|null); + /** BatchUpdateEntityTypesRequest parent */ + parent?: (string|null); - /** EntityType kind */ - kind?: (google.cloud.dialogflow.v2beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.Kind|null); + /** BatchUpdateEntityTypesRequest entityTypeBatchUri */ + entityTypeBatchUri?: (string|null); - /** EntityType autoExpansionMode */ - autoExpansionMode?: (google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|null); + /** BatchUpdateEntityTypesRequest entityTypeBatchInline */ + entityTypeBatchInline?: (google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null); - /** EntityType entities */ - entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + /** BatchUpdateEntityTypesRequest languageCode */ + languageCode?: (string|null); - /** EntityType enableFuzzyExtraction */ - enableFuzzyExtraction?: (boolean|null); + /** BatchUpdateEntityTypesRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an EntityType. */ - class EntityType implements IEntityType { + /** Represents a BatchUpdateEntityTypesRequest. */ + class BatchUpdateEntityTypesRequest implements IBatchUpdateEntityTypesRequest { /** - * Constructs a new EntityType. + * Constructs a new BatchUpdateEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IEntityType); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest); - /** EntityType name. */ - public name: string; + /** BatchUpdateEntityTypesRequest parent. */ + public parent: string; - /** EntityType displayName. */ - public displayName: string; + /** BatchUpdateEntityTypesRequest entityTypeBatchUri. */ + public entityTypeBatchUri?: (string|null); - /** EntityType kind. */ - public kind: (google.cloud.dialogflow.v2beta1.EntityType.Kind|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.Kind); + /** BatchUpdateEntityTypesRequest entityTypeBatchInline. */ + public entityTypeBatchInline?: (google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null); - /** EntityType autoExpansionMode. */ - public autoExpansionMode: (google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|keyof typeof google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode); + /** BatchUpdateEntityTypesRequest languageCode. */ + public languageCode: string; - /** EntityType entities. */ - public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + /** BatchUpdateEntityTypesRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** EntityType enableFuzzyExtraction. */ - public enableFuzzyExtraction: boolean; + /** BatchUpdateEntityTypesRequest entityTypeBatch. */ + public entityTypeBatch?: ("entityTypeBatchUri"|"entityTypeBatchInline"); /** - * Creates a new EntityType instance using the specified properties. + * Creates a new BatchUpdateEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EntityType instance + * @returns BatchUpdateEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IEntityType): google.cloud.dialogflow.v2beta1.EntityType; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified BatchUpdateEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. + * @param message BatchUpdateEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. - * @param message EntityType message or plain object to encode + * Encodes the specified BatchUpdateEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. + * @param message BatchUpdateEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEntityType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a BatchUpdateEntityTypesRequest 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 BatchUpdateEntityTypesRequest * @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.v2beta1.EntityType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityType + * @returns BatchUpdateEntityTypesRequest * @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.v2beta1.EntityType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; /** - * Verifies an EntityType message. + * Verifies a BatchUpdateEntityTypesRequest 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 a BatchUpdateEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityType + * @returns BatchUpdateEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EntityType; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. - * @param message EntityType + * Creates a plain object from a BatchUpdateEntityTypesRequest message. Also converts values to other types if specified. + * @param message BatchUpdateEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.EntityType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityType to JSON. + * Converts this BatchUpdateEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace EntityType { - - /** 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 - } - - /** Properties of an Entity. */ - interface IEntity { - - /** Entity value */ - value?: (string|null); - - /** Entity synonyms */ - synonyms?: (string[]|null); - } - - /** Represents an Entity. */ - class Entity implements IEntity { - - /** - * Constructs a new Entity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.EntityType.IEntity); - - /** Entity value. */ - public value: string; - - /** 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.v2beta1.EntityType.IEntity): google.cloud.dialogflow.v2beta1.EntityType.Entity; - - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.EntityType.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a ListEntityTypesRequest. */ - interface IListEntityTypesRequest { - - /** ListEntityTypesRequest parent */ - parent?: (string|null); - - /** ListEntityTypesRequest languageCode */ - languageCode?: (string|null); - - /** ListEntityTypesRequest pageSize */ - pageSize?: (number|null); + /** Properties of a BatchUpdateEntityTypesResponse. */ + interface IBatchUpdateEntityTypesResponse { - /** ListEntityTypesRequest pageToken */ - pageToken?: (string|null); + /** BatchUpdateEntityTypesResponse entityTypes */ + entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); } - /** Represents a ListEntityTypesRequest. */ - class ListEntityTypesRequest implements IListEntityTypesRequest { + /** Represents a BatchUpdateEntityTypesResponse. */ + class BatchUpdateEntityTypesResponse implements IBatchUpdateEntityTypesResponse { /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new BatchUpdateEntityTypesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest); - - /** ListEntityTypesRequest parent. */ - public parent: string; - - /** ListEntityTypesRequest languageCode. */ - public languageCode: string; - - /** ListEntityTypesRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse); - /** ListEntityTypesRequest pageToken. */ - public pageToken: string; + /** BatchUpdateEntityTypesResponse entityTypes. */ + public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new BatchUpdateEntityTypesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesRequest instance + * @returns BatchUpdateEntityTypesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified BatchUpdateEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. + * @param message BatchUpdateEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. - * @param message ListEntityTypesRequest message or plain object to encode + * Encodes the specified BatchUpdateEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. + * @param message BatchUpdateEntityTypesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a BatchUpdateEntityTypesResponse 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 BatchUpdateEntityTypesResponse * @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.v2beta1.ListEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesRequest + * @returns BatchUpdateEntityTypesResponse * @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.v2beta1.ListEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a BatchUpdateEntityTypesResponse 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 BatchUpdateEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesRequest + * @returns BatchUpdateEntityTypesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; /** - * 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 BatchUpdateEntityTypesResponse message. Also converts values to other types if specified. + * @param message BatchUpdateEntityTypesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this BatchUpdateEntityTypesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListEntityTypesResponse. */ - interface IListEntityTypesResponse { + /** Properties of a BatchDeleteEntityTypesRequest. */ + interface IBatchDeleteEntityTypesRequest { - /** ListEntityTypesResponse entityTypes */ - entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); + /** BatchDeleteEntityTypesRequest parent */ + parent?: (string|null); - /** ListEntityTypesResponse nextPageToken */ - nextPageToken?: (string|null); + /** BatchDeleteEntityTypesRequest entityTypeNames */ + entityTypeNames?: (string[]|null); } - /** Represents a ListEntityTypesResponse. */ - class ListEntityTypesResponse implements IListEntityTypesResponse { + /** Represents a BatchDeleteEntityTypesRequest. */ + class BatchDeleteEntityTypesRequest implements IBatchDeleteEntityTypesRequest { /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new BatchDeleteEntityTypesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest); - /** ListEntityTypesResponse entityTypes. */ - public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; + /** BatchDeleteEntityTypesRequest parent. */ + public parent: string; - /** ListEntityTypesResponse nextPageToken. */ - public nextPageToken: string; + /** BatchDeleteEntityTypesRequest entityTypeNames. */ + public entityTypeNames: string[]; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new BatchDeleteEntityTypesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntityTypesResponse instance + * @returns BatchDeleteEntityTypesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified BatchDeleteEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. + * @param message BatchDeleteEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. - * @param message ListEntityTypesResponse message or plain object to encode + * Encodes the specified BatchDeleteEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. + * @param message BatchDeleteEntityTypesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes a BatchDeleteEntityTypesRequest 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 BatchDeleteEntityTypesRequest * @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.v2beta1.ListEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntityTypesResponse + * @returns BatchDeleteEntityTypesRequest * @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.v2beta1.ListEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; /** - * Verifies a ListEntityTypesResponse message. + * Verifies a BatchDeleteEntityTypesRequest 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 BatchDeleteEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntityTypesResponse + * @returns BatchDeleteEntityTypesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; /** - * 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 BatchDeleteEntityTypesRequest message. Also converts values to other types if specified. + * @param message BatchDeleteEntityTypesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this BatchDeleteEntityTypesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetEntityTypeRequest. */ - interface IGetEntityTypeRequest { + /** Properties of a BatchCreateEntitiesRequest. */ + interface IBatchCreateEntitiesRequest { - /** GetEntityTypeRequest name */ - name?: (string|null); + /** BatchCreateEntitiesRequest parent */ + parent?: (string|null); - /** GetEntityTypeRequest languageCode */ + /** BatchCreateEntitiesRequest entities */ + entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + + /** BatchCreateEntitiesRequest languageCode */ languageCode?: (string|null); } - /** Represents a GetEntityTypeRequest. */ - class GetEntityTypeRequest implements IGetEntityTypeRequest { + /** Represents a BatchCreateEntitiesRequest. */ + class BatchCreateEntitiesRequest implements IBatchCreateEntitiesRequest { /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new BatchCreateEntitiesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest); - /** GetEntityTypeRequest name. */ - public name: string; + /** BatchCreateEntitiesRequest parent. */ + public parent: string; - /** GetEntityTypeRequest languageCode. */ + /** BatchCreateEntitiesRequest entities. */ + public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + + /** BatchCreateEntitiesRequest languageCode. */ public languageCode: string; /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new BatchCreateEntitiesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntityTypeRequest instance + * @returns BatchCreateEntitiesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified BatchCreateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. + * @param message BatchCreateEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.verify|verify} messages. - * @param message GetEntityTypeRequest message or plain object to encode + * Encodes the specified BatchCreateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. + * @param message BatchCreateEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes a BatchCreateEntitiesRequest 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 BatchCreateEntitiesRequest * @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.v2beta1.GetEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntityTypeRequest + * @returns BatchCreateEntitiesRequest * @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.v2beta1.GetEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; /** - * Verifies a GetEntityTypeRequest message. + * Verifies a BatchCreateEntitiesRequest 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 a BatchCreateEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntityTypeRequest + * @returns BatchCreateEntitiesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. - * @param message GetEntityTypeRequest + * Creates a plain object from a BatchCreateEntitiesRequest message. Also converts values to other types if specified. + * @param message BatchCreateEntitiesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntityTypeRequest to JSON. + * Converts this BatchCreateEntitiesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateEntityTypeRequest. */ - interface ICreateEntityTypeRequest { + /** Properties of a BatchUpdateEntitiesRequest. */ + interface IBatchUpdateEntitiesRequest { - /** CreateEntityTypeRequest parent */ + /** BatchUpdateEntitiesRequest parent */ parent?: (string|null); - /** CreateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + /** BatchUpdateEntitiesRequest entities */ + entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); - /** CreateEntityTypeRequest languageCode */ + /** BatchUpdateEntitiesRequest languageCode */ languageCode?: (string|null); + + /** BatchUpdateEntitiesRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a CreateEntityTypeRequest. */ - class CreateEntityTypeRequest implements ICreateEntityTypeRequest { + /** Represents a BatchUpdateEntitiesRequest. */ + class BatchUpdateEntitiesRequest implements IBatchUpdateEntitiesRequest { /** - * Constructs a new CreateEntityTypeRequest. + * Constructs a new BatchUpdateEntitiesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest); - /** CreateEntityTypeRequest parent. */ + /** BatchUpdateEntitiesRequest parent. */ public parent: string; - /** CreateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + /** BatchUpdateEntitiesRequest entities. */ + public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; - /** CreateEntityTypeRequest languageCode. */ + /** BatchUpdateEntitiesRequest languageCode. */ public languageCode: string; + /** BatchUpdateEntitiesRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. + * Creates a new BatchUpdateEntitiesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntityTypeRequest instance + * @returns BatchUpdateEntitiesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified BatchUpdateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. + * @param message BatchUpdateEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. - * @param message CreateEntityTypeRequest message or plain object to encode + * Encodes the specified BatchUpdateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. + * @param message BatchUpdateEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. + * Decodes a BatchUpdateEntitiesRequest 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 BatchUpdateEntitiesRequest * @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.v2beta1.CreateEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntityTypeRequest + * @returns BatchUpdateEntitiesRequest * @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.v2beta1.CreateEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; /** - * Verifies a CreateEntityTypeRequest message. + * Verifies a BatchUpdateEntitiesRequest 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 BatchUpdateEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntityTypeRequest + * @returns BatchUpdateEntitiesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; /** - * 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 BatchUpdateEntitiesRequest message. Also converts values to other types if specified. + * @param message BatchUpdateEntitiesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntityTypeRequest to JSON. + * Converts this BatchUpdateEntitiesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateEntityTypeRequest. */ - interface IUpdateEntityTypeRequest { + /** Properties of a BatchDeleteEntitiesRequest. */ + interface IBatchDeleteEntitiesRequest { - /** UpdateEntityTypeRequest entityType */ - entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + /** BatchDeleteEntitiesRequest parent */ + parent?: (string|null); - /** UpdateEntityTypeRequest languageCode */ - languageCode?: (string|null); + /** BatchDeleteEntitiesRequest entityValues */ + entityValues?: (string[]|null); - /** UpdateEntityTypeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** BatchDeleteEntitiesRequest languageCode */ + languageCode?: (string|null); } - /** Represents an UpdateEntityTypeRequest. */ - class UpdateEntityTypeRequest implements IUpdateEntityTypeRequest { + /** Represents a BatchDeleteEntitiesRequest. */ + class BatchDeleteEntitiesRequest implements IBatchDeleteEntitiesRequest { /** - * Constructs a new UpdateEntityTypeRequest. + * Constructs a new BatchDeleteEntitiesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest); - /** UpdateEntityTypeRequest entityType. */ - public entityType?: (google.cloud.dialogflow.v2beta1.IEntityType|null); + /** BatchDeleteEntitiesRequest parent. */ + public parent: string; - /** UpdateEntityTypeRequest languageCode. */ - public languageCode: string; + /** BatchDeleteEntitiesRequest entityValues. */ + public entityValues: string[]; - /** UpdateEntityTypeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** BatchDeleteEntitiesRequest languageCode. */ + public languageCode: string; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new BatchDeleteEntitiesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEntityTypeRequest instance + * @returns BatchDeleteEntitiesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode + * Encodes the specified BatchDeleteEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. + * @param message BatchDeleteEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. - * @param message UpdateEntityTypeRequest message or plain object to encode + * Encodes the specified BatchDeleteEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. + * @param message BatchDeleteEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes a BatchDeleteEntitiesRequest 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 BatchDeleteEntitiesRequest * @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.v2beta1.UpdateEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEntityTypeRequest + * @returns BatchDeleteEntitiesRequest * @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.v2beta1.UpdateEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies a BatchDeleteEntitiesRequest 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 BatchDeleteEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntityTypeRequest + * @returns BatchDeleteEntitiesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; /** - * 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 BatchDeleteEntitiesRequest message. Also converts values to other types if specified. + * @param message BatchDeleteEntitiesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this BatchDeleteEntitiesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteEntityTypeRequest. */ - interface IDeleteEntityTypeRequest { + /** Properties of an EntityTypeBatch. */ + interface IEntityTypeBatch { - /** DeleteEntityTypeRequest name */ - name?: (string|null); + /** EntityTypeBatch entityTypes */ + entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); } - /** Represents a DeleteEntityTypeRequest. */ - class DeleteEntityTypeRequest implements IDeleteEntityTypeRequest { + /** Represents an EntityTypeBatch. */ + class EntityTypeBatch implements IEntityTypeBatch { /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new EntityTypeBatch. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IEntityTypeBatch); - /** DeleteEntityTypeRequest name. */ - public name: string; + /** EntityTypeBatch entityTypes. */ + public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Creates a new EntityTypeBatch instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntityTypeRequest instance + * @returns EntityTypeBatch instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IEntityTypeBatch): google.cloud.dialogflow.v2beta1.EntityTypeBatch; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified EntityTypeBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. + * @param message EntityTypeBatch message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IEntityTypeBatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. - * @param message DeleteEntityTypeRequest message or plain object to encode + * Encodes the specified EntityTypeBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. + * @param message EntityTypeBatch message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEntityTypeBatch, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes an EntityTypeBatch 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 EntityTypeBatch * @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.v2beta1.DeleteEntityTypeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.EntityTypeBatch; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an EntityTypeBatch message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntityTypeRequest + * @returns EntityTypeBatch * @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.v2beta1.DeleteEntityTypeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.EntityTypeBatch; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies an EntityTypeBatch 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 an EntityTypeBatch message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntityTypeRequest + * @returns EntityTypeBatch */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EntityTypeBatch; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. - * @param message DeleteEntityTypeRequest + * Creates a plain object from an EntityTypeBatch message. Also converts values to other types if specified. + * @param message EntityTypeBatch * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.EntityTypeBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this EntityTypeBatch to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchUpdateEntityTypesRequest. */ - interface IBatchUpdateEntityTypesRequest { - - /** BatchUpdateEntityTypesRequest parent */ - parent?: (string|null); - - /** BatchUpdateEntityTypesRequest entityTypeBatchUri */ - entityTypeBatchUri?: (string|null); - - /** BatchUpdateEntityTypesRequest entityTypeBatchInline */ - entityTypeBatchInline?: (google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null); - - /** BatchUpdateEntityTypesRequest languageCode */ - languageCode?: (string|null); - - /** BatchUpdateEntityTypesRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a BatchUpdateEntityTypesRequest. */ - class BatchUpdateEntityTypesRequest implements IBatchUpdateEntityTypesRequest { + /** Represents a Conversations */ + class Conversations extends $protobuf.rpc.Service { /** - * Constructs a new BatchUpdateEntityTypesRequest. - * @param [properties] Properties to set + * Constructs a new Conversations 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.v2beta1.IBatchUpdateEntityTypesRequest); - - /** BatchUpdateEntityTypesRequest parent. */ - public parent: string; - - /** BatchUpdateEntityTypesRequest entityTypeBatchUri. */ - public entityTypeBatchUri?: (string|null); - - /** BatchUpdateEntityTypesRequest entityTypeBatchInline. */ - public entityTypeBatchInline?: (google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null); - - /** BatchUpdateEntityTypesRequest languageCode. */ - public languageCode: string; - - /** BatchUpdateEntityTypesRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** BatchUpdateEntityTypesRequest entityTypeBatch. */ - public entityTypeBatch?: ("entityTypeBatchUri"|"entityTypeBatchInline"); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a new BatchUpdateEntityTypesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BatchUpdateEntityTypesRequest instance + * Creates new Conversations 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(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Conversations; /** - * Encodes the specified BatchUpdateEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. - * @param message BatchUpdateEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createConversation(request: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.CreateConversationCallback): void; /** - * Encodes the specified BatchUpdateEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. - * @param message BatchUpdateEntityTypesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public createConversation(request: google.cloud.dialogflow.v2beta1.ICreateConversationRequest): Promise; /** - * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchUpdateEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationsResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; + public listConversations(request: google.cloud.dialogflow.v2beta1.IListConversationsRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.ListConversationsCallback): void; /** - * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchUpdateEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; + public listConversations(request: google.cloud.dialogflow.v2beta1.IListConversationsRequest): Promise; /** - * Verifies a BatchUpdateEntityTypesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation */ - public static verify(message: { [k: string]: any }): (string|null); + public getConversation(request: google.cloud.dialogflow.v2beta1.IGetConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.GetConversationCallback): void; /** - * Creates a BatchUpdateEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchUpdateEntityTypesRequest + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest; + public getConversation(request: google.cloud.dialogflow.v2beta1.IGetConversationRequest): Promise; /** - * Creates a plain object from a BatchUpdateEntityTypesRequest message. Also converts values to other types if specified. - * @param message BatchUpdateEntityTypesRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CompleteConversation. + * @param request CompleteConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public completeConversation(request: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.CompleteConversationCallback): void; /** - * Converts this BatchUpdateEntityTypesRequest to JSON. - * @returns JSON object + * Calls CompleteConversation. + * @param request CompleteConversationRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; - } + public completeConversation(request: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest): Promise; - /** Properties of a BatchUpdateEntityTypesResponse. */ - interface IBatchUpdateEntityTypesResponse { + /** + * Calls BatchCreateMessages. + * @param request BatchCreateMessagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateMessagesResponse + */ + public batchCreateMessages(request: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.BatchCreateMessagesCallback): void; - /** BatchUpdateEntityTypesResponse entityTypes */ - entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); + /** + * Calls BatchCreateMessages. + * @param request BatchCreateMessagesRequest message or plain object + * @returns Promise + */ + public batchCreateMessages(request: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest): Promise; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMessagesResponse + */ + public listMessages(request: google.cloud.dialogflow.v2beta1.IListMessagesRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.ListMessagesCallback): void; + + /** + * Calls ListMessages. + * @param request ListMessagesRequest message or plain object + * @returns Promise + */ + public listMessages(request: google.cloud.dialogflow.v2beta1.IListMessagesRequest): Promise; } - /** Represents a BatchUpdateEntityTypesResponse. */ - class BatchUpdateEntityTypesResponse implements IBatchUpdateEntityTypesResponse { + namespace Conversations { /** - * Constructs a new BatchUpdateEntityTypesResponse. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#createConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type CreateConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listConversations}. + * @param error Error, if any + * @param [response] ListConversationsResponse + */ + type ListConversationsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListConversationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#getConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type GetConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#completeConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type CompleteConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#batchCreateMessages}. + * @param error Error, if any + * @param [response] BatchCreateMessagesResponse + */ + type BatchCreateMessagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listMessages}. + * @param error Error, if any + * @param [response] ListMessagesResponse + */ + type ListMessagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListMessagesResponse) => void; + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation name */ + name?: (string|null); + + /** Conversation lifecycleState */ + lifecycleState?: (google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|null); + + /** Conversation conversationProfile */ + conversationProfile?: (string|null); + + /** Conversation phoneNumber */ + phoneNumber?: (google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null); + + /** Conversation conversationStage */ + conversationStage?: (google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|null); + + /** Conversation startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IConversation); - /** BatchUpdateEntityTypesResponse entityTypes. */ - public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; + /** Conversation name. */ + public name: string; + + /** Conversation lifecycleState. */ + public lifecycleState: (google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.LifecycleState); + + /** Conversation conversationProfile. */ + public conversationProfile: string; + + /** Conversation phoneNumber. */ + public phoneNumber?: (google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null); + + /** Conversation conversationStage. */ + public conversationStage: (google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.ConversationStage); + + /** Conversation startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new BatchUpdateEntityTypesResponse instance using the specified properties. + * Creates a new Conversation instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateEntityTypesResponse instance + * @returns Conversation instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IConversation): google.cloud.dialogflow.v2beta1.Conversation; /** - * Encodes the specified BatchUpdateEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. - * @param message BatchUpdateEntityTypesResponse message or plain object to encode + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. - * @param message BatchUpdateEntityTypesResponse message or plain object to encode + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer. + * Decodes a Conversation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchUpdateEntityTypesResponse + * @returns Conversation * @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.v2beta1.BatchUpdateEntityTypesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Conversation; /** - * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a Conversation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchUpdateEntityTypesResponse + * @returns Conversation * @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.v2beta1.BatchUpdateEntityTypesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Conversation; /** - * Verifies a BatchUpdateEntityTypesResponse message. + * Verifies a Conversation 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 BatchUpdateEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchUpdateEntityTypesResponse + * @returns Conversation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Conversation; /** - * Creates a plain object from a BatchUpdateEntityTypesResponse message. Also converts values to other types if specified. - * @param message BatchUpdateEntityTypesResponse + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateEntityTypesResponse to JSON. + * Converts this Conversation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchDeleteEntityTypesRequest. */ - interface IBatchDeleteEntityTypesRequest { + namespace Conversation { - /** BatchDeleteEntityTypesRequest parent */ - parent?: (string|null); + /** LifecycleState enum. */ + enum LifecycleState { + LIFECYCLE_STATE_UNSPECIFIED = 0, + IN_PROGRESS = 1, + COMPLETED = 2 + } - /** BatchDeleteEntityTypesRequest entityTypeNames */ - entityTypeNames?: (string[]|null); + /** ConversationStage enum. */ + enum ConversationStage { + CONVERSATION_STAGE_UNSPECIFIED = 0, + VIRTUAL_AGENT_STAGE = 1, + HUMAN_ASSIST_STAGE = 2 + } } - /** Represents a BatchDeleteEntityTypesRequest. */ - class BatchDeleteEntityTypesRequest implements IBatchDeleteEntityTypesRequest { + /** Properties of a ConversationPhoneNumber. */ + interface IConversationPhoneNumber { + + /** ConversationPhoneNumber phoneNumber */ + phoneNumber?: (string|null); + } + + /** Represents a ConversationPhoneNumber. */ + class ConversationPhoneNumber implements IConversationPhoneNumber { /** - * Constructs a new BatchDeleteEntityTypesRequest. + * Constructs a new ConversationPhoneNumber. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest); - - /** BatchDeleteEntityTypesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber); - /** BatchDeleteEntityTypesRequest entityTypeNames. */ - public entityTypeNames: string[]; + /** ConversationPhoneNumber phoneNumber. */ + public phoneNumber: string; /** - * Creates a new BatchDeleteEntityTypesRequest instance using the specified properties. + * Creates a new ConversationPhoneNumber instance using the specified properties. * @param [properties] Properties to set - * @returns BatchDeleteEntityTypesRequest instance + * @returns ConversationPhoneNumber instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; /** - * Encodes the specified BatchDeleteEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. - * @param message BatchDeleteEntityTypesRequest message or plain object to encode + * Encodes the specified ConversationPhoneNumber message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. + * @param message ConversationPhoneNumber message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchDeleteEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. - * @param message BatchDeleteEntityTypesRequest message or plain object to encode + * Encodes the specified ConversationPhoneNumber message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. + * @param message ConversationPhoneNumber message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer. + * Decodes a ConversationPhoneNumber message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchDeleteEntityTypesRequest + * @returns ConversationPhoneNumber * @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.v2beta1.BatchDeleteEntityTypesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; /** - * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationPhoneNumber message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchDeleteEntityTypesRequest + * @returns ConversationPhoneNumber * @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.v2beta1.BatchDeleteEntityTypesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; /** - * Verifies a BatchDeleteEntityTypesRequest message. + * Verifies a ConversationPhoneNumber 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 BatchDeleteEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationPhoneNumber message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchDeleteEntityTypesRequest + * @returns ConversationPhoneNumber */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; /** - * Creates a plain object from a BatchDeleteEntityTypesRequest message. Also converts values to other types if specified. - * @param message BatchDeleteEntityTypesRequest + * Creates a plain object from a ConversationPhoneNumber message. Also converts values to other types if specified. + * @param message ConversationPhoneNumber * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationPhoneNumber, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchDeleteEntityTypesRequest to JSON. + * Converts this ConversationPhoneNumber to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateEntitiesRequest. */ - interface IBatchCreateEntitiesRequest { + /** Properties of a CreateConversationRequest. */ + interface ICreateConversationRequest { - /** BatchCreateEntitiesRequest parent */ + /** CreateConversationRequest parent */ parent?: (string|null); - /** BatchCreateEntitiesRequest entities */ - entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + /** CreateConversationRequest conversation */ + conversation?: (google.cloud.dialogflow.v2beta1.IConversation|null); - /** BatchCreateEntitiesRequest languageCode */ - languageCode?: (string|null); + /** CreateConversationRequest conversationId */ + conversationId?: (string|null); } - /** Represents a BatchCreateEntitiesRequest. */ - class BatchCreateEntitiesRequest implements IBatchCreateEntitiesRequest { + /** Represents a CreateConversationRequest. */ + class CreateConversationRequest implements ICreateConversationRequest { /** - * Constructs a new BatchCreateEntitiesRequest. + * Constructs a new CreateConversationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationRequest); - /** BatchCreateEntitiesRequest parent. */ + /** CreateConversationRequest parent. */ public parent: string; - /** BatchCreateEntitiesRequest entities. */ - public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + /** CreateConversationRequest conversation. */ + public conversation?: (google.cloud.dialogflow.v2beta1.IConversation|null); - /** BatchCreateEntitiesRequest languageCode. */ - public languageCode: string; + /** CreateConversationRequest conversationId. */ + public conversationId: string; /** - * Creates a new BatchCreateEntitiesRequest instance using the specified properties. + * Creates a new CreateConversationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateEntitiesRequest instance + * @returns CreateConversationRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationRequest): google.cloud.dialogflow.v2beta1.CreateConversationRequest; /** - * Encodes the specified BatchCreateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. - * @param message BatchCreateEntitiesRequest message or plain object to encode + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. - * @param message BatchCreateEntitiesRequest message or plain object to encode + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer. + * Decodes a CreateConversationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateEntitiesRequest + * @returns CreateConversationRequest * @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.v2beta1.BatchCreateEntitiesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateConversationRequest; /** - * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateEntitiesRequest + * @returns CreateConversationRequest * @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.v2beta1.BatchCreateEntitiesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateConversationRequest; /** - * Verifies a BatchCreateEntitiesRequest message. + * Verifies a CreateConversationRequest 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 BatchCreateEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateEntitiesRequest + * @returns CreateConversationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateConversationRequest; /** - * Creates a plain object from a BatchCreateEntitiesRequest message. Also converts values to other types if specified. - * @param message BatchCreateEntitiesRequest + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @param message CreateConversationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateEntitiesRequest to JSON. + * Converts this CreateConversationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchUpdateEntitiesRequest. */ - interface IBatchUpdateEntitiesRequest { + /** Properties of a ListConversationsRequest. */ + interface IListConversationsRequest { - /** BatchUpdateEntitiesRequest parent */ + /** ListConversationsRequest parent */ parent?: (string|null); - /** BatchUpdateEntitiesRequest entities */ - entities?: (google.cloud.dialogflow.v2beta1.EntityType.IEntity[]|null); + /** ListConversationsRequest pageSize */ + pageSize?: (number|null); - /** BatchUpdateEntitiesRequest languageCode */ - languageCode?: (string|null); + /** ListConversationsRequest pageToken */ + pageToken?: (string|null); - /** BatchUpdateEntitiesRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ListConversationsRequest filter */ + filter?: (string|null); } - /** Represents a BatchUpdateEntitiesRequest. */ - class BatchUpdateEntitiesRequest implements IBatchUpdateEntitiesRequest { + /** Represents a ListConversationsRequest. */ + class ListConversationsRequest implements IListConversationsRequest { /** - * Constructs a new BatchUpdateEntitiesRequest. + * Constructs a new ListConversationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationsRequest); - /** BatchUpdateEntitiesRequest parent. */ + /** ListConversationsRequest parent. */ public parent: string; - /** BatchUpdateEntitiesRequest entities. */ - public entities: google.cloud.dialogflow.v2beta1.EntityType.IEntity[]; + /** ListConversationsRequest pageSize. */ + public pageSize: number; - /** BatchUpdateEntitiesRequest languageCode. */ - public languageCode: string; + /** ListConversationsRequest pageToken. */ + public pageToken: string; - /** BatchUpdateEntitiesRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ListConversationsRequest filter. */ + public filter: string; /** - * Creates a new BatchUpdateEntitiesRequest instance using the specified properties. + * Creates a new ListConversationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchUpdateEntitiesRequest instance + * @returns ListConversationsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationsRequest): google.cloud.dialogflow.v2beta1.ListConversationsRequest; /** - * Encodes the specified BatchUpdateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. - * @param message BatchUpdateEntitiesRequest message or plain object to encode + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchUpdateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. - * @param message BatchUpdateEntitiesRequest message or plain object to encode + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer. + * Decodes a ListConversationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchUpdateEntitiesRequest + * @returns ListConversationsRequest * @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.v2beta1.BatchUpdateEntitiesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListConversationsRequest; /** - * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchUpdateEntitiesRequest + * @returns ListConversationsRequest * @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.v2beta1.BatchUpdateEntitiesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListConversationsRequest; /** - * Verifies a BatchUpdateEntitiesRequest message. + * Verifies a ListConversationsRequest 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 BatchUpdateEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchUpdateEntitiesRequest + * @returns ListConversationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationsRequest; /** - * Creates a plain object from a BatchUpdateEntitiesRequest message. Also converts values to other types if specified. - * @param message BatchUpdateEntitiesRequest + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * @param message ListConversationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchUpdateEntitiesRequest to JSON. + * Converts this ListConversationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchDeleteEntitiesRequest. */ - interface IBatchDeleteEntitiesRequest { - - /** BatchDeleteEntitiesRequest parent */ - parent?: (string|null); + /** Properties of a ListConversationsResponse. */ + interface IListConversationsResponse { - /** BatchDeleteEntitiesRequest entityValues */ - entityValues?: (string[]|null); + /** ListConversationsResponse conversations */ + conversations?: (google.cloud.dialogflow.v2beta1.IConversation[]|null); - /** BatchDeleteEntitiesRequest languageCode */ - languageCode?: (string|null); + /** ListConversationsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a BatchDeleteEntitiesRequest. */ - class BatchDeleteEntitiesRequest implements IBatchDeleteEntitiesRequest { + /** Represents a ListConversationsResponse. */ + class ListConversationsResponse implements IListConversationsResponse { /** - * Constructs a new BatchDeleteEntitiesRequest. + * Constructs a new ListConversationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest); - - /** BatchDeleteEntitiesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationsResponse); - /** BatchDeleteEntitiesRequest entityValues. */ - public entityValues: string[]; + /** ListConversationsResponse conversations. */ + public conversations: google.cloud.dialogflow.v2beta1.IConversation[]; - /** BatchDeleteEntitiesRequest languageCode. */ - public languageCode: string; + /** ListConversationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new BatchDeleteEntitiesRequest instance using the specified properties. + * Creates a new ListConversationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns BatchDeleteEntitiesRequest instance + * @returns ListConversationsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationsResponse): google.cloud.dialogflow.v2beta1.ListConversationsResponse; /** - * Encodes the specified BatchDeleteEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. - * @param message BatchDeleteEntitiesRequest message or plain object to encode + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchDeleteEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. - * @param message BatchDeleteEntitiesRequest message or plain object to encode + * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer. + * Decodes a ListConversationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchDeleteEntitiesRequest + * @returns ListConversationsResponse * @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.v2beta1.BatchDeleteEntitiesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListConversationsResponse; /** - * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchDeleteEntitiesRequest + * @returns ListConversationsResponse * @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.v2beta1.BatchDeleteEntitiesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListConversationsResponse; /** - * Verifies a BatchDeleteEntitiesRequest message. + * Verifies a ListConversationsResponse 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 BatchDeleteEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchDeleteEntitiesRequest + * @returns ListConversationsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationsResponse; /** - * Creates a plain object from a BatchDeleteEntitiesRequest message. Also converts values to other types if specified. - * @param message BatchDeleteEntitiesRequest + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @param message ListConversationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchDeleteEntitiesRequest to JSON. + * Converts this ListConversationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an EntityTypeBatch. */ - interface IEntityTypeBatch { + /** Properties of a GetConversationRequest. */ + interface IGetConversationRequest { - /** EntityTypeBatch entityTypes */ - entityTypes?: (google.cloud.dialogflow.v2beta1.IEntityType[]|null); + /** GetConversationRequest name */ + name?: (string|null); } - /** Represents an EntityTypeBatch. */ - class EntityTypeBatch implements IEntityTypeBatch { + /** Represents a GetConversationRequest. */ + class GetConversationRequest implements IGetConversationRequest { /** - * Constructs a new EntityTypeBatch. + * Constructs a new GetConversationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IEntityTypeBatch); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetConversationRequest); - /** EntityTypeBatch entityTypes. */ - public entityTypes: google.cloud.dialogflow.v2beta1.IEntityType[]; + /** GetConversationRequest name. */ + public name: string; /** - * Creates a new EntityTypeBatch instance using the specified properties. + * Creates a new GetConversationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EntityTypeBatch instance + * @returns GetConversationRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IEntityTypeBatch): google.cloud.dialogflow.v2beta1.EntityTypeBatch; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetConversationRequest): google.cloud.dialogflow.v2beta1.GetConversationRequest; /** - * Encodes the specified EntityTypeBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. - * @param message EntityTypeBatch message or plain object to encode + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IEntityTypeBatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityTypeBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. - * @param message EntityTypeBatch message or plain object to encode + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEntityTypeBatch, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityTypeBatch message from the specified reader or buffer. + * Decodes a GetConversationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityTypeBatch + * @returns GetConversationRequest * @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.v2beta1.EntityTypeBatch; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetConversationRequest; /** - * Decodes an EntityTypeBatch message from the specified reader or buffer, length delimited. + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityTypeBatch + * @returns GetConversationRequest * @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.v2beta1.EntityTypeBatch; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetConversationRequest; /** - * Verifies an EntityTypeBatch message. + * Verifies a GetConversationRequest 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 EntityTypeBatch message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityTypeBatch + * @returns GetConversationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EntityTypeBatch; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetConversationRequest; /** - * Creates a plain object from an EntityTypeBatch message. Also converts values to other types if specified. - * @param message EntityTypeBatch + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @param message GetConversationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.EntityTypeBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityTypeBatch to JSON. + * Converts this GetConversationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Conversations */ - class Conversations extends $protobuf.rpc.Service { + /** Properties of a CompleteConversationRequest. */ + interface ICompleteConversationRequest { - /** - * Constructs a new Conversations 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); + /** CompleteConversationRequest name */ + name?: (string|null); + } + + /** Represents a CompleteConversationRequest. */ + class CompleteConversationRequest implements ICompleteConversationRequest { /** - * Creates new Conversations 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. + * Constructs a new CompleteConversationRequest. + * @param [properties] Properties to set */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Conversations; + constructor(properties?: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest); + + /** CompleteConversationRequest name. */ + public name: string; /** - * Calls CreateConversation. - * @param request CreateConversationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Conversation + * Creates a new CompleteConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteConversationRequest instance */ - public createConversation(request: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.CreateConversationCallback): void; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; /** - * Calls CreateConversation. - * @param request CreateConversationRequest message or plain object - * @returns Promise + * Encodes the specified CompleteConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * @param message CompleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createConversation(request: google.cloud.dialogflow.v2beta1.ICreateConversationRequest): Promise; + public static encode(message: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListConversations. - * @param request ListConversationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationsResponse + * Encodes the specified CompleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * @param message CompleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listConversations(request: google.cloud.dialogflow.v2beta1.IListConversationsRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.ListConversationsCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListConversations. - * @param request ListConversationsRequest message or plain object - * @returns Promise + * Decodes a CompleteConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listConversations(request: google.cloud.dialogflow.v2beta1.IListConversationsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; /** - * Calls GetConversation. - * @param request GetConversationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Conversation + * Decodes a CompleteConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getConversation(request: google.cloud.dialogflow.v2beta1.IGetConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.GetConversationCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; /** - * Calls GetConversation. - * @param request GetConversationRequest message or plain object - * @returns Promise + * Verifies a CompleteConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getConversation(request: google.cloud.dialogflow.v2beta1.IGetConversationRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CompleteConversation. - * @param request CompleteConversationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Conversation + * Creates a CompleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteConversationRequest */ - public completeConversation(request: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.CompleteConversationCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; /** - * Calls CompleteConversation. - * @param request CompleteConversationRequest message or plain object - * @returns Promise + * Creates a plain object from a CompleteConversationRequest message. Also converts values to other types if specified. + * @param message CompleteConversationRequest + * @param [options] Conversion options + * @returns Plain object */ - public completeConversation(request: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest): Promise; + public static toObject(message: google.cloud.dialogflow.v2beta1.CompleteConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls BatchCreateMessages. - * @param request BatchCreateMessagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BatchCreateMessagesResponse + * Converts this CompleteConversationRequest to JSON. + * @returns JSON object */ - public batchCreateMessages(request: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.BatchCreateMessagesCallback): void; + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateMessageRequest. */ + interface ICreateMessageRequest { + + /** CreateMessageRequest parent */ + parent?: (string|null); + + /** CreateMessageRequest message */ + message?: (google.cloud.dialogflow.v2beta1.IMessage|null); + } + + /** Represents a CreateMessageRequest. */ + class CreateMessageRequest implements ICreateMessageRequest { /** - * Calls BatchCreateMessages. - * @param request BatchCreateMessagesRequest message or plain object - * @returns Promise + * Constructs a new CreateMessageRequest. + * @param [properties] Properties to set */ - public batchCreateMessages(request: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest): Promise; + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateMessageRequest); + + /** CreateMessageRequest parent. */ + public parent: string; + + /** CreateMessageRequest message. */ + public message?: (google.cloud.dialogflow.v2beta1.IMessage|null); /** - * Calls ListMessages. - * @param request ListMessagesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMessagesResponse + * Creates a new CreateMessageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMessageRequest instance */ - public listMessages(request: google.cloud.dialogflow.v2beta1.IListMessagesRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.ListMessagesCallback): void; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateMessageRequest): google.cloud.dialogflow.v2beta1.CreateMessageRequest; /** - * Calls ListMessages. - * @param request ListMessagesRequest message or plain object - * @returns Promise + * Encodes the specified CreateMessageRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * @param message CreateMessageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMessages(request: google.cloud.dialogflow.v2beta1.IListMessagesRequest): Promise; - } - - namespace Conversations { + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#createConversation}. - * @param error Error, if any - * @param [response] Conversation + * Encodes the specified CreateMessageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * @param message CreateMessageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listConversations}. - * @param error Error, if any - * @param [response] ListConversationsResponse + * Decodes a CreateMessageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListConversationsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListConversationsResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateMessageRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#getConversation}. - * @param error Error, if any - * @param [response] Conversation + * Decodes a CreateMessageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateMessageRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#completeConversation}. - * @param error Error, if any - * @param [response] Conversation + * Verifies a CreateMessageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CompleteConversationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Conversation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#batchCreateMessages}. - * @param error Error, if any - * @param [response] BatchCreateMessagesResponse + * Creates a CreateMessageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMessageRequest */ - type BatchCreateMessagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateMessageRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listMessages}. - * @param error Error, if any - * @param [response] ListMessagesResponse + * Creates a plain object from a CreateMessageRequest message. Also converts values to other types if specified. + * @param message CreateMessageRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListMessagesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListMessagesResponse) => void; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateMessageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMessageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BatchCreateMessagesRequest. */ + interface IBatchCreateMessagesRequest { + + /** BatchCreateMessagesRequest parent */ + parent?: (string|null); + + /** BatchCreateMessagesRequest requests */ + requests?: (google.cloud.dialogflow.v2beta1.ICreateMessageRequest[]|null); + } + + /** Represents a BatchCreateMessagesRequest. */ + class BatchCreateMessagesRequest implements IBatchCreateMessagesRequest { + + /** + * Constructs a new BatchCreateMessagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest); + + /** BatchCreateMessagesRequest parent. */ + public parent: string; + + /** BatchCreateMessagesRequest requests. */ + public requests: google.cloud.dialogflow.v2beta1.ICreateMessageRequest[]; + + /** + * Creates a new BatchCreateMessagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateMessagesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest): google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest; + + /** + * Encodes the specified BatchCreateMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. + * @param message BatchCreateMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. + * @param message BatchCreateMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateMessagesRequest + * @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.v2beta1.BatchCreateMessagesRequest; + + /** + * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateMessagesRequest + * @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.v2beta1.BatchCreateMessagesRequest; + + /** + * Verifies a BatchCreateMessagesRequest 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 BatchCreateMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateMessagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest; + + /** + * Creates a plain object from a BatchCreateMessagesRequest message. Also converts values to other types if specified. + * @param message BatchCreateMessagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateMessagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BatchCreateMessagesResponse. */ + interface IBatchCreateMessagesResponse { + + /** BatchCreateMessagesResponse messages */ + messages?: (google.cloud.dialogflow.v2beta1.IMessage[]|null); + } + + /** Represents a BatchCreateMessagesResponse. */ + class BatchCreateMessagesResponse implements IBatchCreateMessagesResponse { + + /** + * Constructs a new BatchCreateMessagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse); + + /** BatchCreateMessagesResponse messages. */ + public messages: google.cloud.dialogflow.v2beta1.IMessage[]; + + /** + * Creates a new BatchCreateMessagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateMessagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse): google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse; + + /** + * Encodes the specified BatchCreateMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * @param message BatchCreateMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * @param message BatchCreateMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateMessagesResponse + * @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.v2beta1.BatchCreateMessagesResponse; + + /** + * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateMessagesResponse + * @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.v2beta1.BatchCreateMessagesResponse; + + /** + * Verifies a BatchCreateMessagesResponse 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 BatchCreateMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateMessagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse; + + /** + * Creates a plain object from a BatchCreateMessagesResponse message. Also converts values to other types if specified. + * @param message BatchCreateMessagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateMessagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMessagesRequest. */ + interface IListMessagesRequest { + + /** ListMessagesRequest parent */ + parent?: (string|null); + + /** ListMessagesRequest filter */ + filter?: (string|null); + + /** ListMessagesRequest pageSize */ + pageSize?: (number|null); + + /** ListMessagesRequest pageToken */ + pageToken?: (string|null); } - /** Properties of a Conversation. */ - interface IConversation { + /** Represents a ListMessagesRequest. */ + class ListMessagesRequest implements IListMessagesRequest { + + /** + * Constructs a new ListMessagesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListMessagesRequest); + + /** ListMessagesRequest parent. */ + public parent: string; + + /** ListMessagesRequest filter. */ + public filter: string; + + /** ListMessagesRequest pageSize. */ + public pageSize: number; + + /** ListMessagesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListMessagesRequest): google.cloud.dialogflow.v2beta1.ListMessagesRequest; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. + * @param message ListMessagesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesRequest + * @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.v2beta1.ListMessagesRequest; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesRequest + * @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.v2beta1.ListMessagesRequest; + + /** + * Verifies a ListMessagesRequest 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 ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListMessagesRequest; + + /** + * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * @param message ListMessagesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ListMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListMessagesResponse. */ + interface IListMessagesResponse { + + /** ListMessagesResponse messages */ + messages?: (google.cloud.dialogflow.v2beta1.IMessage[]|null); + + /** ListMessagesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMessagesResponse. */ + class ListMessagesResponse implements IListMessagesResponse { + + /** + * Constructs a new ListMessagesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListMessagesResponse); + + /** ListMessagesResponse messages. */ + public messages: google.cloud.dialogflow.v2beta1.IMessage[]; + + /** ListMessagesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessagesResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListMessagesResponse): google.cloud.dialogflow.v2beta1.ListMessagesResponse; + + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. + * @param message ListMessagesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessagesResponse + * @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.v2beta1.ListMessagesResponse; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessagesResponse + * @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.v2beta1.ListMessagesResponse; + + /** + * Verifies a ListMessagesResponse 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 ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessagesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListMessagesResponse; + + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @param message ListMessagesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ListMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessagesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConversationEvent. */ + interface IConversationEvent { + + /** ConversationEvent conversation */ + conversation?: (string|null); + + /** ConversationEvent type */ + type?: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null); + + /** ConversationEvent errorStatus */ + errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload */ + newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + } + + /** Represents a ConversationEvent. */ + class ConversationEvent implements IConversationEvent { + + /** + * Constructs a new ConversationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent); + + /** ConversationEvent conversation. */ + public conversation: string; + + /** ConversationEvent type. */ + public type: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type); + + /** ConversationEvent errorStatus. */ + public errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload. */ + public newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + + /** ConversationEvent payload. */ + public payload?: "newMessagePayload"; + + /** + * Creates a new ConversationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationEvent instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent): google.cloud.dialogflow.v2beta1.ConversationEvent; + + /** + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationEvent + * @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.v2beta1.ConversationEvent; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationEvent + * @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.v2beta1.ConversationEvent; + + /** + * Verifies a ConversationEvent 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 ConversationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationEvent; + + /** + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * @param message ConversationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ConversationEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CONVERSATION_STARTED = 1, + CONVERSATION_FINISHED = 2, + HUMAN_INTERVENTION_NEEDED = 3, + NEW_MESSAGE = 5, + UNRECOVERABLE_ERROR = 4 + } + } + + /** Represents a ConversationProfiles */ + class ConversationProfiles extends $protobuf.rpc.Service { + + /** + * Constructs a new ConversationProfiles 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 ConversationProfiles 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): ConversationProfiles; + + /** + * Calls ListConversationProfiles. + * @param request ListConversationProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationProfilesResponse + */ + public listConversationProfiles(request: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfilesCallback): void; + + /** + * Calls ListConversationProfiles. + * @param request ListConversationProfilesRequest message or plain object + * @returns Promise + */ + public listConversationProfiles(request: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest): Promise; + + /** + * Calls GetConversationProfile. + * @param request GetConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile + */ + public getConversationProfile(request: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfileCallback): void; + + /** + * Calls GetConversationProfile. + * @param request GetConversationProfileRequest message or plain object + * @returns Promise + */ + public getConversationProfile(request: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest): Promise; + + /** + * Calls CreateConversationProfile. + * @param request CreateConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile + */ + public createConversationProfile(request: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfileCallback): void; + + /** + * Calls CreateConversationProfile. + * @param request CreateConversationProfileRequest message or plain object + * @returns Promise + */ + public createConversationProfile(request: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest): Promise; + + /** + * Calls UpdateConversationProfile. + * @param request UpdateConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile + */ + public updateConversationProfile(request: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfileCallback): void; + + /** + * Calls UpdateConversationProfile. + * @param request UpdateConversationProfileRequest message or plain object + * @returns Promise + */ + public updateConversationProfile(request: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest): Promise; + + /** + * Calls DeleteConversationProfile. + * @param request DeleteConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversationProfile(request: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfileCallback): void; + + /** + * Calls DeleteConversationProfile. + * @param request DeleteConversationProfileRequest message or plain object + * @returns Promise + */ + public deleteConversationProfile(request: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest): Promise; + + /** + * Calls SetSuggestionFeatureConfig. + * @param request SetSuggestionFeatureConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.SetSuggestionFeatureConfigCallback): void; + + /** + * Calls SetSuggestionFeatureConfig. + * @param request SetSuggestionFeatureConfigRequest message or plain object + * @returns Promise + */ + public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest): Promise; + + /** + * Calls ClearSuggestionFeatureConfig. + * @param request ClearSuggestionFeatureConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.ClearSuggestionFeatureConfigCallback): void; + + /** + * Calls ClearSuggestionFeatureConfig. + * @param request ClearSuggestionFeatureConfigRequest message or plain object + * @returns Promise + */ + public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest): Promise; + } + + namespace ConversationProfiles { + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#listConversationProfiles}. + * @param error Error, if any + * @param [response] ListConversationProfilesResponse + */ + type ListConversationProfilesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#getConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type GetConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#createConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type CreateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#updateConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type UpdateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#deleteConversationProfile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversationProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#setSuggestionFeatureConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type SetSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#clearSuggestionFeatureConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type ClearSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ConversationProfile. */ + interface IConversationProfile { + + /** ConversationProfile name */ + name?: (string|null); + + /** ConversationProfile displayName */ + displayName?: (string|null); + + /** ConversationProfile createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile automatedAgentConfig */ + automatedAgentConfig?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null); + + /** ConversationProfile humanAgentAssistantConfig */ + humanAgentAssistantConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null); + + /** ConversationProfile humanAgentHandoffConfig */ + humanAgentHandoffConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null); + + /** ConversationProfile notificationConfig */ + notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** ConversationProfile loggingConfig */ + loggingConfig?: (google.cloud.dialogflow.v2beta1.ILoggingConfig|null); + + /** ConversationProfile newMessageEventNotificationConfig */ + newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** ConversationProfile sttConfig */ + sttConfig?: (google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null); + + /** ConversationProfile languageCode */ + languageCode?: (string|null); + + /** ConversationProfile timeZone */ + timeZone?: (string|null); + + /** ConversationProfile securitySettings */ + securitySettings?: (string|null); + } + + /** Represents a ConversationProfile. */ + class ConversationProfile implements IConversationProfile { + + /** + * Constructs a new ConversationProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationProfile); + + /** ConversationProfile name. */ + public name: string; + + /** ConversationProfile displayName. */ + public displayName: string; + + /** ConversationProfile createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile automatedAgentConfig. */ + public automatedAgentConfig?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null); + + /** ConversationProfile humanAgentAssistantConfig. */ + public humanAgentAssistantConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null); + + /** ConversationProfile humanAgentHandoffConfig. */ + public humanAgentHandoffConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null); + + /** ConversationProfile notificationConfig. */ + public notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** ConversationProfile loggingConfig. */ + public loggingConfig?: (google.cloud.dialogflow.v2beta1.ILoggingConfig|null); + + /** ConversationProfile newMessageEventNotificationConfig. */ + public newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** ConversationProfile sttConfig. */ + public sttConfig?: (google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null); + + /** ConversationProfile languageCode. */ + public languageCode: string; + + /** ConversationProfile timeZone. */ + public timeZone: string; + + /** ConversationProfile securitySettings. */ + public securitySettings: string; + + /** + * Creates a new ConversationProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationProfile instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationProfile): google.cloud.dialogflow.v2beta1.ConversationProfile; + + /** + * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. + * @param message ConversationProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. + * @param message ConversationProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationProfile + * @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.v2beta1.ConversationProfile; + + /** + * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationProfile + * @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.v2beta1.ConversationProfile; + + /** + * Verifies a ConversationProfile 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 ConversationProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationProfile; + + /** + * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. + * @param message ConversationProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AutomatedAgentConfig. */ + interface IAutomatedAgentConfig { + + /** AutomatedAgentConfig agent */ + agent?: (string|null); + } + + /** Represents an AutomatedAgentConfig. */ + class AutomatedAgentConfig implements IAutomatedAgentConfig { + + /** + * Constructs a new AutomatedAgentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig); + + /** AutomatedAgentConfig agent. */ + public agent: string; + + /** + * Creates a new AutomatedAgentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomatedAgentConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig): google.cloud.dialogflow.v2beta1.AutomatedAgentConfig; + + /** + * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. + * @param message AutomatedAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. + * @param message AutomatedAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomatedAgentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomatedAgentConfig + * @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.v2beta1.AutomatedAgentConfig; + + /** + * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomatedAgentConfig + * @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.v2beta1.AutomatedAgentConfig; + + /** + * Verifies an AutomatedAgentConfig 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 AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomatedAgentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AutomatedAgentConfig; + + /** + * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. + * @param message AutomatedAgentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.AutomatedAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomatedAgentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HumanAgentAssistantConfig. */ + interface IHumanAgentAssistantConfig { + + /** HumanAgentAssistantConfig notificationConfig */ + notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** HumanAgentAssistantConfig humanAgentSuggestionConfig */ + humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig endUserSuggestionConfig */ + endUserSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig messageAnalysisConfig */ + messageAnalysisConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + } + + /** Represents a HumanAgentAssistantConfig. */ + class HumanAgentAssistantConfig implements IHumanAgentAssistantConfig { + + /** + * Constructs a new HumanAgentAssistantConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig); + + /** HumanAgentAssistantConfig notificationConfig. */ + public notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + + /** HumanAgentAssistantConfig humanAgentSuggestionConfig. */ + public humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig endUserSuggestionConfig. */ + public endUserSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig messageAnalysisConfig. */ + public messageAnalysisConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + + /** + * Creates a new HumanAgentAssistantConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns HumanAgentAssistantConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig; + + /** + * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. + * @param message HumanAgentAssistantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. + * @param message HumanAgentAssistantConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HumanAgentAssistantConfig + * @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.v2beta1.HumanAgentAssistantConfig; + + /** + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HumanAgentAssistantConfig + * @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.v2beta1.HumanAgentAssistantConfig; + + /** + * Verifies a HumanAgentAssistantConfig 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 HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HumanAgentAssistantConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig; + + /** + * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. + * @param message HumanAgentAssistantConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HumanAgentAssistantConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace HumanAgentAssistantConfig { + + /** Properties of a SuggestionTriggerSettings. */ + interface ISuggestionTriggerSettings { + + /** SuggestionTriggerSettings noSmallTalk */ + noSmallTalk?: (boolean|null); + + /** SuggestionTriggerSettings onlyEndUser */ + onlyEndUser?: (boolean|null); + } + + /** Represents a SuggestionTriggerSettings. */ + class SuggestionTriggerSettings implements ISuggestionTriggerSettings { + + /** + * Constructs a new SuggestionTriggerSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings); + + /** SuggestionTriggerSettings noSmallTalk. */ + public noSmallTalk: boolean; + + /** SuggestionTriggerSettings onlyEndUser. */ + public onlyEndUser: boolean; + + /** + * Creates a new SuggestionTriggerSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionTriggerSettings instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + + /** + * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @param message SuggestionTriggerSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @param message SuggestionTriggerSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionTriggerSettings + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionTriggerSettings + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + + /** + * Verifies a SuggestionTriggerSettings 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 SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionTriggerSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + + /** + * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. + * @param message SuggestionTriggerSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionTriggerSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SuggestionFeatureConfig. */ + interface ISuggestionFeatureConfig { + + /** SuggestionFeatureConfig suggestionFeature */ + suggestionFeature?: (google.cloud.dialogflow.v2beta1.ISuggestionFeature|null); + + /** SuggestionFeatureConfig enableEventBasedSuggestion */ + enableEventBasedSuggestion?: (boolean|null); + + /** SuggestionFeatureConfig suggestionTriggerSettings */ + suggestionTriggerSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + + /** SuggestionFeatureConfig queryConfig */ + queryConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + + /** SuggestionFeatureConfig conversationModelConfig */ + conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + + /** SuggestionFeatureConfig conversationProcessConfig */ + conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); + } + + /** Represents a SuggestionFeatureConfig. */ + class SuggestionFeatureConfig implements ISuggestionFeatureConfig { + + /** + * Constructs a new SuggestionFeatureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig); + + /** SuggestionFeatureConfig suggestionFeature. */ + public suggestionFeature?: (google.cloud.dialogflow.v2beta1.ISuggestionFeature|null); + + /** SuggestionFeatureConfig enableEventBasedSuggestion. */ + public enableEventBasedSuggestion: boolean; + + /** SuggestionFeatureConfig suggestionTriggerSettings. */ + public suggestionTriggerSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + + /** SuggestionFeatureConfig queryConfig. */ + public queryConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + + /** SuggestionFeatureConfig conversationModelConfig. */ + public conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + + /** SuggestionFeatureConfig conversationProcessConfig. */ + public conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); + + /** + * Creates a new SuggestionFeatureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionFeatureConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + + /** + * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @param message SuggestionFeatureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @param message SuggestionFeatureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionFeatureConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionFeatureConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + + /** + * Verifies a SuggestionFeatureConfig 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 SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionFeatureConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + + /** + * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. + * @param message SuggestionFeatureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionFeatureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SuggestionConfig. */ + interface ISuggestionConfig { + + /** SuggestionConfig featureConfigs */ + featureConfigs?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]|null); + + /** SuggestionConfig groupSuggestionResponses */ + groupSuggestionResponses?: (boolean|null); + } + + /** Represents a SuggestionConfig. */ + class SuggestionConfig implements ISuggestionConfig { + + /** + * Constructs a new SuggestionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig); + + /** SuggestionConfig featureConfigs. */ + public featureConfigs: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]; + + /** SuggestionConfig groupSuggestionResponses. */ + public groupSuggestionResponses: boolean; + + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + + /** + * Verifies a SuggestionConfig 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 SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @param message SuggestionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SuggestionQueryConfig. */ + interface ISuggestionQueryConfig { + + /** SuggestionQueryConfig knowledgeBaseQuerySource */ + knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); + + /** SuggestionQueryConfig documentQuerySource */ + documentQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); + + /** SuggestionQueryConfig dialogflowQuerySource */ + dialogflowQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); + + /** SuggestionQueryConfig maxResults */ + maxResults?: (number|null); + + /** SuggestionQueryConfig confidenceThreshold */ + confidenceThreshold?: (number|null); + + /** SuggestionQueryConfig contextFilterSettings */ + contextFilterSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + } + + /** Represents a SuggestionQueryConfig. */ + class SuggestionQueryConfig implements ISuggestionQueryConfig { + + /** + * Constructs a new SuggestionQueryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig); + + /** SuggestionQueryConfig knowledgeBaseQuerySource. */ + public knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); + + /** SuggestionQueryConfig documentQuerySource. */ + public documentQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); + + /** SuggestionQueryConfig dialogflowQuerySource. */ + public dialogflowQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); + + /** SuggestionQueryConfig maxResults. */ + public maxResults: number; + + /** SuggestionQueryConfig confidenceThreshold. */ + public confidenceThreshold: number; + + /** SuggestionQueryConfig contextFilterSettings. */ + public contextFilterSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + + /** SuggestionQueryConfig querySource. */ + public querySource?: ("knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"); + + /** + * Creates a new SuggestionQueryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionQueryConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + + /** + * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @param message SuggestionQueryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @param message SuggestionQueryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionQueryConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionQueryConfig + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + + /** + * Verifies a SuggestionQueryConfig 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 SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionQueryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + + /** + * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. + * @param message SuggestionQueryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionQueryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SuggestionQueryConfig { + + /** Properties of a KnowledgeBaseQuerySource. */ + interface IKnowledgeBaseQuerySource { + + /** KnowledgeBaseQuerySource knowledgeBases */ + knowledgeBases?: (string[]|null); + } + + /** Represents a KnowledgeBaseQuerySource. */ + class KnowledgeBaseQuerySource implements IKnowledgeBaseQuerySource { + + /** + * Constructs a new KnowledgeBaseQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource); + + /** KnowledgeBaseQuerySource knowledgeBases. */ + public knowledgeBases: string[]; + + /** + * Creates a new KnowledgeBaseQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns KnowledgeBaseQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + + /** + * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @param message KnowledgeBaseQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @param message KnowledgeBaseQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KnowledgeBaseQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KnowledgeBaseQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + + /** + * Verifies a KnowledgeBaseQuerySource 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 KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KnowledgeBaseQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + + /** + * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. + * @param message KnowledgeBaseQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KnowledgeBaseQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DocumentQuerySource. */ + interface IDocumentQuerySource { + + /** DocumentQuerySource documents */ + documents?: (string[]|null); + } + + /** Represents a DocumentQuerySource. */ + class DocumentQuerySource implements IDocumentQuerySource { + + /** + * Constructs a new DocumentQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource); + + /** DocumentQuerySource documents. */ + public documents: string[]; + + /** + * Creates a new DocumentQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + + /** + * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @param message DocumentQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @param message DocumentQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + + /** + * Verifies a DocumentQuerySource 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 DocumentQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + + /** + * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. + * @param message DocumentQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DialogflowQuerySource. */ + interface IDialogflowQuerySource { + + /** DialogflowQuerySource agent */ + agent?: (string|null); + } + + /** Represents a DialogflowQuerySource. */ + class DialogflowQuerySource implements IDialogflowQuerySource { + + /** + * Constructs a new DialogflowQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource); + + /** DialogflowQuerySource agent. */ + public agent: string; + + /** + * Creates a new DialogflowQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + + /** + * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @param message DialogflowQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @param message DialogflowQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowQuerySource + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + + /** + * Verifies a DialogflowQuerySource 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 DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + + /** + * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. + * @param message DialogflowQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContextFilterSettings. */ + interface IContextFilterSettings { + + /** ContextFilterSettings dropHandoffMessages */ + dropHandoffMessages?: (boolean|null); + + /** ContextFilterSettings dropVirtualAgentMessages */ + dropVirtualAgentMessages?: (boolean|null); + + /** ContextFilterSettings dropIvrMessages */ + dropIvrMessages?: (boolean|null); + } + + /** Represents a ContextFilterSettings. */ + class ContextFilterSettings implements IContextFilterSettings { + + /** + * Constructs a new ContextFilterSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings); + + /** ContextFilterSettings dropHandoffMessages. */ + public dropHandoffMessages: boolean; + + /** ContextFilterSettings dropVirtualAgentMessages. */ + public dropVirtualAgentMessages: boolean; + + /** ContextFilterSettings dropIvrMessages. */ + public dropIvrMessages: boolean; + + /** + * Creates a new ContextFilterSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextFilterSettings instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + + /** + * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @param message ContextFilterSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @param message ContextFilterSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContextFilterSettings + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContextFilterSettings + * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + + /** + * Verifies a ContextFilterSettings 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 ContextFilterSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextFilterSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + + /** + * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. + * @param message ContextFilterSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContextFilterSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ConversationModelConfig. */ + interface IConversationModelConfig { + + /** ConversationModelConfig model */ + model?: (string|null); + } + + /** Represents a ConversationModelConfig. */ + class ConversationModelConfig implements IConversationModelConfig { + + /** + * Constructs a new ConversationModelConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig); + + /** ConversationModelConfig model. */ + public model: string; + + /** + * Creates a new ConversationModelConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationModelConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + + /** + * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @param message ConversationModelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @param message ConversationModelConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationModelConfig + * @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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationModelConfig + * @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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + + /** + * Verifies a ConversationModelConfig 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 ConversationModelConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationModelConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + + /** + * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. + * @param message ConversationModelConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationModelConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Conversation name */ - name?: (string|null); + /** Properties of a ConversationProcessConfig. */ + interface IConversationProcessConfig { - /** Conversation lifecycleState */ - lifecycleState?: (google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|null); + /** ConversationProcessConfig recentSentencesCount */ + recentSentencesCount?: (number|null); + } - /** Conversation conversationProfile */ - conversationProfile?: (string|null); + /** Represents a ConversationProcessConfig. */ + class ConversationProcessConfig implements IConversationProcessConfig { - /** Conversation phoneNumber */ - phoneNumber?: (google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null); + /** + * Constructs a new ConversationProcessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig); - /** Conversation conversationStage */ - conversationStage?: (google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|null); + /** ConversationProcessConfig recentSentencesCount. */ + public recentSentencesCount: number; - /** Conversation startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new ConversationProcessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationProcessConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; - /** Conversation endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } + /** + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Conversation. */ - class Conversation implements IConversation { + /** + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Conversation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IConversation); + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationProcessConfig + * @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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; - /** Conversation name. */ - public name: string; + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationProcessConfig + * @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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; - /** Conversation lifecycleState. */ - public lifecycleState: (google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.LifecycleState); + /** + * Verifies a ConversationProcessConfig 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); - /** Conversation conversationProfile. */ - public conversationProfile: string; + /** + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationProcessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; - /** Conversation phoneNumber. */ - public phoneNumber?: (google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null); + /** + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @param message ConversationProcessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Conversation conversationStage. */ - public conversationStage: (google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|keyof typeof google.cloud.dialogflow.v2beta1.Conversation.ConversationStage); + /** + * Converts this ConversationProcessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Conversation startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Properties of a MessageAnalysisConfig. */ + interface IMessageAnalysisConfig { - /** Conversation endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** MessageAnalysisConfig enableEntityExtraction */ + enableEntityExtraction?: (boolean|null); - /** - * Creates a new Conversation instance using the specified properties. - * @param [properties] Properties to set - * @returns Conversation instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IConversation): google.cloud.dialogflow.v2beta1.Conversation; + /** MessageAnalysisConfig enableSentimentAnalysis */ + enableSentimentAnalysis?: (boolean|null); + } - /** - * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a MessageAnalysisConfig. */ + class MessageAnalysisConfig implements IMessageAnalysisConfig { - /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new MessageAnalysisConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig); - /** - * Decodes a Conversation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Conversation - * @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.v2beta1.Conversation; + /** MessageAnalysisConfig enableEntityExtraction. */ + public enableEntityExtraction: boolean; - /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Conversation - * @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.v2beta1.Conversation; + /** MessageAnalysisConfig enableSentimentAnalysis. */ + public enableSentimentAnalysis: boolean; - /** - * Verifies a Conversation 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 MessageAnalysisConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageAnalysisConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Conversation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Conversation; + /** + * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @param message MessageAnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. - * @param message Conversation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @param message MessageAnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Conversation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageAnalysisConfig + * @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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; - namespace Conversation { + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageAnalysisConfig + * @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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** LifecycleState enum. */ - enum LifecycleState { - LIFECYCLE_STATE_UNSPECIFIED = 0, - IN_PROGRESS = 1, - COMPLETED = 2 - } + /** + * Verifies a MessageAnalysisConfig 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 MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageAnalysisConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** ConversationStage enum. */ - enum ConversationStage { - CONVERSATION_STAGE_UNSPECIFIED = 0, - VIRTUAL_AGENT_STAGE = 1, - HUMAN_ASSIST_STAGE = 2 + /** + * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. + * @param message MessageAnalysisConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageAnalysisConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } } - /** Properties of a ConversationPhoneNumber. */ - interface IConversationPhoneNumber { + /** Properties of a HumanAgentHandoffConfig. */ + interface IHumanAgentHandoffConfig { - /** ConversationPhoneNumber phoneNumber */ - phoneNumber?: (string|null); + /** HumanAgentHandoffConfig livePersonConfig */ + livePersonConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null); + + /** HumanAgentHandoffConfig salesforceLiveAgentConfig */ + salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); } - /** Represents a ConversationPhoneNumber. */ - class ConversationPhoneNumber implements IConversationPhoneNumber { + /** Represents a HumanAgentHandoffConfig. */ + class HumanAgentHandoffConfig implements IHumanAgentHandoffConfig { /** - * Constructs a new ConversationPhoneNumber. + * Constructs a new HumanAgentHandoffConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber); + constructor(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig); - /** ConversationPhoneNumber phoneNumber. */ - public phoneNumber: string; + /** HumanAgentHandoffConfig livePersonConfig. */ + public livePersonConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null); + + /** HumanAgentHandoffConfig salesforceLiveAgentConfig. */ + public salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + + /** HumanAgentHandoffConfig agentService. */ + public agentService?: ("livePersonConfig"|"salesforceLiveAgentConfig"); /** - * Creates a new ConversationPhoneNumber instance using the specified properties. + * Creates a new HumanAgentHandoffConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationPhoneNumber instance + * @returns HumanAgentHandoffConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; + public static create(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; /** - * Encodes the specified ConversationPhoneNumber message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. - * @param message ConversationPhoneNumber message or plain object to encode + * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. + * @param message HumanAgentHandoffConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationPhoneNumber message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. - * @param message ConversationPhoneNumber message or plain object to encode + * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. + * @param message HumanAgentHandoffConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationPhoneNumber, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationPhoneNumber message from the specified reader or buffer. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationPhoneNumber + * @returns HumanAgentHandoffConfig * @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.v2beta1.ConversationPhoneNumber; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; /** - * Decodes a ConversationPhoneNumber message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationPhoneNumber + * @returns HumanAgentHandoffConfig * @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.v2beta1.ConversationPhoneNumber; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; /** - * Verifies a ConversationPhoneNumber message. + * Verifies a HumanAgentHandoffConfig 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 ConversationPhoneNumber message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationPhoneNumber + * @returns HumanAgentHandoffConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationPhoneNumber; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; /** - * Creates a plain object from a ConversationPhoneNumber message. Also converts values to other types if specified. - * @param message ConversationPhoneNumber + * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. + * @param message HumanAgentHandoffConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationPhoneNumber, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationPhoneNumber to JSON. + * Converts this HumanAgentHandoffConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateConversationRequest. */ - interface ICreateConversationRequest { - - /** CreateConversationRequest parent */ - parent?: (string|null); - - /** CreateConversationRequest conversation */ - conversation?: (google.cloud.dialogflow.v2beta1.IConversation|null); - - /** CreateConversationRequest conversationId */ - conversationId?: (string|null); - } + namespace HumanAgentHandoffConfig { - /** Represents a CreateConversationRequest. */ - class CreateConversationRequest implements ICreateConversationRequest { + /** Properties of a LivePersonConfig. */ + interface ILivePersonConfig { - /** - * Constructs a new CreateConversationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationRequest); + /** LivePersonConfig accountNumber */ + accountNumber?: (string|null); + } - /** CreateConversationRequest parent. */ - public parent: string; + /** Represents a LivePersonConfig. */ + class LivePersonConfig implements ILivePersonConfig { - /** CreateConversationRequest conversation. */ - public conversation?: (google.cloud.dialogflow.v2beta1.IConversation|null); + /** + * Constructs a new LivePersonConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig); - /** CreateConversationRequest conversationId. */ - public conversationId: string; + /** LivePersonConfig accountNumber. */ + public accountNumber: string; - /** - * Creates a new CreateConversationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConversationRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationRequest): google.cloud.dialogflow.v2beta1.CreateConversationRequest; + /** + * Creates a new LivePersonConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LivePersonConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. - * @param message CreateConversationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @param message LivePersonConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. - * @param message CreateConversationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @param message LivePersonConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CreateConversationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConversationRequest - * @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.v2beta1.CreateConversationRequest; + /** + * Decodes a LivePersonConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LivePersonConfig + * @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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConversationRequest - * @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.v2beta1.CreateConversationRequest; + /** + * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LivePersonConfig + * @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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Verifies a CreateConversationRequest 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 LivePersonConfig 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 CreateConversationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConversationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateConversationRequest; + /** + * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LivePersonConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. - * @param message CreateConversationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. + * @param message LivePersonConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this CreateConversationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this LivePersonConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Properties of a ListConversationsRequest. */ - interface IListConversationsRequest { + /** Properties of a SalesforceLiveAgentConfig. */ + interface ISalesforceLiveAgentConfig { - /** ListConversationsRequest parent */ - parent?: (string|null); + /** SalesforceLiveAgentConfig organizationId */ + organizationId?: (string|null); - /** ListConversationsRequest pageSize */ - pageSize?: (number|null); + /** SalesforceLiveAgentConfig deploymentId */ + deploymentId?: (string|null); - /** ListConversationsRequest pageToken */ - pageToken?: (string|null); + /** SalesforceLiveAgentConfig buttonId */ + buttonId?: (string|null); - /** ListConversationsRequest filter */ - filter?: (string|null); - } + /** SalesforceLiveAgentConfig endpointDomain */ + endpointDomain?: (string|null); + } - /** Represents a ListConversationsRequest. */ - class ListConversationsRequest implements IListConversationsRequest { + /** Represents a SalesforceLiveAgentConfig. */ + class SalesforceLiveAgentConfig implements ISalesforceLiveAgentConfig { - /** - * Constructs a new ListConversationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationsRequest); + /** + * Constructs a new SalesforceLiveAgentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig); - /** ListConversationsRequest parent. */ - public parent: string; + /** SalesforceLiveAgentConfig organizationId. */ + public organizationId: string; - /** ListConversationsRequest pageSize. */ - public pageSize: number; + /** SalesforceLiveAgentConfig deploymentId. */ + public deploymentId: string; - /** ListConversationsRequest pageToken. */ - public pageToken: string; + /** SalesforceLiveAgentConfig buttonId. */ + public buttonId: string; - /** ListConversationsRequest filter. */ - public filter: string; + /** SalesforceLiveAgentConfig endpointDomain. */ + public endpointDomain: string; - /** - * Creates a new ListConversationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConversationsRequest instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationsRequest): google.cloud.dialogflow.v2beta1.ListConversationsRequest; + /** + * Creates a new SalesforceLiveAgentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SalesforceLiveAgentConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - /** - * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. - * @param message ListConversationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @param message SalesforceLiveAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. - * @param message ListConversationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @param message SalesforceLiveAgentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListConversationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConversationsRequest - * @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.v2beta1.ListConversationsRequest; + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SalesforceLiveAgentConfig + * @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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - /** - * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConversationsRequest - * @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.v2beta1.ListConversationsRequest; + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SalesforceLiveAgentConfig + * @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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - /** - * Verifies a ListConversationsRequest 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 SalesforceLiveAgentConfig 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 ListConversationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConversationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationsRequest; + /** + * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SalesforceLiveAgentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - /** - * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. - * @param message ListConversationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. + * @param message SalesforceLiveAgentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListConversationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this SalesforceLiveAgentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Properties of a ListConversationsResponse. */ - interface IListConversationsResponse { + /** Properties of a NotificationConfig. */ + interface INotificationConfig { - /** ListConversationsResponse conversations */ - conversations?: (google.cloud.dialogflow.v2beta1.IConversation[]|null); + /** NotificationConfig topic */ + topic?: (string|null); - /** ListConversationsResponse nextPageToken */ - nextPageToken?: (string|null); + /** NotificationConfig messageFormat */ + messageFormat?: (google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|null); } - /** Represents a ListConversationsResponse. */ - class ListConversationsResponse implements IListConversationsResponse { + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { /** - * Constructs a new ListConversationsResponse. + * Constructs a new NotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.INotificationConfig); - /** ListConversationsResponse conversations. */ - public conversations: google.cloud.dialogflow.v2beta1.IConversation[]; + /** NotificationConfig topic. */ + public topic: string; - /** ListConversationsResponse nextPageToken. */ - public nextPageToken: string; + /** NotificationConfig messageFormat. */ + public messageFormat: (google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat); /** - * Creates a new ListConversationsResponse instance using the specified properties. + * Creates a new NotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationsResponse instance + * @returns NotificationConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationsResponse): google.cloud.dialogflow.v2beta1.ListConversationsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.INotificationConfig): google.cloud.dialogflow.v2beta1.NotificationConfig; /** - * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. - * @param message ListConversationsResponse message or plain object to encode + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. - * @param message ListConversationsResponse message or plain object to encode + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationsResponse message from the specified reader or buffer. + * Decodes a NotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationsResponse + * @returns NotificationConfig * @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.v2beta1.ListConversationsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.NotificationConfig; /** - * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationsResponse + * @returns NotificationConfig * @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.v2beta1.ListConversationsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.NotificationConfig; /** - * Verifies a ListConversationsResponse message. + * Verifies a NotificationConfig 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 ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationsResponse + * @returns NotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.NotificationConfig; /** - * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. - * @param message ListConversationsResponse + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationsResponse to JSON. + * Converts this NotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetConversationRequest. */ - interface IGetConversationRequest { + namespace NotificationConfig { + + /** MessageFormat enum. */ + enum MessageFormat { + MESSAGE_FORMAT_UNSPECIFIED = 0, + PROTO = 1, + JSON = 2 + } + } + + /** Properties of a LoggingConfig. */ + interface ILoggingConfig { - /** GetConversationRequest name */ - name?: (string|null); + /** LoggingConfig enableStackdriverLogging */ + enableStackdriverLogging?: (boolean|null); } - /** Represents a GetConversationRequest. */ - class GetConversationRequest implements IGetConversationRequest { + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { /** - * Constructs a new GetConversationRequest. + * Constructs a new LoggingConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetConversationRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ILoggingConfig); - /** GetConversationRequest name. */ - public name: string; + /** LoggingConfig enableStackdriverLogging. */ + public enableStackdriverLogging: boolean; /** - * Creates a new GetConversationRequest instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetConversationRequest instance + * @returns LoggingConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetConversationRequest): google.cloud.dialogflow.v2beta1.GetConversationRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ILoggingConfig): google.cloud.dialogflow.v2beta1.LoggingConfig; /** - * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. - * @param message GetConversationRequest message or plain object to encode + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. - * @param message GetConversationRequest message or plain object to encode + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConversationRequest message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConversationRequest + * @returns LoggingConfig * @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.v2beta1.GetConversationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.LoggingConfig; /** - * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConversationRequest + * @returns LoggingConfig * @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.v2beta1.GetConversationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.LoggingConfig; /** - * Verifies a GetConversationRequest message. + * Verifies a LoggingConfig 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 GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConversationRequest + * @returns LoggingConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetConversationRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.LoggingConfig; /** - * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. - * @param message GetConversationRequest + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @param message LoggingConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConversationRequest to JSON. + * Converts this LoggingConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CompleteConversationRequest. */ - interface ICompleteConversationRequest { + /** Properties of a ListConversationProfilesRequest. */ + interface IListConversationProfilesRequest { - /** CompleteConversationRequest name */ - name?: (string|null); + /** ListConversationProfilesRequest parent */ + parent?: (string|null); + + /** ListConversationProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationProfilesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CompleteConversationRequest. */ - class CompleteConversationRequest implements ICompleteConversationRequest { + /** Represents a ListConversationProfilesRequest. */ + class ListConversationProfilesRequest implements IListConversationProfilesRequest { /** - * Constructs a new CompleteConversationRequest. + * Constructs a new ListConversationProfilesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest); - /** CompleteConversationRequest name. */ - public name: string; + /** ListConversationProfilesRequest parent. */ + public parent: string; + + /** ListConversationProfilesRequest pageSize. */ + public pageSize: number; + + /** ListConversationProfilesRequest pageToken. */ + public pageToken: string; /** - * Creates a new CompleteConversationRequest instance using the specified properties. + * Creates a new ListConversationProfilesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CompleteConversationRequest instance + * @returns ListConversationProfilesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; /** - * Encodes the specified CompleteConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. - * @param message CompleteConversationRequest message or plain object to encode + * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. + * @param message ListConversationProfilesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. - * @param message CompleteConversationRequest message or plain object to encode + * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. + * @param message ListConversationProfilesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICompleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompleteConversationRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompleteConversationRequest + * @returns ListConversationProfilesRequest * @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.v2beta1.CompleteConversationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; /** - * Decodes a CompleteConversationRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompleteConversationRequest + * @returns ListConversationProfilesRequest * @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.v2beta1.CompleteConversationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; /** - * Verifies a CompleteConversationRequest message. + * Verifies a ListConversationProfilesRequest 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 CompleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompleteConversationRequest + * @returns ListConversationProfilesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CompleteConversationRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; /** - * Creates a plain object from a CompleteConversationRequest message. Also converts values to other types if specified. - * @param message CompleteConversationRequest + * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. + * @param message ListConversationProfilesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CompleteConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompleteConversationRequest to JSON. + * Converts this ListConversationProfilesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateMessageRequest. */ - interface ICreateMessageRequest { + /** Properties of a ListConversationProfilesResponse. */ + interface IListConversationProfilesResponse { - /** CreateMessageRequest parent */ - parent?: (string|null); + /** ListConversationProfilesResponse conversationProfiles */ + conversationProfiles?: (google.cloud.dialogflow.v2beta1.IConversationProfile[]|null); - /** CreateMessageRequest message */ - message?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** ListConversationProfilesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a CreateMessageRequest. */ - class CreateMessageRequest implements ICreateMessageRequest { + /** Represents a ListConversationProfilesResponse. */ + class ListConversationProfilesResponse implements IListConversationProfilesResponse { /** - * Constructs a new CreateMessageRequest. + * Constructs a new ListConversationProfilesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateMessageRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse); - /** CreateMessageRequest parent. */ - public parent: string; + /** ListConversationProfilesResponse conversationProfiles. */ + public conversationProfiles: google.cloud.dialogflow.v2beta1.IConversationProfile[]; - /** CreateMessageRequest message. */ - public message?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** ListConversationProfilesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new CreateMessageRequest instance using the specified properties. + * Creates a new ListConversationProfilesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMessageRequest instance + * @returns ListConversationProfilesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateMessageRequest): google.cloud.dialogflow.v2beta1.CreateMessageRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; /** - * Encodes the specified CreateMessageRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. - * @param message CreateMessageRequest message or plain object to encode + * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. + * @param message ListConversationProfilesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMessageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. - * @param message CreateMessageRequest message or plain object to encode + * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. + * @param message ListConversationProfilesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMessageRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMessageRequest + * @returns ListConversationProfilesResponse * @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.v2beta1.CreateMessageRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; /** - * Decodes a CreateMessageRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMessageRequest + * @returns ListConversationProfilesResponse * @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.v2beta1.CreateMessageRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; /** - * Verifies a CreateMessageRequest message. + * Verifies a ListConversationProfilesResponse 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 CreateMessageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMessageRequest + * @returns ListConversationProfilesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateMessageRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; /** - * Creates a plain object from a CreateMessageRequest message. Also converts values to other types if specified. - * @param message CreateMessageRequest + * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. + * @param message ListConversationProfilesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateMessageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMessageRequest to JSON. + * Converts this ListConversationProfilesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateMessagesRequest. */ - interface IBatchCreateMessagesRequest { - - /** BatchCreateMessagesRequest parent */ - parent?: (string|null); + /** Properties of a GetConversationProfileRequest. */ + interface IGetConversationProfileRequest { - /** BatchCreateMessagesRequest requests */ - requests?: (google.cloud.dialogflow.v2beta1.ICreateMessageRequest[]|null); + /** GetConversationProfileRequest name */ + name?: (string|null); } - /** Represents a BatchCreateMessagesRequest. */ - class BatchCreateMessagesRequest implements IBatchCreateMessagesRequest { + /** Represents a GetConversationProfileRequest. */ + class GetConversationProfileRequest implements IGetConversationProfileRequest { /** - * Constructs a new BatchCreateMessagesRequest. + * Constructs a new GetConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest); - - /** BatchCreateMessagesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest); - /** BatchCreateMessagesRequest requests. */ - public requests: google.cloud.dialogflow.v2beta1.ICreateMessageRequest[]; + /** GetConversationProfileRequest name. */ + public name: string; /** - * Creates a new BatchCreateMessagesRequest instance using the specified properties. + * Creates a new GetConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateMessagesRequest instance + * @returns GetConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest): google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; /** - * Encodes the specified BatchCreateMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. - * @param message BatchCreateMessagesRequest message or plain object to encode + * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. + * @param message GetConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. - * @param message BatchCreateMessagesRequest message or plain object to encode + * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. + * @param message GetConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateMessagesRequest + * @returns GetConversationProfileRequest * @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.v2beta1.BatchCreateMessagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; /** - * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateMessagesRequest + * @returns GetConversationProfileRequest * @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.v2beta1.BatchCreateMessagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; /** - * Verifies a BatchCreateMessagesRequest message. + * Verifies a GetConversationProfileRequest 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 BatchCreateMessagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateMessagesRequest + * @returns GetConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; /** - * Creates a plain object from a BatchCreateMessagesRequest message. Also converts values to other types if specified. - * @param message BatchCreateMessagesRequest + * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. + * @param message GetConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateMessagesRequest to JSON. + * Converts this GetConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BatchCreateMessagesResponse. */ - interface IBatchCreateMessagesResponse { + /** Properties of a CreateConversationProfileRequest. */ + interface ICreateConversationProfileRequest { - /** BatchCreateMessagesResponse messages */ - messages?: (google.cloud.dialogflow.v2beta1.IMessage[]|null); + /** CreateConversationProfileRequest parent */ + parent?: (string|null); + + /** CreateConversationProfileRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); } - /** Represents a BatchCreateMessagesResponse. */ - class BatchCreateMessagesResponse implements IBatchCreateMessagesResponse { + /** Represents a CreateConversationProfileRequest. */ + class CreateConversationProfileRequest implements ICreateConversationProfileRequest { /** - * Constructs a new BatchCreateMessagesResponse. + * Constructs a new CreateConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest); - /** BatchCreateMessagesResponse messages. */ - public messages: google.cloud.dialogflow.v2beta1.IMessage[]; + /** CreateConversationProfileRequest parent. */ + public parent: string; + + /** CreateConversationProfileRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); /** - * Creates a new BatchCreateMessagesResponse instance using the specified properties. + * Creates a new CreateConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BatchCreateMessagesResponse instance + * @returns CreateConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse): google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; /** - * Encodes the specified BatchCreateMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. - * @param message BatchCreateMessagesResponse message or plain object to encode + * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. + * @param message CreateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchCreateMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. - * @param message BatchCreateMessagesResponse message or plain object to encode + * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. + * @param message CreateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchCreateMessagesResponse + * @returns CreateConversationProfileRequest * @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.v2beta1.BatchCreateMessagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; /** - * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchCreateMessagesResponse + * @returns CreateConversationProfileRequest * @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.v2beta1.BatchCreateMessagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; /** - * Verifies a BatchCreateMessagesResponse message. + * Verifies a CreateConversationProfileRequest 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 BatchCreateMessagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchCreateMessagesResponse + * @returns CreateConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; /** - * Creates a plain object from a BatchCreateMessagesResponse message. Also converts values to other types if specified. - * @param message BatchCreateMessagesResponse + * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. + * @param message CreateConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchCreateMessagesResponse to JSON. + * Converts this CreateConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMessagesRequest. */ - interface IListMessagesRequest { - - /** ListMessagesRequest parent */ - parent?: (string|null); - - /** ListMessagesRequest filter */ - filter?: (string|null); + /** Properties of an UpdateConversationProfileRequest. */ + interface IUpdateConversationProfileRequest { - /** ListMessagesRequest pageSize */ - pageSize?: (number|null); + /** UpdateConversationProfileRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); - /** ListMessagesRequest pageToken */ - pageToken?: (string|null); + /** UpdateConversationProfileRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ListMessagesRequest. */ - class ListMessagesRequest implements IListMessagesRequest { + /** Represents an UpdateConversationProfileRequest. */ + class UpdateConversationProfileRequest implements IUpdateConversationProfileRequest { /** - * Constructs a new ListMessagesRequest. + * Constructs a new UpdateConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListMessagesRequest); - - /** ListMessagesRequest parent. */ - public parent: string; - - /** ListMessagesRequest filter. */ - public filter: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest); - /** ListMessagesRequest pageSize. */ - public pageSize: number; + /** UpdateConversationProfileRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); - /** ListMessagesRequest pageToken. */ - public pageToken: string; + /** UpdateConversationProfileRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ListMessagesRequest instance using the specified properties. + * Creates a new UpdateConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMessagesRequest instance + * @returns UpdateConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListMessagesRequest): google.cloud.dialogflow.v2beta1.ListMessagesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; /** - * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. - * @param message ListMessagesRequest message or plain object to encode + * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. + * @param message UpdateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. - * @param message ListMessagesRequest message or plain object to encode + * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. + * @param message UpdateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListMessagesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMessagesRequest + * @returns UpdateConversationProfileRequest * @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.v2beta1.ListMessagesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMessagesRequest + * @returns UpdateConversationProfileRequest * @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.v2beta1.ListMessagesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; /** - * Verifies a ListMessagesRequest message. + * Verifies an UpdateConversationProfileRequest 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 ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMessagesRequest + * @returns UpdateConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListMessagesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; /** - * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. - * @param message ListMessagesRequest + * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. + * @param message UpdateConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListMessagesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMessagesRequest to JSON. + * Converts this UpdateConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListMessagesResponse. */ - interface IListMessagesResponse { - - /** ListMessagesResponse messages */ - messages?: (google.cloud.dialogflow.v2beta1.IMessage[]|null); + /** Properties of a DeleteConversationProfileRequest. */ + interface IDeleteConversationProfileRequest { - /** ListMessagesResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteConversationProfileRequest name */ + name?: (string|null); } - /** Represents a ListMessagesResponse. */ - class ListMessagesResponse implements IListMessagesResponse { + /** Represents a DeleteConversationProfileRequest. */ + class DeleteConversationProfileRequest implements IDeleteConversationProfileRequest { /** - * Constructs a new ListMessagesResponse. + * Constructs a new DeleteConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListMessagesResponse); - - /** ListMessagesResponse messages. */ - public messages: google.cloud.dialogflow.v2beta1.IMessage[]; + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest); - /** ListMessagesResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteConversationProfileRequest name. */ + public name: string; /** - * Creates a new ListMessagesResponse instance using the specified properties. + * Creates a new DeleteConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListMessagesResponse instance + * @returns DeleteConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListMessagesResponse): google.cloud.dialogflow.v2beta1.ListMessagesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; /** - * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. - * @param message ListMessagesResponse message or plain object to encode + * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. + * @param message DeleteConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. - * @param message ListMessagesResponse message or plain object to encode + * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. + * @param message DeleteConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMessagesResponse + * @returns DeleteConversationProfileRequest * @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.v2beta1.ListMessagesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMessagesResponse + * @returns DeleteConversationProfileRequest * @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.v2beta1.ListMessagesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; /** - * Verifies a ListMessagesResponse message. + * Verifies a DeleteConversationProfileRequest 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 ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMessagesResponse + * @returns DeleteConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListMessagesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; /** - * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. - * @param message ListMessagesResponse + * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. + * @param message DeleteConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMessagesResponse to JSON. + * Converts this DeleteConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a ConversationProfiles */ - class ConversationProfiles extends $protobuf.rpc.Service { + /** Properties of a SetSuggestionFeatureConfigRequest. */ + interface ISetSuggestionFeatureConfigRequest { - /** - * Constructs a new ConversationProfiles 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); + /** SetSuggestionFeatureConfigRequest conversationProfile */ + conversationProfile?: (string|null); - /** - * Creates new ConversationProfiles 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): ConversationProfiles; + /** SetSuggestionFeatureConfigRequest participantRole */ + participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); - /** - * Calls ListConversationProfiles. - * @param request ListConversationProfilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationProfilesResponse - */ - public listConversationProfiles(request: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfilesCallback): void; + /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig */ + suggestionFeatureConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); + } - /** - * Calls ListConversationProfiles. - * @param request ListConversationProfilesRequest message or plain object - * @returns Promise - */ - public listConversationProfiles(request: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest): Promise; + /** Represents a SetSuggestionFeatureConfigRequest. */ + class SetSuggestionFeatureConfigRequest implements ISetSuggestionFeatureConfigRequest { /** - * Calls GetConversationProfile. - * @param request GetConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile + * Constructs a new SetSuggestionFeatureConfigRequest. + * @param [properties] Properties to set */ - public getConversationProfile(request: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfileCallback): void; + constructor(properties?: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest); - /** - * Calls GetConversationProfile. - * @param request GetConversationProfileRequest message or plain object - * @returns Promise - */ - public getConversationProfile(request: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest): Promise; + /** SetSuggestionFeatureConfigRequest conversationProfile. */ + public conversationProfile: string; - /** - * Calls CreateConversationProfile. - * @param request CreateConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile - */ - public createConversationProfile(request: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfileCallback): void; + /** SetSuggestionFeatureConfigRequest participantRole. */ + public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); - /** - * Calls CreateConversationProfile. - * @param request CreateConversationProfileRequest message or plain object - * @returns Promise - */ - public createConversationProfile(request: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest): Promise; + /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig. */ + public suggestionFeatureConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); /** - * Calls UpdateConversationProfile. - * @param request UpdateConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile + * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetSuggestionFeatureConfigRequest instance */ - public updateConversationProfile(request: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfileCallback): void; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest; /** - * Calls UpdateConversationProfile. - * @param request UpdateConversationProfileRequest message or plain object - * @returns Promise + * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message SetSuggestionFeatureConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateConversationProfile(request: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest): Promise; + public static encode(message: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteConversationProfile. - * @param request DeleteConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message SetSuggestionFeatureConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteConversationProfile(request: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, callback: google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfileCallback): void; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteConversationProfile. - * @param request DeleteConversationProfileRequest message or plain object - * @returns Promise + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetSuggestionFeatureConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteConversationProfile(request: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest): Promise; - } - - namespace ConversationProfiles { + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#listConversationProfiles}. - * @param error Error, if any - * @param [response] ListConversationProfilesResponse + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetSuggestionFeatureConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListConversationProfilesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#getConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Verifies a SetSuggestionFeatureConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#createConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Creates a SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetSuggestionFeatureConfigRequest */ - type CreateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#updateConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * @param message SetSuggestionFeatureConfigRequest + * @param [options] Conversion options + * @returns Plain object */ - type UpdateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ConversationProfile) => void; + public static toObject(message: google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#deleteConversationProfile}. - * @param error Error, if any - * @param [response] Empty + * Converts this SetSuggestionFeatureConfigRequest to JSON. + * @returns JSON object */ - type DeleteConversationProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public toJSON(): { [k: string]: any }; } - /** Properties of a ConversationProfile. */ - interface IConversationProfile { - - /** ConversationProfile name */ - name?: (string|null); - - /** ConversationProfile displayName */ - displayName?: (string|null); - - /** ConversationProfile createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile automatedAgentConfig */ - automatedAgentConfig?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null); - - /** ConversationProfile humanAgentAssistantConfig */ - humanAgentAssistantConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null); - - /** ConversationProfile humanAgentHandoffConfig */ - humanAgentHandoffConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null); - - /** ConversationProfile notificationConfig */ - notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); - - /** ConversationProfile loggingConfig */ - loggingConfig?: (google.cloud.dialogflow.v2beta1.ILoggingConfig|null); - - /** ConversationProfile newMessageEventNotificationConfig */ - newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); - - /** ConversationProfile sttConfig */ - sttConfig?: (google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null); + /** Properties of a ClearSuggestionFeatureConfigRequest. */ + interface IClearSuggestionFeatureConfigRequest { - /** ConversationProfile languageCode */ - languageCode?: (string|null); + /** ClearSuggestionFeatureConfigRequest conversationProfile */ + conversationProfile?: (string|null); - /** ConversationProfile timeZone */ - timeZone?: (string|null); + /** ClearSuggestionFeatureConfigRequest participantRole */ + participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); - /** ConversationProfile securitySettings */ - securitySettings?: (string|null); + /** ClearSuggestionFeatureConfigRequest suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null); } - /** Represents a ConversationProfile. */ - class ConversationProfile implements IConversationProfile { + /** Represents a ClearSuggestionFeatureConfigRequest. */ + class ClearSuggestionFeatureConfigRequest implements IClearSuggestionFeatureConfigRequest { /** - * Constructs a new ConversationProfile. + * Constructs a new ClearSuggestionFeatureConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationProfile); - - /** ConversationProfile name. */ - public name: string; - - /** ConversationProfile displayName. */ - public displayName: string; - - /** ConversationProfile createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile automatedAgentConfig. */ - public automatedAgentConfig?: (google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null); - - /** ConversationProfile humanAgentAssistantConfig. */ - public humanAgentAssistantConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null); - - /** ConversationProfile humanAgentHandoffConfig. */ - public humanAgentHandoffConfig?: (google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null); - - /** ConversationProfile notificationConfig. */ - public notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); - - /** ConversationProfile loggingConfig. */ - public loggingConfig?: (google.cloud.dialogflow.v2beta1.ILoggingConfig|null); - - /** ConversationProfile newMessageEventNotificationConfig. */ - public newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); - - /** ConversationProfile sttConfig. */ - public sttConfig?: (google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest); - /** ConversationProfile languageCode. */ - public languageCode: string; + /** ClearSuggestionFeatureConfigRequest conversationProfile. */ + public conversationProfile: string; - /** ConversationProfile timeZone. */ - public timeZone: string; + /** ClearSuggestionFeatureConfigRequest participantRole. */ + public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); - /** ConversationProfile securitySettings. */ - public securitySettings: string; + /** ClearSuggestionFeatureConfigRequest suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type); /** - * Creates a new ConversationProfile instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationProfile instance + * @returns ClearSuggestionFeatureConfigRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationProfile): google.cloud.dialogflow.v2beta1.ConversationProfile; + public static create(properties?: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest; /** - * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. - * @param message ConversationProfile message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. - * @param message ConversationProfile message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationProfile message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationProfile + * @returns ClearSuggestionFeatureConfigRequest * @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.v2beta1.ConversationProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest; /** - * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationProfile + * @returns ClearSuggestionFeatureConfigRequest * @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.v2beta1.ConversationProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest; /** - * Verifies a ConversationProfile message. + * Verifies a ClearSuggestionFeatureConfigRequest 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 ConversationProfile message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationProfile + * @returns ClearSuggestionFeatureConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest; /** - * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. - * @param message ConversationProfile + * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * @param message ClearSuggestionFeatureConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationProfile to JSON. + * Converts this ClearSuggestionFeatureConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AutomatedAgentConfig. */ - interface IAutomatedAgentConfig { + /** Properties of a SetSuggestionFeatureConfigOperationMetadata. */ + interface ISetSuggestionFeatureConfigOperationMetadata { - /** AutomatedAgentConfig agent */ - agent?: (string|null); + /** SetSuggestionFeatureConfigOperationMetadata conversationProfile */ + conversationProfile?: (string|null); + + /** SetSuggestionFeatureConfigOperationMetadata participantRole */ + participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); + + /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null); + + /** SetSuggestionFeatureConfigOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents an AutomatedAgentConfig. */ - class AutomatedAgentConfig implements IAutomatedAgentConfig { + /** Represents a SetSuggestionFeatureConfigOperationMetadata. */ + class SetSuggestionFeatureConfigOperationMetadata implements ISetSuggestionFeatureConfigOperationMetadata { /** - * Constructs a new AutomatedAgentConfig. + * Constructs a new SetSuggestionFeatureConfigOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata); - /** AutomatedAgentConfig agent. */ - public agent: string; + /** SetSuggestionFeatureConfigOperationMetadata conversationProfile. */ + public conversationProfile: string; + + /** SetSuggestionFeatureConfigOperationMetadata participantRole. */ + public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); + + /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type); + + /** SetSuggestionFeatureConfigOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new AutomatedAgentConfig instance using the specified properties. + * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns AutomatedAgentConfig instance + * @returns SetSuggestionFeatureConfigOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig): google.cloud.dialogflow.v2beta1.AutomatedAgentConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata; /** - * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. - * @param message AutomatedAgentConfig message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. - * @param message AutomatedAgentConfig message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AutomatedAgentConfig + * @returns SetSuggestionFeatureConfigOperationMetadata * @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.v2beta1.AutomatedAgentConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AutomatedAgentConfig + * @returns SetSuggestionFeatureConfigOperationMetadata * @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.v2beta1.AutomatedAgentConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata; /** - * Verifies an AutomatedAgentConfig message. + * Verifies a SetSuggestionFeatureConfigOperationMetadata 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 AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AutomatedAgentConfig + * @returns SetSuggestionFeatureConfigOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.AutomatedAgentConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata; /** - * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. - * @param message AutomatedAgentConfig + * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * @param message SetSuggestionFeatureConfigOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.AutomatedAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AutomatedAgentConfig to JSON. + * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a HumanAgentAssistantConfig. */ - interface IHumanAgentAssistantConfig { + /** Properties of a ClearSuggestionFeatureConfigOperationMetadata. */ + interface IClearSuggestionFeatureConfigOperationMetadata { - /** HumanAgentAssistantConfig notificationConfig */ - notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile */ + conversationProfile?: (string|null); - /** HumanAgentAssistantConfig humanAgentSuggestionConfig */ - humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata participantRole */ + participantRole?: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role|null); - /** HumanAgentAssistantConfig endUserSuggestionConfig */ - endUserSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null); - /** HumanAgentAssistantConfig messageAnalysisConfig */ - messageAnalysisConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a HumanAgentAssistantConfig. */ - class HumanAgentAssistantConfig implements IHumanAgentAssistantConfig { + /** Represents a ClearSuggestionFeatureConfigOperationMetadata. */ + class ClearSuggestionFeatureConfigOperationMetadata implements IClearSuggestionFeatureConfigOperationMetadata { /** - * Constructs a new HumanAgentAssistantConfig. + * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata); - /** HumanAgentAssistantConfig notificationConfig. */ - public notificationConfig?: (google.cloud.dialogflow.v2beta1.INotificationConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile. */ + public conversationProfile: string; - /** HumanAgentAssistantConfig humanAgentSuggestionConfig. */ - public humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata participantRole. */ + public participantRole: (google.cloud.dialogflow.v2beta1.Participant.Role|keyof typeof google.cloud.dialogflow.v2beta1.Participant.Role); - /** HumanAgentAssistantConfig endUserSuggestionConfig. */ - public endUserSuggestionConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2beta1.SuggestionFeature.Type); - /** HumanAgentAssistantConfig messageAnalysisConfig. */ - public messageAnalysisConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + /** ClearSuggestionFeatureConfigOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new HumanAgentAssistantConfig instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns HumanAgentAssistantConfig instance + * @returns ClearSuggestionFeatureConfigOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata; /** - * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. - * @param message HumanAgentAssistantConfig message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. - * @param message HumanAgentAssistantConfig message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HumanAgentAssistantConfig + * @returns ClearSuggestionFeatureConfigOperationMetadata * @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.v2beta1.HumanAgentAssistantConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HumanAgentAssistantConfig + * @returns ClearSuggestionFeatureConfigOperationMetadata * @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.v2beta1.HumanAgentAssistantConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata; /** - * Verifies a HumanAgentAssistantConfig message. + * Verifies a ClearSuggestionFeatureConfigOperationMetadata 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 HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HumanAgentAssistantConfig + * @returns ClearSuggestionFeatureConfigOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata; /** - * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. - * @param message HumanAgentAssistantConfig + * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * @param message ClearSuggestionFeatureConfigOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HumanAgentAssistantConfig to JSON. + * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace HumanAgentAssistantConfig { - - /** Properties of a SuggestionTriggerSettings. */ - interface ISuggestionTriggerSettings { - - /** SuggestionTriggerSettings noSmallTalk */ - noSmallTalk?: (boolean|null); - - /** SuggestionTriggerSettings onlyEndUser */ - onlyEndUser?: (boolean|null); - } - - /** Represents a SuggestionTriggerSettings. */ - class SuggestionTriggerSettings implements ISuggestionTriggerSettings { + /** Represents a Documents */ + class Documents extends $protobuf.rpc.Service { - /** - * Constructs a new SuggestionTriggerSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings); + /** + * Constructs a new Documents 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); - /** SuggestionTriggerSettings noSmallTalk. */ - public noSmallTalk: boolean; + /** + * Creates new Documents 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): Documents; - /** SuggestionTriggerSettings onlyEndUser. */ - public onlyEndUser: boolean; + /** + * Calls ListDocuments. + * @param request ListDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDocumentsResponse + */ + public listDocuments(request: google.cloud.dialogflow.v2beta1.IListDocumentsRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ListDocumentsCallback): void; - /** - * Creates a new SuggestionTriggerSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionTriggerSettings instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** + * Calls ListDocuments. + * @param request ListDocumentsRequest message or plain object + * @returns Promise + */ + public listDocuments(request: google.cloud.dialogflow.v2beta1.IListDocumentsRequest): Promise; - /** - * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @param message SuggestionTriggerSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetDocument. + * @param request GetDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Document + */ + public getDocument(request: google.cloud.dialogflow.v2beta1.IGetDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.GetDocumentCallback): void; - /** - * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @param message SuggestionTriggerSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetDocument. + * @param request GetDocumentRequest message or plain object + * @returns Promise + */ + public getDocument(request: google.cloud.dialogflow.v2beta1.IGetDocumentRequest): Promise; - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionTriggerSettings - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** + * Calls CreateDocument. + * @param request CreateDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDocument(request: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.CreateDocumentCallback): void; - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionTriggerSettings - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** + * Calls CreateDocument. + * @param request CreateDocumentRequest message or plain object + * @returns Promise + */ + public createDocument(request: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest): Promise; - /** - * Verifies a SuggestionTriggerSettings 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 ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importDocuments(request: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ImportDocumentsCallback): void; - /** - * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionTriggerSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** + * Calls ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @returns Promise + */ + public importDocuments(request: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest): Promise; - /** - * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. - * @param message SuggestionTriggerSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls DeleteDocument. + * @param request DeleteDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDocument(request: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.DeleteDocumentCallback): void; - /** - * Converts this SuggestionTriggerSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Calls DeleteDocument. + * @param request DeleteDocumentRequest message or plain object + * @returns Promise + */ + public deleteDocument(request: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest): Promise; - /** Properties of a SuggestionFeatureConfig. */ - interface ISuggestionFeatureConfig { + /** + * Calls UpdateDocument. + * @param request UpdateDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDocument(request: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.UpdateDocumentCallback): void; - /** SuggestionFeatureConfig suggestionFeature */ - suggestionFeature?: (google.cloud.dialogflow.v2beta1.ISuggestionFeature|null); + /** + * Calls UpdateDocument. + * @param request UpdateDocumentRequest message or plain object + * @returns Promise + */ + public updateDocument(request: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest): Promise; - /** SuggestionFeatureConfig enableEventBasedSuggestion */ - enableEventBasedSuggestion?: (boolean|null); + /** + * Calls ReloadDocument. + * @param request ReloadDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reloadDocument(request: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ReloadDocumentCallback): void; - /** SuggestionFeatureConfig suggestionTriggerSettings */ - suggestionTriggerSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + /** + * Calls ReloadDocument. + * @param request ReloadDocumentRequest message or plain object + * @returns Promise + */ + public reloadDocument(request: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest): Promise; + } - /** SuggestionFeatureConfig queryConfig */ - queryConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + namespace Documents { - /** SuggestionFeatureConfig conversationModelConfig */ - conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#listDocuments}. + * @param error Error, if any + * @param [response] ListDocumentsResponse + */ + type ListDocumentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListDocumentsResponse) => void; - /** SuggestionFeatureConfig conversationProcessConfig */ - conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); - } + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#getDocument}. + * @param error Error, if any + * @param [response] Document + */ + type GetDocumentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Document) => void; - /** Represents a SuggestionFeatureConfig. */ - class SuggestionFeatureConfig implements ISuggestionFeatureConfig { + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#createDocument}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Constructs a new SuggestionFeatureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#importDocuments}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** SuggestionFeatureConfig suggestionFeature. */ - public suggestionFeature?: (google.cloud.dialogflow.v2beta1.ISuggestionFeature|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#deleteDocument}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** SuggestionFeatureConfig enableEventBasedSuggestion. */ - public enableEventBasedSuggestion: boolean; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#updateDocument}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** SuggestionFeatureConfig suggestionTriggerSettings. */ - public suggestionTriggerSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#reloadDocument}. + * @param error Error, if any + * @param [response] Operation + */ + type ReloadDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** SuggestionFeatureConfig queryConfig. */ - public queryConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + /** Properties of a Document. */ + interface IDocument { - /** SuggestionFeatureConfig conversationModelConfig. */ - public conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + /** Document name */ + name?: (string|null); - /** SuggestionFeatureConfig conversationProcessConfig. */ - public conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); + /** Document displayName */ + displayName?: (string|null); - /** - * Creates a new SuggestionFeatureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionFeatureConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** Document mimeType */ + mimeType?: (string|null); - /** - * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @param message SuggestionFeatureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Document knowledgeTypes */ + knowledgeTypes?: (google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]|null); - /** - * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @param message SuggestionFeatureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Document contentUri */ + contentUri?: (string|null); - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionFeatureConfig - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** Document content */ + content?: (string|null); - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionFeatureConfig - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** Document rawContent */ + rawContent?: (Uint8Array|string|null); - /** - * Verifies a SuggestionFeatureConfig 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); + /** Document enableAutoReload */ + enableAutoReload?: (boolean|null); - /** - * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionFeatureConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** Document latestReloadStatus */ + latestReloadStatus?: (google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null); - /** - * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. - * @param message SuggestionFeatureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Document metadata */ + metadata?: ({ [k: string]: string }|null); - /** - * Converts this SuggestionFeatureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Document state */ + state?: (google.cloud.dialogflow.v2beta1.Document.State|keyof typeof google.cloud.dialogflow.v2beta1.Document.State|null); + } - /** Properties of a SuggestionConfig. */ - interface ISuggestionConfig { + /** Represents a Document. */ + class Document implements IDocument { - /** SuggestionConfig featureConfigs */ - featureConfigs?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]|null); + /** + * Constructs a new Document. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IDocument); - /** SuggestionConfig groupSuggestionResponses */ - groupSuggestionResponses?: (boolean|null); - } + /** Document name. */ + public name: string; - /** Represents a SuggestionConfig. */ - class SuggestionConfig implements ISuggestionConfig { + /** Document displayName. */ + public displayName: string; - /** - * Constructs a new SuggestionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig); + /** Document mimeType. */ + public mimeType: string; - /** SuggestionConfig featureConfigs. */ - public featureConfigs: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]; + /** Document knowledgeTypes. */ + public knowledgeTypes: google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]; - /** SuggestionConfig groupSuggestionResponses. */ - public groupSuggestionResponses: boolean; + /** Document contentUri. */ + public contentUri?: (string|null); - /** - * Creates a new SuggestionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + /** Document content. */ + public content?: (string|null); - /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Document rawContent. */ + public rawContent?: (Uint8Array|string|null); - /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Document enableAutoReload. */ + public enableAutoReload: boolean; - /** - * Decodes a SuggestionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionConfig - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + /** Document latestReloadStatus. */ + public latestReloadStatus?: (google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null); - /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionConfig - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + /** Document metadata. */ + public metadata: { [k: string]: string }; - /** - * Verifies a SuggestionConfig 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); + /** Document state. */ + public state: (google.cloud.dialogflow.v2beta1.Document.State|keyof typeof google.cloud.dialogflow.v2beta1.Document.State); - /** - * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig; + /** Document source. */ + public source?: ("contentUri"|"content"|"rawContent"); - /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @param message SuggestionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new Document instance using the specified properties. + * @param [properties] Properties to set + * @returns Document instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IDocument): google.cloud.dialogflow.v2beta1.Document; - /** - * Converts this SuggestionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a SuggestionQueryConfig. */ - interface ISuggestionQueryConfig { + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * @param message Document message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; - /** SuggestionQueryConfig knowledgeBaseQuerySource */ - knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); + /** + * Decodes a Document message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Document + * @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.v2beta1.Document; - /** SuggestionQueryConfig documentQuerySource */ - documentQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Document + * @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.v2beta1.Document; - /** SuggestionQueryConfig dialogflowQuerySource */ - dialogflowQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); + /** + * Verifies a Document 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); - /** SuggestionQueryConfig maxResults */ - maxResults?: (number|null); + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Document + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Document; - /** SuggestionQueryConfig confidenceThreshold */ - confidenceThreshold?: (number|null); + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SuggestionQueryConfig contextFilterSettings */ - contextFilterSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); - } + /** + * Converts this Document to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** Represents a SuggestionQueryConfig. */ - class SuggestionQueryConfig implements ISuggestionQueryConfig { + namespace Document { - /** - * Constructs a new SuggestionQueryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig); + /** KnowledgeType enum. */ + enum KnowledgeType { + KNOWLEDGE_TYPE_UNSPECIFIED = 0, + FAQ = 1, + EXTRACTIVE_QA = 2, + ARTICLE_SUGGESTION = 3, + AGENT_FACING_SMART_REPLY = 4, + SMART_REPLY = 4 + } - /** SuggestionQueryConfig knowledgeBaseQuerySource. */ - public knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); + /** Properties of a ReloadStatus. */ + interface IReloadStatus { - /** SuggestionQueryConfig documentQuerySource. */ - public documentQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); + /** ReloadStatus time */ + time?: (google.protobuf.ITimestamp|null); - /** SuggestionQueryConfig dialogflowQuerySource. */ - public dialogflowQuerySource?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); + /** ReloadStatus status */ + status?: (google.rpc.IStatus|null); + } - /** SuggestionQueryConfig maxResults. */ - public maxResults: number; + /** Represents a ReloadStatus. */ + class ReloadStatus implements IReloadStatus { - /** SuggestionQueryConfig confidenceThreshold. */ - public confidenceThreshold: number; + /** + * Constructs a new ReloadStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Document.IReloadStatus); - /** SuggestionQueryConfig contextFilterSettings. */ - public contextFilterSettings?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + /** ReloadStatus time. */ + public time?: (google.protobuf.ITimestamp|null); - /** SuggestionQueryConfig querySource. */ - public querySource?: ("knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"); + /** ReloadStatus status. */ + public status?: (google.rpc.IStatus|null); /** - * Creates a new SuggestionQueryConfig instance using the specified properties. + * Creates a new ReloadStatus instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionQueryConfig instance + * @returns ReloadStatus instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.Document.IReloadStatus): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; /** - * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. - * @param message SuggestionQueryConfig message or plain object to encode + * Encodes the specified ReloadStatus message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. + * @param message ReloadStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.Document.IReloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. - * @param message SuggestionQueryConfig message or plain object to encode + * Encodes the specified ReloadStatus message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. + * @param message ReloadStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Document.IReloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * Decodes a ReloadStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SuggestionQueryConfig + * @returns ReloadStatus * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * Decodes a ReloadStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionQueryConfig + * @returns ReloadStatus * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; /** - * Verifies a SuggestionQueryConfig message. + * Verifies a ReloadStatus 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 SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionQueryConfig + * @returns ReloadStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; /** - * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. - * @param message SuggestionQueryConfig + * Creates a plain object from a ReloadStatus message. Also converts values to other types if specified. + * @param message ReloadStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Document.ReloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionQueryConfig to JSON. + * Converts this ReloadStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace SuggestionQueryConfig { - - /** Properties of a KnowledgeBaseQuerySource. */ - interface IKnowledgeBaseQuerySource { - - /** KnowledgeBaseQuerySource knowledgeBases */ - knowledgeBases?: (string[]|null); - } - - /** Represents a KnowledgeBaseQuerySource. */ - class KnowledgeBaseQuerySource implements IKnowledgeBaseQuerySource { - - /** - * Constructs a new KnowledgeBaseQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource); - - /** KnowledgeBaseQuerySource knowledgeBases. */ - public knowledgeBases: string[]; - - /** - * Creates a new KnowledgeBaseQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns KnowledgeBaseQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - - /** - * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @param message KnowledgeBaseQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @param message KnowledgeBaseQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KnowledgeBaseQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KnowledgeBaseQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - - /** - * Verifies a KnowledgeBaseQuerySource 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 KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KnowledgeBaseQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - - /** - * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. - * @param message KnowledgeBaseQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KnowledgeBaseQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DocumentQuerySource. */ - interface IDocumentQuerySource { - - /** DocumentQuerySource documents */ - documents?: (string[]|null); - } - - /** Represents a DocumentQuerySource. */ - class DocumentQuerySource implements IDocumentQuerySource { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + UPDATING = 3, + RELOADING = 4, + DELETING = 5 + } + } - /** - * Constructs a new DocumentQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource); + /** Properties of a GetDocumentRequest. */ + interface IGetDocumentRequest { - /** DocumentQuerySource documents. */ - public documents: string[]; + /** GetDocumentRequest name */ + name?: (string|null); + } - /** - * Creates a new DocumentQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns DocumentQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** Represents a GetDocumentRequest. */ + class GetDocumentRequest implements IGetDocumentRequest { - /** - * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @param message DocumentQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GetDocumentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetDocumentRequest); - /** - * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @param message DocumentQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** GetDocumentRequest name. */ + public name: string; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DocumentQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Creates a new GetDocumentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDocumentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetDocumentRequest): google.cloud.dialogflow.v2beta1.GetDocumentRequest; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DocumentQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * @param message GetDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a DocumentQuerySource 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 GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * @param message GetDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DocumentQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Decodes a GetDocumentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDocumentRequest + * @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.v2beta1.GetDocumentRequest; - /** - * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. - * @param message DocumentQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDocumentRequest + * @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.v2beta1.GetDocumentRequest; - /** - * Converts this DocumentQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Verifies a GetDocumentRequest 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 DialogflowQuerySource. */ - interface IDialogflowQuerySource { + /** + * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDocumentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetDocumentRequest; - /** DialogflowQuerySource agent */ - agent?: (string|null); - } + /** + * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * @param message GetDocumentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.GetDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a DialogflowQuerySource. */ - class DialogflowQuerySource implements IDialogflowQuerySource { + /** + * Converts this GetDocumentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Constructs a new DialogflowQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource); + /** Properties of a ListDocumentsRequest. */ + interface IListDocumentsRequest { - /** DialogflowQuerySource agent. */ - public agent: string; + /** ListDocumentsRequest parent */ + parent?: (string|null); - /** - * Creates a new DialogflowQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns DialogflowQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** ListDocumentsRequest pageSize */ + pageSize?: (number|null); - /** - * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @param message DialogflowQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDocumentsRequest pageToken */ + pageToken?: (string|null); - /** - * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @param message DialogflowQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDocumentsRequest filter */ + filter?: (string|null); + } - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DialogflowQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** Represents a ListDocumentsRequest. */ + class ListDocumentsRequest implements IListDocumentsRequest { - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DialogflowQuerySource - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** + * Constructs a new ListDocumentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsRequest); - /** - * Verifies a DialogflowQuerySource 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); + /** ListDocumentsRequest parent. */ + public parent: string; - /** - * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DialogflowQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** ListDocumentsRequest pageSize. */ + public pageSize: number; - /** - * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. - * @param message DialogflowQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListDocumentsRequest pageToken. */ + public pageToken: string; - /** - * Converts this DialogflowQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListDocumentsRequest filter. */ + public filter: string; - /** Properties of a ContextFilterSettings. */ - interface IContextFilterSettings { + /** + * Creates a new ListDocumentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDocumentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsRequest): google.cloud.dialogflow.v2beta1.ListDocumentsRequest; - /** ContextFilterSettings dropHandoffMessages */ - dropHandoffMessages?: (boolean|null); + /** + * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * @param message ListDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ContextFilterSettings dropVirtualAgentMessages */ - dropVirtualAgentMessages?: (boolean|null); + /** + * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * @param message ListDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ContextFilterSettings dropIvrMessages */ - dropIvrMessages?: (boolean|null); - } + /** + * Decodes a ListDocumentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDocumentsRequest + * @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.v2beta1.ListDocumentsRequest; - /** Represents a ContextFilterSettings. */ - class ContextFilterSettings implements IContextFilterSettings { + /** + * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDocumentsRequest + * @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.v2beta1.ListDocumentsRequest; - /** - * Constructs a new ContextFilterSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings); + /** + * Verifies a ListDocumentsRequest 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); - /** ContextFilterSettings dropHandoffMessages. */ - public dropHandoffMessages: boolean; + /** + * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDocumentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListDocumentsRequest; - /** ContextFilterSettings dropVirtualAgentMessages. */ - public dropVirtualAgentMessages: boolean; + /** + * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. + * @param message ListDocumentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ListDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ContextFilterSettings dropIvrMessages. */ - public dropIvrMessages: boolean; + /** + * Converts this ListDocumentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Creates a new ContextFilterSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ContextFilterSettings instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** Properties of a ListDocumentsResponse. */ + interface IListDocumentsResponse { - /** - * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @param message ContextFilterSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListDocumentsResponse documents */ + documents?: (google.cloud.dialogflow.v2beta1.IDocument[]|null); + + /** ListDocumentsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @param message ContextFilterSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListDocumentsResponse. */ + class ListDocumentsResponse implements IListDocumentsResponse { - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContextFilterSettings - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Constructs a new ListDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsResponse); - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContextFilterSettings - * @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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** ListDocumentsResponse documents. */ + public documents: google.cloud.dialogflow.v2beta1.IDocument[]; - /** - * Verifies a ContextFilterSettings 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); + /** ListDocumentsResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates a ContextFilterSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContextFilterSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Creates a new ListDocumentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDocumentsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsResponse): google.cloud.dialogflow.v2beta1.ListDocumentsResponse; - /** - * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. - * @param message ContextFilterSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * @param message ListDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ContextFilterSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * @param message ListDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a ConversationModelConfig. */ - interface IConversationModelConfig { + /** + * Decodes a ListDocumentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDocumentsResponse + * @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.v2beta1.ListDocumentsResponse; - /** ConversationModelConfig model */ - model?: (string|null); - } + /** + * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDocumentsResponse + * @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.v2beta1.ListDocumentsResponse; - /** Represents a ConversationModelConfig. */ - class ConversationModelConfig implements IConversationModelConfig { + /** + * Verifies a ListDocumentsResponse 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 ConversationModelConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig); + /** + * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDocumentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListDocumentsResponse; - /** ConversationModelConfig model. */ - public model: string; + /** + * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. + * @param message ListDocumentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ListDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new ConversationModelConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationModelConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + /** + * Converts this ListDocumentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @param message ConversationModelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a CreateDocumentRequest. */ + interface ICreateDocumentRequest { - /** - * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @param message ConversationModelConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateDocumentRequest parent */ + parent?: (string|null); - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationModelConfig - * @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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + /** CreateDocumentRequest document */ + document?: (google.cloud.dialogflow.v2beta1.IDocument|null); - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationModelConfig - * @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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + /** CreateDocumentRequest importGcsCustomMetadata */ + importGcsCustomMetadata?: (boolean|null); + } - /** - * Verifies a ConversationModelConfig 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 CreateDocumentRequest. */ + class CreateDocumentRequest implements ICreateDocumentRequest { - /** - * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationModelConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig; + /** + * Constructs a new CreateDocumentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest); - /** - * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. - * @param message ConversationModelConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateDocumentRequest parent. */ + public parent: string; - /** - * Converts this ConversationModelConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** CreateDocumentRequest document. */ + public document?: (google.cloud.dialogflow.v2beta1.IDocument|null); - /** Properties of a ConversationProcessConfig. */ - interface IConversationProcessConfig { + /** CreateDocumentRequest importGcsCustomMetadata. */ + public importGcsCustomMetadata: boolean; - /** ConversationProcessConfig recentSentencesCount */ - recentSentencesCount?: (number|null); - } + /** + * Creates a new CreateDocumentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDocumentRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest): google.cloud.dialogflow.v2beta1.CreateDocumentRequest; - /** Represents a ConversationProcessConfig. */ - class ConversationProcessConfig implements IConversationProcessConfig { + /** + * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * @param message CreateDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ConversationProcessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig); + /** + * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * @param message CreateDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDocumentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDocumentRequest + * @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.v2beta1.CreateDocumentRequest; - /** ConversationProcessConfig recentSentencesCount. */ - public recentSentencesCount: number; + /** + * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDocumentRequest + * @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.v2beta1.CreateDocumentRequest; - /** - * Creates a new ConversationProcessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationProcessConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + /** + * Verifies a CreateDocumentRequest 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 ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @param message ConversationProcessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDocumentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateDocumentRequest; - /** - * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @param message ConversationProcessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. + * @param message CreateDocumentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationProcessConfig - * @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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + /** + * Converts this CreateDocumentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationProcessConfig - * @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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + /** Properties of an ImportDocumentsRequest. */ + interface IImportDocumentsRequest { - /** - * Verifies a ConversationProcessConfig 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); + /** ImportDocumentsRequest parent */ + parent?: (string|null); - /** - * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationProcessConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + /** ImportDocumentsRequest gcsSource */ + gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSources|null); - /** - * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. - * @param message ConversationProcessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ImportDocumentsRequest documentTemplate */ + documentTemplate?: (google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null); - /** - * Converts this ConversationProcessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ImportDocumentsRequest importGcsCustomMetadata */ + importGcsCustomMetadata?: (boolean|null); + } - /** Properties of a MessageAnalysisConfig. */ - interface IMessageAnalysisConfig { + /** Represents an ImportDocumentsRequest. */ + class ImportDocumentsRequest implements IImportDocumentsRequest { - /** MessageAnalysisConfig enableEntityExtraction */ - enableEntityExtraction?: (boolean|null); + /** + * Constructs a new ImportDocumentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest); - /** MessageAnalysisConfig enableSentimentAnalysis */ - enableSentimentAnalysis?: (boolean|null); - } + /** ImportDocumentsRequest parent. */ + public parent: string; - /** Represents a MessageAnalysisConfig. */ - class MessageAnalysisConfig implements IMessageAnalysisConfig { + /** ImportDocumentsRequest gcsSource. */ + public gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSources|null); - /** - * Constructs a new MessageAnalysisConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig); + /** ImportDocumentsRequest documentTemplate. */ + public documentTemplate?: (google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null); - /** MessageAnalysisConfig enableEntityExtraction. */ - public enableEntityExtraction: boolean; + /** ImportDocumentsRequest importGcsCustomMetadata. */ + public importGcsCustomMetadata: boolean; - /** MessageAnalysisConfig enableSentimentAnalysis. */ - public enableSentimentAnalysis: boolean; + /** ImportDocumentsRequest source. */ + public source?: "gcsSource"; - /** - * Creates a new MessageAnalysisConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageAnalysisConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Creates a new ImportDocumentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportDocumentsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest): google.cloud.dialogflow.v2beta1.ImportDocumentsRequest; - /** - * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @param message MessageAnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @param message MessageAnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageAnalysisConfig - * @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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportDocumentsRequest + * @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.v2beta1.ImportDocumentsRequest; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageAnalysisConfig - * @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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportDocumentsRequest + * @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.v2beta1.ImportDocumentsRequest; - /** - * Verifies a MessageAnalysisConfig 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 ImportDocumentsRequest 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 MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageAnalysisConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportDocumentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentsRequest; - /** - * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. - * @param message MessageAnalysisConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @param message ImportDocumentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this MessageAnalysisConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ImportDocumentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a HumanAgentHandoffConfig. */ - interface IHumanAgentHandoffConfig { + /** Properties of an ImportDocumentTemplate. */ + interface IImportDocumentTemplate { - /** HumanAgentHandoffConfig livePersonConfig */ - livePersonConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null); + /** ImportDocumentTemplate mimeType */ + mimeType?: (string|null); - /** HumanAgentHandoffConfig salesforceLiveAgentConfig */ - salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + /** ImportDocumentTemplate knowledgeTypes */ + knowledgeTypes?: (google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]|null); + + /** ImportDocumentTemplate metadata */ + metadata?: ({ [k: string]: string }|null); } - /** Represents a HumanAgentHandoffConfig. */ - class HumanAgentHandoffConfig implements IHumanAgentHandoffConfig { + /** Represents an ImportDocumentTemplate. */ + class ImportDocumentTemplate implements IImportDocumentTemplate { /** - * Constructs a new HumanAgentHandoffConfig. + * Constructs a new ImportDocumentTemplate. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate); - /** HumanAgentHandoffConfig livePersonConfig. */ - public livePersonConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null); + /** ImportDocumentTemplate mimeType. */ + public mimeType: string; - /** HumanAgentHandoffConfig salesforceLiveAgentConfig. */ - public salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + /** ImportDocumentTemplate knowledgeTypes. */ + public knowledgeTypes: google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]; - /** HumanAgentHandoffConfig agentService. */ - public agentService?: ("livePersonConfig"|"salesforceLiveAgentConfig"); + /** ImportDocumentTemplate metadata. */ + public metadata: { [k: string]: string }; /** - * Creates a new HumanAgentHandoffConfig instance using the specified properties. + * Creates a new ImportDocumentTemplate instance using the specified properties. * @param [properties] Properties to set - * @returns HumanAgentHandoffConfig instance + * @returns ImportDocumentTemplate instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; /** - * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. - * @param message HumanAgentHandoffConfig message or plain object to encode + * Encodes the specified ImportDocumentTemplate message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * @param message ImportDocumentTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. - * @param message HumanAgentHandoffConfig message or plain object to encode + * Encodes the specified ImportDocumentTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * @param message ImportDocumentTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. + * Decodes an ImportDocumentTemplate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HumanAgentHandoffConfig + * @returns ImportDocumentTemplate * @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.v2beta1.HumanAgentHandoffConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentTemplate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HumanAgentHandoffConfig + * @returns ImportDocumentTemplate * @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.v2beta1.HumanAgentHandoffConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; /** - * Verifies a HumanAgentHandoffConfig message. + * Verifies an ImportDocumentTemplate 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 HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentTemplate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HumanAgentHandoffConfig + * @returns ImportDocumentTemplate */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; /** - * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. - * @param message HumanAgentHandoffConfig + * Creates a plain object from an ImportDocumentTemplate message. Also converts values to other types if specified. + * @param message ImportDocumentTemplate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ImportDocumentTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HumanAgentHandoffConfig to JSON. + * Converts this ImportDocumentTemplate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace HumanAgentHandoffConfig { - - /** Properties of a LivePersonConfig. */ - interface ILivePersonConfig { - - /** LivePersonConfig accountNumber */ - accountNumber?: (string|null); - } - - /** Represents a LivePersonConfig. */ - class LivePersonConfig implements ILivePersonConfig { - - /** - * Constructs a new LivePersonConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig); - - /** LivePersonConfig accountNumber. */ - public accountNumber: string; - - /** - * Creates a new LivePersonConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LivePersonConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @param message LivePersonConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @param message LivePersonConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LivePersonConfig - * @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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LivePersonConfig - * @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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Verifies a LivePersonConfig 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 LivePersonConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LivePersonConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. - * @param message LivePersonConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LivePersonConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SalesforceLiveAgentConfig. */ - interface ISalesforceLiveAgentConfig { - - /** SalesforceLiveAgentConfig organizationId */ - organizationId?: (string|null); - - /** SalesforceLiveAgentConfig deploymentId */ - deploymentId?: (string|null); - - /** SalesforceLiveAgentConfig buttonId */ - buttonId?: (string|null); - - /** SalesforceLiveAgentConfig endpointDomain */ - endpointDomain?: (string|null); - } - - /** Represents a SalesforceLiveAgentConfig. */ - class SalesforceLiveAgentConfig implements ISalesforceLiveAgentConfig { - - /** - * Constructs a new SalesforceLiveAgentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig); + /** Properties of an ImportDocumentsResponse. */ + interface IImportDocumentsResponse { - /** SalesforceLiveAgentConfig organizationId. */ - public organizationId: string; + /** ImportDocumentsResponse warnings */ + warnings?: (google.rpc.IStatus[]|null); + } - /** SalesforceLiveAgentConfig deploymentId. */ - public deploymentId: string; + /** Represents an ImportDocumentsResponse. */ + class ImportDocumentsResponse implements IImportDocumentsResponse { - /** SalesforceLiveAgentConfig buttonId. */ - public buttonId: string; + /** + * Constructs a new ImportDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse); - /** SalesforceLiveAgentConfig endpointDomain. */ - public endpointDomain: string; + /** ImportDocumentsResponse warnings. */ + public warnings: google.rpc.IStatus[]; - /** - * Creates a new SalesforceLiveAgentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SalesforceLiveAgentConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; + /** + * Creates a new ImportDocumentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportDocumentsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse): google.cloud.dialogflow.v2beta1.ImportDocumentsResponse; - /** - * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @param message SalesforceLiveAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @param message SalesforceLiveAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SalesforceLiveAgentConfig - * @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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; + /** + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportDocumentsResponse + * @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.v2beta1.ImportDocumentsResponse; - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SalesforceLiveAgentConfig - * @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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; + /** + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportDocumentsResponse + * @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.v2beta1.ImportDocumentsResponse; - /** - * Verifies a SalesforceLiveAgentConfig 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 ImportDocumentsResponse 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 SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SalesforceLiveAgentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; + /** + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportDocumentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentsResponse; - /** - * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. - * @param message SalesforceLiveAgentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * @param message ImportDocumentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this SalesforceLiveAgentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this ImportDocumentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a NotificationConfig. */ - interface INotificationConfig { - - /** NotificationConfig topic */ - topic?: (string|null); + /** Properties of a DeleteDocumentRequest. */ + interface IDeleteDocumentRequest { - /** NotificationConfig messageFormat */ - messageFormat?: (google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|null); + /** DeleteDocumentRequest name */ + name?: (string|null); } - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { + /** Represents a DeleteDocumentRequest. */ + class DeleteDocumentRequest implements IDeleteDocumentRequest { /** - * Constructs a new NotificationConfig. + * Constructs a new DeleteDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.INotificationConfig); - - /** NotificationConfig topic. */ - public topic: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest); - /** NotificationConfig messageFormat. */ - public messageFormat: (google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat); + /** DeleteDocumentRequest name. */ + public name: string; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new DeleteDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationConfig instance + * @returns DeleteDocumentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.INotificationConfig): google.cloud.dialogflow.v2beta1.NotificationConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. + * @param message DeleteDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. + * @param message DeleteDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationConfig + * @returns DeleteDocumentRequest * @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.v2beta1.NotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationConfig + * @returns DeleteDocumentRequest * @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.v2beta1.NotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; /** - * Verifies a NotificationConfig message. + * Verifies a DeleteDocumentRequest 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 NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationConfig + * @returns DeleteDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.NotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig + * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * @param message DeleteDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationConfig to JSON. + * Converts this DeleteDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace NotificationConfig { - - /** MessageFormat enum. */ - enum MessageFormat { - MESSAGE_FORMAT_UNSPECIFIED = 0, - PROTO = 1, - JSON = 2 - } - } + /** Properties of an UpdateDocumentRequest. */ + interface IUpdateDocumentRequest { - /** Properties of a LoggingConfig. */ - interface ILoggingConfig { + /** UpdateDocumentRequest document */ + document?: (google.cloud.dialogflow.v2beta1.IDocument|null); - /** LoggingConfig enableStackdriverLogging */ - enableStackdriverLogging?: (boolean|null); + /** UpdateDocumentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a LoggingConfig. */ - class LoggingConfig implements ILoggingConfig { + /** Represents an UpdateDocumentRequest. */ + class UpdateDocumentRequest implements IUpdateDocumentRequest { /** - * Constructs a new LoggingConfig. + * Constructs a new UpdateDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ILoggingConfig); + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest); - /** LoggingConfig enableStackdriverLogging. */ - public enableStackdriverLogging: boolean; + /** UpdateDocumentRequest document. */ + public document?: (google.cloud.dialogflow.v2beta1.IDocument|null); + + /** UpdateDocumentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new LoggingConfig instance using the specified properties. + * Creates a new UpdateDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LoggingConfig instance + * @returns UpdateDocumentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ILoggingConfig): google.cloud.dialogflow.v2beta1.LoggingConfig; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. + * @param message UpdateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. + * @param message UpdateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoggingConfig + * @returns UpdateDocumentRequest * @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.v2beta1.LoggingConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoggingConfig + * @returns UpdateDocumentRequest * @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.v2beta1.LoggingConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; /** - * Verifies a LoggingConfig message. + * Verifies an UpdateDocumentRequest 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 LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoggingConfig + * @returns UpdateDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.LoggingConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. - * @param message LoggingConfig + * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. + * @param message UpdateDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoggingConfig to JSON. + * Converts this UpdateDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListConversationProfilesRequest. */ - interface IListConversationProfilesRequest { - - /** ListConversationProfilesRequest parent */ - parent?: (string|null); - - /** ListConversationProfilesRequest pageSize */ - pageSize?: (number|null); + /** Properties of an ExportOperationMetadata. */ + interface IExportOperationMetadata { - /** ListConversationProfilesRequest pageToken */ - pageToken?: (string|null); + /** ExportOperationMetadata exportedGcsDestination */ + exportedGcsDestination?: (google.cloud.dialogflow.v2beta1.IGcsDestination|null); } - /** Represents a ListConversationProfilesRequest. */ - class ListConversationProfilesRequest implements IListConversationProfilesRequest { + /** Represents an ExportOperationMetadata. */ + class ExportOperationMetadata implements IExportOperationMetadata { /** - * Constructs a new ListConversationProfilesRequest. + * Constructs a new ExportOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest); - - /** ListConversationProfilesRequest parent. */ - public parent: string; - - /** ListConversationProfilesRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2beta1.IExportOperationMetadata); - /** ListConversationProfilesRequest pageToken. */ - public pageToken: string; + /** ExportOperationMetadata exportedGcsDestination. */ + public exportedGcsDestination?: (google.cloud.dialogflow.v2beta1.IGcsDestination|null); /** - * Creates a new ListConversationProfilesRequest instance using the specified properties. + * Creates a new ExportOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationProfilesRequest instance + * @returns ExportOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IExportOperationMetadata): google.cloud.dialogflow.v2beta1.ExportOperationMetadata; /** - * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. - * @param message ListConversationProfilesRequest message or plain object to encode + * Encodes the specified ExportOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ExportOperationMetadata.verify|verify} messages. + * @param message ExportOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IExportOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. - * @param message ListConversationProfilesRequest message or plain object to encode + * Encodes the specified ExportOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ExportOperationMetadata.verify|verify} messages. + * @param message ExportOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IExportOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. + * Decodes an ExportOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationProfilesRequest + * @returns ExportOperationMetadata * @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.v2beta1.ListConversationProfilesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ExportOperationMetadata; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationProfilesRequest + * @returns ExportOperationMetadata * @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.v2beta1.ListConversationProfilesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ExportOperationMetadata; /** - * Verifies a ListConversationProfilesRequest message. + * Verifies an ExportOperationMetadata 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 ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationProfilesRequest + * @returns ExportOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ExportOperationMetadata; /** - * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. - * @param message ListConversationProfilesRequest + * Creates a plain object from an ExportOperationMetadata message. Also converts values to other types if specified. + * @param message ExportOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ExportOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationProfilesRequest to JSON. + * Converts this ExportOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListConversationProfilesResponse. */ - interface IListConversationProfilesResponse { + /** Properties of a KnowledgeOperationMetadata. */ + interface IKnowledgeOperationMetadata { - /** ListConversationProfilesResponse conversationProfiles */ - conversationProfiles?: (google.cloud.dialogflow.v2beta1.IConversationProfile[]|null); + /** KnowledgeOperationMetadata state */ + state?: (google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|null); - /** ListConversationProfilesResponse nextPageToken */ - nextPageToken?: (string|null); + /** KnowledgeOperationMetadata knowledgeBase */ + knowledgeBase?: (string|null); + + /** KnowledgeOperationMetadata exportOperationMetadata */ + exportOperationMetadata?: (google.cloud.dialogflow.v2beta1.IExportOperationMetadata|null); } - /** Represents a ListConversationProfilesResponse. */ - class ListConversationProfilesResponse implements IListConversationProfilesResponse { + /** Represents a KnowledgeOperationMetadata. */ + class KnowledgeOperationMetadata implements IKnowledgeOperationMetadata { /** - * Constructs a new ListConversationProfilesResponse. + * Constructs a new KnowledgeOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata); - /** ListConversationProfilesResponse conversationProfiles. */ - public conversationProfiles: google.cloud.dialogflow.v2beta1.IConversationProfile[]; + /** KnowledgeOperationMetadata state. */ + public state: (google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State); - /** ListConversationProfilesResponse nextPageToken. */ - public nextPageToken: string; + /** KnowledgeOperationMetadata knowledgeBase. */ + public knowledgeBase: string; + + /** KnowledgeOperationMetadata exportOperationMetadata. */ + public exportOperationMetadata?: (google.cloud.dialogflow.v2beta1.IExportOperationMetadata|null); + + /** KnowledgeOperationMetadata operationMetadata. */ + public operationMetadata?: "exportOperationMetadata"; /** - * Creates a new ListConversationProfilesResponse instance using the specified properties. + * Creates a new KnowledgeOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationProfilesResponse instance + * @returns KnowledgeOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; /** - * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. - * @param message ListConversationProfilesResponse message or plain object to encode + * Encodes the specified KnowledgeOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. + * @param message KnowledgeOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. - * @param message ListConversationProfilesResponse message or plain object to encode + * Encodes the specified KnowledgeOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. + * @param message KnowledgeOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. + * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationProfilesResponse + * @returns KnowledgeOperationMetadata * @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.v2beta1.ListConversationProfilesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. + * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationProfilesResponse + * @returns KnowledgeOperationMetadata * @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.v2beta1.ListConversationProfilesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; /** - * Verifies a ListConversationProfilesResponse message. + * Verifies a KnowledgeOperationMetadata 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 ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KnowledgeOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationProfilesResponse + * @returns KnowledgeOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; /** - * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. - * @param message ListConversationProfilesResponse + * Creates a plain object from a KnowledgeOperationMetadata message. Also converts values to other types if specified. + * @param message KnowledgeOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationProfilesResponse to JSON. + * Converts this KnowledgeOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a GetConversationProfileRequest. */ - interface IGetConversationProfileRequest { + namespace KnowledgeOperationMetadata { - /** GetConversationProfileRequest name */ + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + DONE = 3 + } + } + + /** Properties of a ReloadDocumentRequest. */ + interface IReloadDocumentRequest { + + /** ReloadDocumentRequest name */ name?: (string|null); + + /** ReloadDocumentRequest gcsSource */ + gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSource|null); + + /** ReloadDocumentRequest importGcsCustomMetadata */ + importGcsCustomMetadata?: (boolean|null); } - /** Represents a GetConversationProfileRequest. */ - class GetConversationProfileRequest implements IGetConversationProfileRequest { + /** Represents a ReloadDocumentRequest. */ + class ReloadDocumentRequest implements IReloadDocumentRequest { /** - * Constructs a new GetConversationProfileRequest. + * Constructs a new ReloadDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest); - /** GetConversationProfileRequest name. */ + /** ReloadDocumentRequest name. */ public name: string; + /** ReloadDocumentRequest gcsSource. */ + public gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSource|null); + + /** ReloadDocumentRequest importGcsCustomMetadata. */ + public importGcsCustomMetadata: boolean; + + /** ReloadDocumentRequest source. */ + public source?: "gcsSource"; + /** - * Creates a new GetConversationProfileRequest instance using the specified properties. + * Creates a new ReloadDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetConversationProfileRequest instance + * @returns ReloadDocumentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; /** - * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. - * @param message GetConversationProfileRequest message or plain object to encode + * Encodes the specified ReloadDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. + * @param message ReloadDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. - * @param message GetConversationProfileRequest message or plain object to encode + * Encodes the specified ReloadDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. + * @param message ReloadDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer. + * Decodes a ReloadDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConversationProfileRequest + * @returns ReloadDocumentRequest * @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.v2beta1.GetConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ReloadDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConversationProfileRequest + * @returns ReloadDocumentRequest * @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.v2beta1.GetConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; /** - * Verifies a GetConversationProfileRequest message. + * Verifies a ReloadDocumentRequest 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 GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConversationProfileRequest + * @returns ReloadDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; /** - * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. - * @param message GetConversationProfileRequest + * Creates a plain object from a ReloadDocumentRequest message. Also converts values to other types if specified. + * @param message ReloadDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.GetConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ReloadDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConversationProfileRequest to JSON. + * Converts this ReloadDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateConversationProfileRequest. */ - interface ICreateConversationProfileRequest { - - /** CreateConversationProfileRequest parent */ - parent?: (string|null); + /** Properties of a GcsSources. */ + interface IGcsSources { - /** CreateConversationProfileRequest conversationProfile */ - conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); + /** GcsSources uris */ + uris?: (string[]|null); } - /** Represents a CreateConversationProfileRequest. */ - class CreateConversationProfileRequest implements ICreateConversationProfileRequest { + /** Represents a GcsSources. */ + class GcsSources implements IGcsSources { /** - * Constructs a new CreateConversationProfileRequest. + * Constructs a new GcsSources. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest); - - /** CreateConversationProfileRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2beta1.IGcsSources); - /** CreateConversationProfileRequest conversationProfile. */ - public conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); + /** GcsSources uris. */ + public uris: string[]; /** - * Creates a new CreateConversationProfileRequest instance using the specified properties. + * Creates a new GcsSources instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationProfileRequest instance + * @returns GcsSources instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGcsSources): google.cloud.dialogflow.v2beta1.GcsSources; /** - * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. - * @param message CreateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. + * @param message GcsSources message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. - * @param message CreateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. + * @param message GcsSources message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsSources message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationProfileRequest + * @returns GcsSources * @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.v2beta1.CreateConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GcsSources; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSources message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationProfileRequest + * @returns GcsSources * @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.v2beta1.CreateConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GcsSources; /** - * Verifies a CreateConversationProfileRequest message. + * Verifies a GcsSources 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 CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationProfileRequest + * @returns GcsSources */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GcsSources; /** - * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. - * @param message CreateConversationProfileRequest + * Creates a plain object from a GcsSources message. Also converts values to other types if specified. + * @param message GcsSources * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GcsSources, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationProfileRequest to JSON. + * Converts this GcsSources to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateConversationProfileRequest. */ - interface IUpdateConversationProfileRequest { - - /** UpdateConversationProfileRequest conversationProfile */ - conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); + /** Properties of a GcsSource. */ + interface IGcsSource { - /** UpdateConversationProfileRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GcsSource uri */ + uri?: (string|null); } - /** Represents an UpdateConversationProfileRequest. */ - class UpdateConversationProfileRequest implements IUpdateConversationProfileRequest { + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { /** - * Constructs a new UpdateConversationProfileRequest. + * Constructs a new GcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest); - - /** UpdateConversationProfileRequest conversationProfile. */ - public conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGcsSource); - /** UpdateConversationProfileRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GcsSource uri. */ + public uri: string; /** - * Creates a new UpdateConversationProfileRequest instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateConversationProfileRequest instance + * @returns GcsSource instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGcsSource): google.cloud.dialogflow.v2beta1.GcsSource; /** - * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. - * @param message UpdateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. - * @param message UpdateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateConversationProfileRequest + * @returns GcsSource * @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.v2beta1.UpdateConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GcsSource; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateConversationProfileRequest + * @returns GcsSource * @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.v2beta1.UpdateConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GcsSource; /** - * Verifies an UpdateConversationProfileRequest message. + * Verifies a GcsSource 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 UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateConversationProfileRequest + * @returns GcsSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GcsSource; /** - * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. - * @param message UpdateConversationProfileRequest + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateConversationProfileRequest to JSON. + * Converts this GcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteConversationProfileRequest. */ - interface IDeleteConversationProfileRequest { + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** DeleteConversationProfileRequest name */ - name?: (string|null); + /** GcsDestination uri */ + uri?: (string|null); } - /** Represents a DeleteConversationProfileRequest. */ - class DeleteConversationProfileRequest implements IDeleteConversationProfileRequest { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new DeleteConversationProfileRequest. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGcsDestination); - /** DeleteConversationProfileRequest name. */ - public name: string; + /** GcsDestination uri. */ + public uri: string; /** - * Creates a new DeleteConversationProfileRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationProfileRequest instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGcsDestination): google.cloud.dialogflow.v2beta1.GcsDestination; /** - * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. - * @param message DeleteConversationProfileRequest message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. - * @param message DeleteConversationProfileRequest message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationProfileRequest + * @returns GcsDestination * @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.v2beta1.DeleteConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GcsDestination; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationProfileRequest + * @returns GcsDestination * @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.v2beta1.DeleteConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GcsDestination; /** - * Verifies a DeleteConversationProfileRequest message. + * Verifies a GcsDestination 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 DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationProfileRequest + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GcsDestination; /** - * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. - * @param message DeleteConversationProfileRequest + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationProfileRequest to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Represents a Documents */ - class Documents extends $protobuf.rpc.Service { + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { /** - * Constructs a new Documents 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 @@ -56118,1640 +56562,1865 @@ export namespace google { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates new Documents 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): Documents; - - /** - * Calls ListDocuments. - * @param request ListDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDocumentsResponse - */ - public listDocuments(request: google.cloud.dialogflow.v2beta1.IListDocumentsRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ListDocumentsCallback): void; - - /** - * Calls ListDocuments. - * @param request ListDocumentsRequest message or plain object - * @returns Promise - */ - public listDocuments(request: google.cloud.dialogflow.v2beta1.IListDocumentsRequest): Promise; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Environments; /** - * Calls GetDocument. - * @param request GetDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Document + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse */ - public getDocument(request: google.cloud.dialogflow.v2beta1.IGetDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.GetDocumentCallback): void; + public listEnvironments(request: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, callback: google.cloud.dialogflow.v2beta1.Environments.ListEnvironmentsCallback): void; /** - * Calls GetDocument. - * @param request GetDocumentRequest message or plain object + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object * @returns Promise */ - public getDocument(request: google.cloud.dialogflow.v2beta1.IGetDocumentRequest): Promise; + public listEnvironments(request: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest): Promise; /** - * Calls CreateDocument. - * @param request CreateDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment */ - public createDocument(request: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.CreateDocumentCallback): void; + public getEnvironment(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentCallback): void; /** - * Calls CreateDocument. - * @param request CreateDocumentRequest message or plain object + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object * @returns Promise */ - public createDocument(request: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest): Promise; + public getEnvironment(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest): Promise; /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment */ - public importDocuments(request: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ImportDocumentsCallback): void; + public createEnvironment(request: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.CreateEnvironmentCallback): void; /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object * @returns Promise */ - public importDocuments(request: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest): Promise; + public createEnvironment(request: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest): Promise; /** - * Calls DeleteDocument. - * @param request DeleteDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment */ - public deleteDocument(request: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.DeleteDocumentCallback): void; + public updateEnvironment(request: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironmentCallback): void; /** - * Calls DeleteDocument. - * @param request DeleteDocumentRequest message or plain object + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object * @returns Promise */ - public deleteDocument(request: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest): Promise; + public updateEnvironment(request: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest): Promise; /** - * Calls UpdateDocument. - * @param request UpdateDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public updateDocument(request: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.UpdateDocumentCallback): void; + public deleteEnvironment(request: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, callback: google.cloud.dialogflow.v2beta1.Environments.DeleteEnvironmentCallback): void; /** - * Calls UpdateDocument. - * @param request UpdateDocumentRequest message or plain object + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object * @returns Promise */ - public updateDocument(request: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest): Promise; + public deleteEnvironment(request: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest): Promise; /** - * Calls ReloadDocument. - * @param request ReloadDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Calls GetEnvironmentHistory. + * @param request GetEnvironmentHistoryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EnvironmentHistory */ - public reloadDocument(request: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, callback: google.cloud.dialogflow.v2beta1.Documents.ReloadDocumentCallback): void; + public getEnvironmentHistory(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, callback: google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistoryCallback): void; /** - * Calls ReloadDocument. - * @param request ReloadDocumentRequest message or plain object + * Calls GetEnvironmentHistory. + * @param request GetEnvironmentHistoryRequest message or plain object * @returns Promise */ - public reloadDocument(request: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest): Promise; + public getEnvironmentHistory(request: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest): Promise; } - namespace Documents { - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#listDocuments}. - * @param error Error, if any - * @param [response] ListDocumentsResponse - */ - type ListDocumentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListDocumentsResponse) => void; + namespace Environments { /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#getDocument}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#listEnvironments}. * @param error Error, if any - * @param [response] Document + * @param [response] ListEnvironmentsResponse */ - type GetDocumentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Document) => void; + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#createDocument}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironment}. * @param error Error, if any - * @param [response] Operation + * @param [response] Environment */ - type CreateDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#importDocuments}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#createEnvironment}. * @param error Error, if any - * @param [response] Operation + * @param [response] Environment */ - type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type CreateEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#deleteDocument}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#updateEnvironment}. * @param error Error, if any - * @param [response] Operation + * @param [response] Environment */ - type DeleteDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Environment) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#updateDocument}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#deleteEnvironment}. * @param error Error, if any - * @param [response] Operation + * @param [response] Empty */ - type UpdateDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#reloadDocument}. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironmentHistory}. * @param error Error, if any - * @param [response] Operation + * @param [response] EnvironmentHistory */ - type ReloadDocumentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + type GetEnvironmentHistoryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.EnvironmentHistory) => void; } - /** Properties of a Document. */ - interface IDocument { + /** Properties of an Environment. */ + interface IEnvironment { - /** Document name */ + /** Environment name */ name?: (string|null); - /** Document displayName */ - displayName?: (string|null); + /** Environment description */ + description?: (string|null); - /** Document mimeType */ - mimeType?: (string|null); + /** Environment agentVersion */ + agentVersion?: (string|null); - /** Document knowledgeTypes */ - knowledgeTypes?: (google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]|null); + /** Environment state */ + state?: (google.cloud.dialogflow.v2beta1.Environment.State|keyof typeof google.cloud.dialogflow.v2beta1.Environment.State|null); - /** Document contentUri */ - contentUri?: (string|null); + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** Document content */ - content?: (string|null); + /** Environment textToSpeechSettings */ + textToSpeechSettings?: (google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null); - /** Document rawContent */ - rawContent?: (Uint8Array|string|null); + /** Environment fulfillment */ + fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); + } - /** Document enableAutoReload */ - enableAutoReload?: (boolean|null); + /** Represents an Environment. */ + class Environment implements IEnvironment { - /** Document latestReloadStatus */ - latestReloadStatus?: (google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null); + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IEnvironment); - /** Document metadata */ - metadata?: ({ [k: string]: string }|null); - } + /** Environment name. */ + public name: string; - /** Represents a Document. */ - class Document implements IDocument { + /** Environment description. */ + public description: string; + + /** Environment agentVersion. */ + public agentVersion: string; + + /** Environment state. */ + public state: (google.cloud.dialogflow.v2beta1.Environment.State|keyof typeof google.cloud.dialogflow.v2beta1.Environment.State); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment textToSpeechSettings. */ + public textToSpeechSettings?: (google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null); + + /** Environment fulfillment. */ + public fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); /** - * Constructs a new Document. + * Creates a new Environment instance using the specified properties. * @param [properties] Properties to set + * @returns Environment instance */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDocument); + public static create(properties?: google.cloud.dialogflow.v2beta1.IEnvironment): google.cloud.dialogflow.v2beta1.Environment; - /** Document name. */ - public name: string; + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Document displayName. */ - public displayName: string; + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Document mimeType. */ - public mimeType: string; + /** + * 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 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.v2beta1.Environment; - /** Document knowledgeTypes. */ - public knowledgeTypes: google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]; + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.v2beta1.Environment; - /** Document contentUri. */ - public contentUri?: (string|null); + /** + * 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); - /** Document content. */ - public content?: (string|null); + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Environment; - /** Document rawContent. */ - public rawContent?: (Uint8Array|string|null); + /** + * 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.v2beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Document enableAutoReload. */ - public enableAutoReload: boolean; + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STOPPED = 1, + LOADING = 2, + RUNNING = 3 + } + } + + /** Properties of a TextToSpeechSettings. */ + interface ITextToSpeechSettings { + + /** TextToSpeechSettings enableTextToSpeech */ + enableTextToSpeech?: (boolean|null); + + /** TextToSpeechSettings outputAudioEncoding */ + outputAudioEncoding?: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null); + + /** TextToSpeechSettings sampleRateHertz */ + sampleRateHertz?: (number|null); + + /** TextToSpeechSettings synthesizeSpeechConfigs */ + synthesizeSpeechConfigs?: ({ [k: string]: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig }|null); + } + + /** Represents a TextToSpeechSettings. */ + class TextToSpeechSettings implements ITextToSpeechSettings { + + /** + * Constructs a new TextToSpeechSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings); + + /** TextToSpeechSettings enableTextToSpeech. */ + public enableTextToSpeech: boolean; - /** Document latestReloadStatus. */ - public latestReloadStatus?: (google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null); + /** TextToSpeechSettings outputAudioEncoding. */ + public outputAudioEncoding: (google.cloud.dialogflow.v2beta1.OutputAudioEncoding|keyof typeof google.cloud.dialogflow.v2beta1.OutputAudioEncoding); - /** Document metadata. */ - public metadata: { [k: string]: string }; + /** TextToSpeechSettings sampleRateHertz. */ + public sampleRateHertz: number; - /** Document source. */ - public source?: ("contentUri"|"content"|"rawContent"); + /** TextToSpeechSettings synthesizeSpeechConfigs. */ + public synthesizeSpeechConfigs: { [k: string]: google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig }; /** - * Creates a new Document instance using the specified properties. + * Creates a new TextToSpeechSettings instance using the specified properties. * @param [properties] Properties to set - * @returns Document instance + * @returns TextToSpeechSettings instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDocument): google.cloud.dialogflow.v2beta1.Document; + public static create(properties?: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * @param message TextToSpeechSettings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ITextToSpeechSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a TextToSpeechSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Document + * @returns TextToSpeechSettings * @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.v2beta1.Document; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Document + * @returns TextToSpeechSettings * @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.v2beta1.Document; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; /** - * Verifies a Document message. + * Verifies a TextToSpeechSettings 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 Document message from a plain object. Also converts values to their respective internal types. + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Document + * @returns TextToSpeechSettings */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Document; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.TextToSpeechSettings; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. - * @param message Document + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * @param message TextToSpeechSettings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.TextToSpeechSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Document to JSON. + * Converts this TextToSpeechSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace Document { - - /** KnowledgeType enum. */ - enum KnowledgeType { - KNOWLEDGE_TYPE_UNSPECIFIED = 0, - FAQ = 1, - EXTRACTIVE_QA = 2, - ARTICLE_SUGGESTION = 3, - SMART_REPLY = 4 - } - - /** Properties of a ReloadStatus. */ - interface IReloadStatus { - - /** ReloadStatus time */ - time?: (google.protobuf.ITimestamp|null); - - /** ReloadStatus status */ - status?: (google.rpc.IStatus|null); - } - - /** Represents a ReloadStatus. */ - class ReloadStatus implements IReloadStatus { - - /** - * Constructs a new ReloadStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.Document.IReloadStatus); - - /** ReloadStatus time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** ReloadStatus status. */ - public status?: (google.rpc.IStatus|null); - - /** - * Creates a new ReloadStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ReloadStatus instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.Document.IReloadStatus): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; - - /** - * Encodes the specified ReloadStatus message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. - * @param message ReloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.Document.IReloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReloadStatus message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. - * @param message ReloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Document.IReloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReloadStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReloadStatus - * @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.v2beta1.Document.ReloadStatus; - - /** - * Decodes a ReloadStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReloadStatus - * @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.v2beta1.Document.ReloadStatus; - - /** - * Verifies a ReloadStatus 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 ReloadStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReloadStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Document.ReloadStatus; - - /** - * Creates a plain object from a ReloadStatus message. Also converts values to other types if specified. - * @param message ReloadStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.Document.ReloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { - /** - * Converts this ReloadStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** ListEnvironmentsRequest parent */ + parent?: (string|null); - /** Properties of a GetDocumentRequest. */ - interface IGetDocumentRequest { + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); - /** GetDocumentRequest name */ - name?: (string|null); + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetDocumentRequest. */ - class GetDocumentRequest implements IGetDocumentRequest { + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { /** - * Constructs a new GetDocumentRequest. + * Constructs a new ListEnvironmentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IGetDocumentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest); - /** GetDocumentRequest name. */ - public name: string; + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetDocumentRequest instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetDocumentRequest instance + * @returns ListEnvironmentsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IGetDocumentRequest): google.cloud.dialogflow.v2beta1.GetDocumentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; /** - * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. - * @param message GetDocumentRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. - * @param message GetDocumentRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer. + * 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 GetDocumentRequest + * @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.v2beta1.GetDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDocumentRequest + * @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.v2beta1.GetDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; /** - * Verifies a GetDocumentRequest message. + * 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 GetDocumentRequest 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. * @param object Plain object - * @returns GetDocumentRequest + * @returns ListEnvironmentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; /** - * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. - * @param message GetDocumentRequest + * 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.v2beta1.GetDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDocumentRequest to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDocumentsRequest. */ - interface IListDocumentsRequest { - - /** ListDocumentsRequest parent */ - parent?: (string|null); - - /** ListDocumentsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { - /** ListDocumentsRequest pageToken */ - pageToken?: (string|null); + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.dialogflow.v2beta1.IEnvironment[]|null); - /** ListDocumentsRequest filter */ - filter?: (string|null); + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListDocumentsRequest. */ - class ListDocumentsRequest implements IListDocumentsRequest { + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { /** - * Constructs a new ListDocumentsRequest. + * Constructs a new ListEnvironmentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsRequest); - - /** ListDocumentsRequest parent. */ - public parent: string; - - /** ListDocumentsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse); - /** ListDocumentsRequest pageToken. */ - public pageToken: string; + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.dialogflow.v2beta1.IEnvironment[]; - /** ListDocumentsRequest filter. */ - public filter: string; + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListDocumentsRequest instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListDocumentsRequest instance + * @returns ListEnvironmentsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsRequest): google.cloud.dialogflow.v2beta1.ListDocumentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; /** - * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. - * @param message ListDocumentsRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. - * @param message ListDocumentsRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer. + * 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 ListDocumentsRequest + * @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.v2beta1.ListDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListDocumentsRequest + * @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.v2beta1.ListDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; /** - * Verifies a ListDocumentsRequest message. + * 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); /** - * Creates a ListDocumentsRequest 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. * @param object Plain object - * @returns ListDocumentsRequest + * @returns ListEnvironmentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; /** - * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. - * @param message ListDocumentsRequest + * 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.v2beta1.ListDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDocumentsRequest to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ListDocumentsResponse. */ - interface IListDocumentsResponse { - - /** ListDocumentsResponse documents */ - documents?: (google.cloud.dialogflow.v2beta1.IDocument[]|null); + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { - /** ListDocumentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetEnvironmentRequest name */ + name?: (string|null); } - /** Represents a ListDocumentsResponse. */ - class ListDocumentsResponse implements IListDocumentsResponse { + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { /** - * Constructs a new ListDocumentsResponse. + * Constructs a new GetEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsResponse); - - /** ListDocumentsResponse documents. */ - public documents: google.cloud.dialogflow.v2beta1.IDocument[]; + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest); - /** ListDocumentsResponse nextPageToken. */ - public nextPageToken: string; + /** GetEnvironmentRequest name. */ + public name: string; /** - * Creates a new ListDocumentsResponse instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListDocumentsResponse instance + * @returns GetEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IListDocumentsResponse): google.cloud.dialogflow.v2beta1.ListDocumentsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; /** - * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. - * @param message ListDocumentsResponse message or plain object to encode + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. - * @param message ListDocumentsResponse message or plain object to encode + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListDocumentsResponse 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 ListDocumentsResponse + * @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.v2beta1.ListDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; /** - * Decodes a ListDocumentsResponse 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 ListDocumentsResponse + * @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.v2beta1.ListDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; /** - * Verifies a ListDocumentsResponse 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 ListDocumentsResponse 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 ListDocumentsResponse + * @returns GetEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ListDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEnvironmentRequest; /** - * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. - * @param message ListDocumentsResponse + * 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.v2beta1.ListDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListDocumentsResponse to JSON. + * Converts this GetEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CreateDocumentRequest. */ - interface ICreateDocumentRequest { + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { - /** CreateDocumentRequest parent */ + /** CreateEnvironmentRequest parent */ parent?: (string|null); - /** CreateDocumentRequest document */ - document?: (google.cloud.dialogflow.v2beta1.IDocument|null); + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); - /** CreateDocumentRequest importGcsCustomMetadata */ - importGcsCustomMetadata?: (boolean|null); + /** CreateEnvironmentRequest environmentId */ + environmentId?: (string|null); } - /** Represents a CreateDocumentRequest. */ - class CreateDocumentRequest implements ICreateDocumentRequest { + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { /** - * Constructs a new CreateDocumentRequest. + * Constructs a new CreateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest); - /** CreateDocumentRequest parent. */ + /** CreateEnvironmentRequest parent. */ public parent: string; - /** CreateDocumentRequest document. */ - public document?: (google.cloud.dialogflow.v2beta1.IDocument|null); + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); - /** CreateDocumentRequest importGcsCustomMetadata. */ - public importGcsCustomMetadata: boolean; + /** CreateEnvironmentRequest environmentId. */ + public environmentId: string; /** - * Creates a new CreateDocumentRequest instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateDocumentRequest instance + * @returns CreateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateDocumentRequest): google.cloud.dialogflow.v2beta1.CreateDocumentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; /** - * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. - * @param message CreateDocumentRequest message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. - * @param message CreateDocumentRequest message or plain object to encode + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateDocumentRequest 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 CreateDocumentRequest + * @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.v2beta1.CreateDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; /** - * Decodes a CreateDocumentRequest 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 CreateDocumentRequest + * @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.v2beta1.CreateDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; /** - * Verifies a CreateDocumentRequest 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 CreateDocumentRequest 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 CreateDocumentRequest + * @returns CreateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest; /** - * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. - * @param message CreateDocumentRequest + * 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.v2beta1.CreateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDocumentRequest to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDocumentsRequest. */ - interface IImportDocumentsRequest { - - /** ImportDocumentsRequest parent */ - parent?: (string|null); + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { - /** ImportDocumentsRequest gcsSource */ - gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSources|null); + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); - /** ImportDocumentsRequest documentTemplate */ - documentTemplate?: (google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null); + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ImportDocumentsRequest importGcsCustomMetadata */ - importGcsCustomMetadata?: (boolean|null); + /** UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges */ + allowLoadToDraftAndDiscardChanges?: (boolean|null); } - /** Represents an ImportDocumentsRequest. */ - class ImportDocumentsRequest implements IImportDocumentsRequest { - - /** - * Constructs a new ImportDocumentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest); - - /** ImportDocumentsRequest parent. */ - public parent: string; + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { - /** ImportDocumentsRequest gcsSource. */ - public gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSources|null); + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest); - /** ImportDocumentsRequest documentTemplate. */ - public documentTemplate?: (google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null); + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.dialogflow.v2beta1.IEnvironment|null); - /** ImportDocumentsRequest importGcsCustomMetadata. */ - public importGcsCustomMetadata: boolean; + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ImportDocumentsRequest source. */ - public source?: "gcsSource"; + /** UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges. */ + public allowLoadToDraftAndDiscardChanges: boolean; /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsRequest instance + * @returns UpdateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsRequest): google.cloud.dialogflow.v2beta1.ImportDocumentsRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsRequest 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 ImportDocumentsRequest + * @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.v2beta1.ImportDocumentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; /** - * Decodes an ImportDocumentsRequest 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 ImportDocumentsRequest + * @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.v2beta1.ImportDocumentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; /** - * Verifies an ImportDocumentsRequest 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 an ImportDocumentsRequest 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 ImportDocumentsRequest + * @returns UpdateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest; /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @param message ImportDocumentsRequest + * 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.v2beta1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDocumentTemplate. */ - interface IImportDocumentTemplate { - - /** ImportDocumentTemplate mimeType */ - mimeType?: (string|null); - - /** ImportDocumentTemplate knowledgeTypes */ - knowledgeTypes?: (google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]|null); + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { - /** ImportDocumentTemplate metadata */ - metadata?: ({ [k: string]: string }|null); + /** DeleteEnvironmentRequest name */ + name?: (string|null); } - /** Represents an ImportDocumentTemplate. */ - class ImportDocumentTemplate implements IImportDocumentTemplate { + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { /** - * Constructs a new ImportDocumentTemplate. + * Constructs a new DeleteEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate); - - /** ImportDocumentTemplate mimeType. */ - public mimeType: string; - - /** ImportDocumentTemplate knowledgeTypes. */ - public knowledgeTypes: google.cloud.dialogflow.v2beta1.Document.KnowledgeType[]; + constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest); - /** ImportDocumentTemplate metadata. */ - public metadata: { [k: string]: string }; + /** DeleteEnvironmentRequest name. */ + public name: string; /** - * Creates a new ImportDocumentTemplate instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentTemplate instance + * @returns DeleteEnvironmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentTemplate): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; + public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; /** - * Encodes the specified ImportDocumentTemplate message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. - * @param message ImportDocumentTemplate message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IImportDocumentTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. - * @param message ImportDocumentTemplate message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IImportDocumentTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentTemplate 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 ImportDocumentTemplate + * @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.v2beta1.ImportDocumentTemplate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; /** - * Decodes an ImportDocumentTemplate 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 ImportDocumentTemplate + * @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.v2beta1.ImportDocumentTemplate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; /** - * Verifies an ImportDocumentTemplate 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 an ImportDocumentTemplate 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 ImportDocumentTemplate + * @returns DeleteEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentTemplate; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest; /** - * Creates a plain object from an ImportDocumentTemplate message. Also converts values to other types if specified. - * @param message ImportDocumentTemplate + * 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.v2beta1.ImportDocumentTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentTemplate to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImportDocumentsResponse. */ - interface IImportDocumentsResponse { + /** Properties of a GetEnvironmentHistoryRequest. */ + interface IGetEnvironmentHistoryRequest { - /** ImportDocumentsResponse warnings */ - warnings?: (google.rpc.IStatus[]|null); + /** GetEnvironmentHistoryRequest parent */ + parent?: (string|null); + + /** GetEnvironmentHistoryRequest pageSize */ + pageSize?: (number|null); + + /** GetEnvironmentHistoryRequest pageToken */ + pageToken?: (string|null); } - /** Represents an ImportDocumentsResponse. */ - class ImportDocumentsResponse implements IImportDocumentsResponse { + /** Represents a GetEnvironmentHistoryRequest. */ + class GetEnvironmentHistoryRequest implements IGetEnvironmentHistoryRequest { /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new GetEnvironmentHistoryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest); - /** ImportDocumentsResponse warnings. */ - public warnings: google.rpc.IStatus[]; + /** GetEnvironmentHistoryRequest parent. */ + public parent: string; + + /** GetEnvironmentHistoryRequest pageSize. */ + public pageSize: number; + + /** GetEnvironmentHistoryRequest pageToken. */ + public pageToken: string; /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates a new GetEnvironmentHistoryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsResponse instance + * @returns GetEnvironmentHistoryRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse): google.cloud.dialogflow.v2beta1.ImportDocumentsResponse; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified GetEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. + * @param message GetEnvironmentHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified GetEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. + * @param message GetEnvironmentHistoryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsResponse + * @returns GetEnvironmentHistoryRequest * @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.v2beta1.ImportDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsResponse + * @returns GetEnvironmentHistoryRequest * @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.v2beta1.ImportDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; /** - * Verifies an ImportDocumentsResponse message. + * Verifies a GetEnvironmentHistoryRequest 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 ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsResponse + * @returns GetEnvironmentHistoryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ImportDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. - * @param message ImportDocumentsResponse + * Creates a plain object from a GetEnvironmentHistoryRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentHistoryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this GetEnvironmentHistoryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a DeleteDocumentRequest. */ - interface IDeleteDocumentRequest { + /** Properties of an EnvironmentHistory. */ + interface IEnvironmentHistory { - /** DeleteDocumentRequest name */ - name?: (string|null); + /** EnvironmentHistory parent */ + parent?: (string|null); + + /** EnvironmentHistory entries */ + entries?: (google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry[]|null); + + /** EnvironmentHistory nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteDocumentRequest. */ - class DeleteDocumentRequest implements IDeleteDocumentRequest { + /** Represents an EnvironmentHistory. */ + class EnvironmentHistory implements IEnvironmentHistory { /** - * Constructs a new DeleteDocumentRequest. + * Constructs a new EnvironmentHistory. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IEnvironmentHistory); - /** DeleteDocumentRequest name. */ - public name: string; + /** EnvironmentHistory parent. */ + public parent: string; + + /** EnvironmentHistory entries. */ + public entries: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry[]; + + /** EnvironmentHistory nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteDocumentRequest instance using the specified properties. + * Creates a new EnvironmentHistory instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDocumentRequest instance + * @returns EnvironmentHistory instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IEnvironmentHistory): google.cloud.dialogflow.v2beta1.EnvironmentHistory; /** - * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. - * @param message DeleteDocumentRequest message or plain object to encode + * Encodes the specified EnvironmentHistory message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. + * @param message EnvironmentHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IEnvironmentHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. - * @param message DeleteDocumentRequest message or plain object to encode + * Encodes the specified EnvironmentHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. + * @param message EnvironmentHistory message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IEnvironmentHistory, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer. + * Decodes an EnvironmentHistory message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDocumentRequest + * @returns EnvironmentHistory * @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.v2beta1.DeleteDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.EnvironmentHistory; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes an EnvironmentHistory message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDocumentRequest + * @returns EnvironmentHistory * @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.v2beta1.DeleteDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.EnvironmentHistory; /** - * Verifies a DeleteDocumentRequest message. + * Verifies an EnvironmentHistory 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 DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnvironmentHistory message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDocumentRequest + * @returns EnvironmentHistory */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EnvironmentHistory; /** - * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. - * @param message DeleteDocumentRequest + * Creates a plain object from an EnvironmentHistory message. Also converts values to other types if specified. + * @param message EnvironmentHistory * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.DeleteDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDocumentRequest to JSON. + * Converts this EnvironmentHistory to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateDocumentRequest. */ - interface IUpdateDocumentRequest { + namespace EnvironmentHistory { - /** UpdateDocumentRequest document */ - document?: (google.cloud.dialogflow.v2beta1.IDocument|null); + /** Properties of an Entry. */ + interface IEntry { - /** UpdateDocumentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Entry agentVersion */ + agentVersion?: (string|null); + + /** Entry description */ + description?: (string|null); + + /** Entry createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry); + + /** Entry agentVersion. */ + public agentVersion: string; + + /** Entry description. */ + public description: string; + + /** Entry createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry): google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @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.v2beta1.EnvironmentHistory.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @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.v2beta1.EnvironmentHistory.Entry; + + /** + * Verifies an Entry 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } - /** Represents an UpdateDocumentRequest. */ - class UpdateDocumentRequest implements IUpdateDocumentRequest { + /** Represents a Fulfillments */ + class Fulfillments extends $protobuf.rpc.Service { /** - * Constructs a new UpdateDocumentRequest. + * Constructs a new Fulfillments 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 Fulfillments 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): Fulfillments; + + /** + * Calls GetFulfillment. + * @param request GetFulfillmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Fulfillment + */ + public getFulfillment(request: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, callback: google.cloud.dialogflow.v2beta1.Fulfillments.GetFulfillmentCallback): void; + + /** + * Calls GetFulfillment. + * @param request GetFulfillmentRequest message or plain object + * @returns Promise + */ + public getFulfillment(request: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest): Promise; + + /** + * Calls UpdateFulfillment. + * @param request UpdateFulfillmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Fulfillment + */ + public updateFulfillment(request: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, callback: google.cloud.dialogflow.v2beta1.Fulfillments.UpdateFulfillmentCallback): void; + + /** + * Calls UpdateFulfillment. + * @param request UpdateFulfillmentRequest message or plain object + * @returns Promise + */ + public updateFulfillment(request: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest): Promise; + } + + namespace Fulfillments { + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#getFulfillment}. + * @param error Error, if any + * @param [response] Fulfillment + */ + type GetFulfillmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Fulfillment) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#updateFulfillment}. + * @param error Error, if any + * @param [response] Fulfillment + */ + type UpdateFulfillmentCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.Fulfillment) => void; + } + + /** Properties of a Fulfillment. */ + interface IFulfillment { + + /** Fulfillment name */ + name?: (string|null); + + /** Fulfillment displayName */ + displayName?: (string|null); + + /** Fulfillment genericWebService */ + genericWebService?: (google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null); + + /** Fulfillment enabled */ + enabled?: (boolean|null); + + /** Fulfillment features */ + features?: (google.cloud.dialogflow.v2beta1.Fulfillment.IFeature[]|null); + } + + /** Represents a Fulfillment. */ + class Fulfillment implements IFulfillment { + + /** + * Constructs a new Fulfillment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IFulfillment); - /** UpdateDocumentRequest document. */ - public document?: (google.cloud.dialogflow.v2beta1.IDocument|null); + /** Fulfillment name. */ + public name: string; + + /** Fulfillment displayName. */ + public displayName: string; + + /** Fulfillment genericWebService. */ + public genericWebService?: (google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null); + + /** Fulfillment enabled. */ + public enabled: boolean; + + /** Fulfillment features. */ + public features: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature[]; - /** UpdateDocumentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Fulfillment fulfillment. */ + public fulfillment?: "genericWebService"; /** - * Creates a new UpdateDocumentRequest instance using the specified properties. + * Creates a new Fulfillment instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDocumentRequest instance + * @returns Fulfillment instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IFulfillment): google.cloud.dialogflow.v2beta1.Fulfillment; /** - * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. - * @param message UpdateDocumentRequest message or plain object to encode + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. - * @param message UpdateDocumentRequest message or plain object to encode + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.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.v2beta1.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IFulfillment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer. + * 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 UpdateDocumentRequest + * @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.v2beta1.UpdateDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.Fulfillment; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDocumentRequest + * @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.v2beta1.UpdateDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.Fulfillment; /** - * Verifies an UpdateDocumentRequest message. + * 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 an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDocumentRequest + * @returns Fulfillment */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Fulfillment; /** - * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. - * @param message UpdateDocumentRequest + * 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.v2beta1.UpdateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.Fulfillment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDocumentRequest to JSON. + * Converts this Fulfillment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a KnowledgeOperationMetadata. */ - interface IKnowledgeOperationMetadata { + namespace Fulfillment { - /** KnowledgeOperationMetadata state */ - state?: (google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|null); + /** Properties of a GenericWebService. */ + interface IGenericWebService { - /** KnowledgeOperationMetadata knowledgeBase */ - knowledgeBase?: (string|null); - } + /** GenericWebService uri */ + uri?: (string|null); - /** Represents a KnowledgeOperationMetadata. */ - class KnowledgeOperationMetadata implements IKnowledgeOperationMetadata { + /** GenericWebService username */ + username?: (string|null); - /** - * Constructs a new KnowledgeOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata); + /** GenericWebService password */ + password?: (string|null); - /** KnowledgeOperationMetadata state. */ - public state: (google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State); + /** GenericWebService requestHeaders */ + requestHeaders?: ({ [k: string]: string }|null); - /** KnowledgeOperationMetadata knowledgeBase. */ - public knowledgeBase: string; + /** GenericWebService isCloudFunction */ + isCloudFunction?: (boolean|null); + } - /** - * Creates a new KnowledgeOperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns KnowledgeOperationMetadata instance - */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; + /** Represents a GenericWebService. */ + class GenericWebService implements IGenericWebService { - /** - * Encodes the specified KnowledgeOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. - * @param message KnowledgeOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GenericWebService. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService); - /** - * Encodes the specified KnowledgeOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. - * @param message KnowledgeOperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** GenericWebService uri. */ + public uri: string; - /** - * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KnowledgeOperationMetadata - * @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.v2beta1.KnowledgeOperationMetadata; + /** GenericWebService username. */ + public username: string; - /** - * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KnowledgeOperationMetadata - * @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.v2beta1.KnowledgeOperationMetadata; + /** GenericWebService password. */ + public password: string; + + /** GenericWebService requestHeaders. */ + public requestHeaders: { [k: string]: string }; + + /** GenericWebService isCloudFunction. */ + public isCloudFunction: boolean; + + /** + * Creates a new GenericWebService instance using the specified properties. + * @param [properties] Properties to set + * @returns GenericWebService instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService): google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService; + + /** + * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.IGenericWebService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.GenericWebService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenericWebService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Feature. */ + interface IFeature { + + /** Feature type */ + type?: (google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|keyof typeof google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|null); + } + + /** Represents a Feature. */ + class Feature implements IFeature { + + /** + * Constructs a new Feature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature); + + /** Feature type. */ + public type: (google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|keyof typeof google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type); + + /** + * Creates a new Feature instance using the specified properties. + * @param [properties] Properties to set + * @returns Feature instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature): google.cloud.dialogflow.v2beta1.Fulfillment.Feature; + + /** + * Encodes the specified Feature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. + * @param message Feature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. + * @param message Feature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.Fulfillment.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Feature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Feature + * @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.v2beta1.Fulfillment.Feature; - /** - * Verifies a KnowledgeOperationMetadata 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 Feature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Feature + * @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.v2beta1.Fulfillment.Feature; - /** - * Creates a KnowledgeOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KnowledgeOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; + /** + * Verifies a Feature 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 KnowledgeOperationMetadata message. Also converts values to other types if specified. - * @param message KnowledgeOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Feature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Feature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.Fulfillment.Feature; - /** - * Converts this KnowledgeOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from a Feature message. Also converts values to other types if specified. + * @param message Feature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.Fulfillment.Feature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace KnowledgeOperationMetadata { + /** + * Converts this Feature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - DONE = 3 + namespace Feature { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SMALLTALK = 1 + } } } - /** Properties of a ReloadDocumentRequest. */ - interface IReloadDocumentRequest { + /** Properties of a GetFulfillmentRequest. */ + interface IGetFulfillmentRequest { - /** ReloadDocumentRequest name */ + /** GetFulfillmentRequest name */ name?: (string|null); - - /** ReloadDocumentRequest gcsSource */ - gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSource|null); - - /** ReloadDocumentRequest importGcsCustomMetadata */ - importGcsCustomMetadata?: (boolean|null); } - /** Represents a ReloadDocumentRequest. */ - class ReloadDocumentRequest implements IReloadDocumentRequest { + /** Represents a GetFulfillmentRequest. */ + class GetFulfillmentRequest implements IGetFulfillmentRequest { /** - * Constructs a new ReloadDocumentRequest. + * Constructs a new GetFulfillmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest); - /** ReloadDocumentRequest name. */ + /** GetFulfillmentRequest name. */ public name: string; - /** ReloadDocumentRequest gcsSource. */ - public gcsSource?: (google.cloud.dialogflow.v2beta1.IGcsSource|null); - - /** ReloadDocumentRequest importGcsCustomMetadata. */ - public importGcsCustomMetadata: boolean; - - /** ReloadDocumentRequest source. */ - public source?: "gcsSource"; - /** - * Creates a new ReloadDocumentRequest instance using the specified properties. + * Creates a new GetFulfillmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReloadDocumentRequest instance + * @returns GetFulfillmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; + public static create(properties?: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; /** - * Encodes the specified ReloadDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. - * @param message ReloadDocumentRequest message or plain object to encode + * Encodes the specified GetFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. + * @param message GetFulfillmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReloadDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. - * @param message ReloadDocumentRequest message or plain object to encode + * Encodes the specified GetFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. + * @param message GetFulfillmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IReloadDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReloadDocumentRequest message from the specified reader or buffer. + * Decodes a GetFulfillmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReloadDocumentRequest + * @returns GetFulfillmentRequest * @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.v2beta1.ReloadDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; /** - * Decodes a ReloadDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFulfillmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReloadDocumentRequest + * @returns GetFulfillmentRequest * @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.v2beta1.ReloadDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; /** - * Verifies a ReloadDocumentRequest message. + * Verifies a GetFulfillmentRequest 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 ReloadDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFulfillmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReloadDocumentRequest + * @returns GetFulfillmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ReloadDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GetFulfillmentRequest; /** - * Creates a plain object from a ReloadDocumentRequest message. Also converts values to other types if specified. - * @param message ReloadDocumentRequest + * Creates a plain object from a GetFulfillmentRequest message. Also converts values to other types if specified. + * @param message GetFulfillmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ReloadDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GetFulfillmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReloadDocumentRequest to JSON. + * Converts this GetFulfillmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a ConversationEvent. */ - interface IConversationEvent { - - /** ConversationEvent conversation */ - conversation?: (string|null); - - /** ConversationEvent type */ - type?: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null); + /** Properties of an UpdateFulfillmentRequest. */ + interface IUpdateFulfillmentRequest { - /** ConversationEvent errorStatus */ - errorStatus?: (google.rpc.IStatus|null); + /** UpdateFulfillmentRequest fulfillment */ + fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); - /** ConversationEvent newMessagePayload */ - newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** UpdateFulfillmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a ConversationEvent. */ - class ConversationEvent implements IConversationEvent { + /** Represents an UpdateFulfillmentRequest. */ + class UpdateFulfillmentRequest implements IUpdateFulfillmentRequest { /** - * Constructs a new ConversationEvent. + * Constructs a new UpdateFulfillmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent); - - /** ConversationEvent conversation. */ - public conversation: string; - - /** ConversationEvent type. */ - public type: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type); - - /** ConversationEvent errorStatus. */ - public errorStatus?: (google.rpc.IStatus|null); + constructor(properties?: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest); - /** ConversationEvent newMessagePayload. */ - public newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** UpdateFulfillmentRequest fulfillment. */ + public fulfillment?: (google.cloud.dialogflow.v2beta1.IFulfillment|null); - /** ConversationEvent payload. */ - public payload?: "newMessagePayload"; + /** UpdateFulfillmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ConversationEvent instance using the specified properties. + * Creates a new UpdateFulfillmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationEvent instance + * @returns UpdateFulfillmentRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent): google.cloud.dialogflow.v2beta1.ConversationEvent; + public static create(properties?: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode + * Encodes the specified UpdateFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. + * @param message UpdateFulfillmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode + * Encodes the specified UpdateFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. + * @param message UpdateFulfillmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationEvent message from the specified reader or buffer. + * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationEvent + * @returns UpdateFulfillmentRequest * @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.v2beta1.ConversationEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationEvent + * @returns UpdateFulfillmentRequest * @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.v2beta1.ConversationEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; /** - * Verifies a ConversationEvent message. + * Verifies an UpdateFulfillmentRequest 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 ConversationEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFulfillmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationEvent + * @returns UpdateFulfillmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest; /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. - * @param message ConversationEvent + * Creates a plain object from an UpdateFulfillmentRequest message. Also converts values to other types if specified. + * @param message UpdateFulfillmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationEvent to JSON. + * Converts this UpdateFulfillmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ConversationEvent { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CONVERSATION_STARTED = 1, - CONVERSATION_FINISHED = 2, - NEW_MESSAGE = 5, - UNRECOVERABLE_ERROR = 4 - } - } - /** Properties of a HumanAgentAssistantEvent. */ interface IHumanAgentAssistantEvent { diff --git a/packages/google-cloud-dialogflow/protos/protos.js b/packages/google-cloud-dialogflow/protos/protos.js index 12e8de76a97..01843ff6578 100644 --- a/packages/google-cloud-dialogflow/protos/protos.js +++ b/packages/google-cloud-dialogflow/protos/protos.js @@ -75854,263 +75854,27 @@ return GetValidationResultRequest; })(); - v2beta1.Environments = (function() { - - /** - * Constructs a new Environments service. - * @memberof google.cloud.dialogflow.v2beta1 - * @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; - - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Environments#listEnvironments}. - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironment}. - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment - */ - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#createEnvironment}. - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment - */ - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#updateEnvironment}. - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment - */ - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); - }, "name", { value: "UpdateEnvironment" }); - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#deleteEnvironment}. - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEnvironment" }); - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironmentHistory}. - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @typedef GetEnvironmentHistoryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory} [response] EnvironmentHistory - */ - - /** - * Calls GetEnvironmentHistory. - * @function getEnvironmentHistory - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} request GetEnvironmentHistoryRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and EnvironmentHistory - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getEnvironmentHistory = function getEnvironmentHistory(request, callback) { - return this.rpcCall(getEnvironmentHistory, $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest, $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory, request, callback); - }, "name", { value: "GetEnvironmentHistory" }); - - /** - * Calls GetEnvironmentHistory. - * @function getEnvironmentHistory - * @memberof google.cloud.dialogflow.v2beta1.Environments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} request GetEnvironmentHistoryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Environments; - })(); - - v2beta1.Environment = (function() { + v2beta1.ValidationError = (function() { /** - * Properties of an Environment. + * Properties of a ValidationError. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {string|null} [description] Environment description - * @property {string|null} [agentVersion] Environment agentVersion - * @property {google.cloud.dialogflow.v2beta1.Environment.State|null} [state] Environment state - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null} [textToSpeechSettings] Environment textToSpeechSettings - * @property {google.cloud.dialogflow.v2beta1.IFulfillment|null} [fulfillment] Environment fulfillment + * @interface IValidationError + * @property {google.cloud.dialogflow.v2beta1.ValidationError.Severity|null} [severity] ValidationError severity + * @property {Array.|null} [entries] ValidationError entries + * @property {string|null} [errorMessage] ValidationError errorMessage */ /** - * Constructs a new Environment. + * Constructs a new ValidationError. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an Environment. - * @implements IEnvironment + * @classdesc Represents a ValidationError. + * @implements IValidationError * @constructor - * @param {google.cloud.dialogflow.v2beta1.IEnvironment=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IValidationError=} [properties] Properties to set */ - function Environment(properties) { + function ValidationError(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76118,153 +75882,104 @@ } /** - * Environment name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Environment - * @instance - */ - Environment.prototype.description = ""; - - /** - * Environment agentVersion. - * @member {string} agentVersion - * @memberof google.cloud.dialogflow.v2beta1.Environment - * @instance - */ - Environment.prototype.agentVersion = ""; - - /** - * Environment state. - * @member {google.cloud.dialogflow.v2beta1.Environment.State} state - * @memberof google.cloud.dialogflow.v2beta1.Environment - * @instance - */ - Environment.prototype.state = 0; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.v2beta1.Environment + * ValidationError severity. + * @member {google.cloud.dialogflow.v2beta1.ValidationError.Severity} severity + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @instance */ - Environment.prototype.updateTime = null; + ValidationError.prototype.severity = 0; /** - * Environment textToSpeechSettings. - * @member {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null|undefined} textToSpeechSettings - * @memberof google.cloud.dialogflow.v2beta1.Environment + * ValidationError entries. + * @member {Array.} entries + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @instance */ - Environment.prototype.textToSpeechSettings = null; + ValidationError.prototype.entries = $util.emptyArray; /** - * Environment fulfillment. - * @member {google.cloud.dialogflow.v2beta1.IFulfillment|null|undefined} fulfillment - * @memberof google.cloud.dialogflow.v2beta1.Environment + * ValidationError errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @instance */ - Environment.prototype.fulfillment = null; + ValidationError.prototype.errorMessage = ""; /** - * Creates a new Environment instance using the specified properties. + * Creates a new ValidationError instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment instance + * @param {google.cloud.dialogflow.v2beta1.IValidationError=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError instance */ - Environment.create = function create(properties) { - return new Environment(properties); + ValidationError.create = function create(properties) { + return new ValidationError(properties); }; /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. + * Encodes the specified ValidationError message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IValidationError} message ValidationError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encode = function encode(message, writer) { + ValidationError.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.agentVersion != null && Object.hasOwnProperty.call(message, "agentVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentVersion); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - 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.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) - $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) - $root.google.cloud.dialogflow.v2beta1.Fulfillment.encode(message.fulfillment, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.entries[i]); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage); return writer; }; /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. + * Encodes the specified ValidationError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironment} message Environment message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IValidationError} message ValidationError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { + ValidationError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Environment message from the specified reader or buffer. + * Decodes a ValidationError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment + * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError * @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) { + ValidationError.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.v2beta1.Environment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ValidationError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); + message.severity = reader.int32(); break; case 3: - message.agentVersion = reader.string(); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push(reader.string()); break; case 4: - message.state = reader.int32(); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.decode(reader, reader.uint32()); - break; - case 8: - message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.decode(reader, reader.uint32()); + message.errorMessage = reader.string(); break; default: reader.skipType(tag & 7); @@ -76275,216 +75990,186 @@ }; /** - * Decodes an Environment message from the specified reader or buffer, length delimited. + * Decodes a ValidationError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment + * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError * @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) { + ValidationError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Environment message. + * Verifies a ValidationError message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @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) { + ValidationError.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) - if (!$util.isString(message.agentVersion)) - return "agentVersion: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { default: - return "state: enum value expected"; + return "severity: enum value expected"; case 0: case 1: case 2: case 3: + case 4: break; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { - var error = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify(message.textToSpeechSettings); - if (error) - return "textToSpeechSettings." + error; - } - if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { - var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.verify(message.fulfillment); - if (error) - return "fulfillment." + error; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) + if (!$util.isString(message.entries[i])) + return "entries: string[] expected"; } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; return null; }; /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment + * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Environment) + ValidationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ValidationError) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.agentVersion != null) - message.agentVersion = String(object.agentVersion); - switch (object.state) { - case "STATE_UNSPECIFIED": + var message = new $root.google.cloud.dialogflow.v2beta1.ValidationError(); + switch (object.severity) { + case "SEVERITY_UNSPECIFIED": case 0: - message.state = 0; + message.severity = 0; break; - case "STOPPED": + case "INFO": case 1: - message.state = 1; + message.severity = 1; break; - case "LOADING": + case "WARNING": case 2: - message.state = 2; + message.severity = 2; break; - case "RUNNING": + case "ERROR": case 3: - message.state = 3; + message.severity = 3; + break; + case "CRITICAL": + case 4: + message.severity = 4; break; } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.textToSpeechSettings != null) { - if (typeof object.textToSpeechSettings !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.textToSpeechSettings: object expected"); - message.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.fromObject(object.textToSpeechSettings); - } - if (object.fulfillment != null) { - if (typeof object.fulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.fulfillment: object expected"); - message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.fromObject(object.fulfillment); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationError.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) + message.entries[i] = String(object.entries[i]); } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); return message; }; /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. + * Creates a plain object from a ValidationError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @static - * @param {google.cloud.dialogflow.v2beta1.Environment} message Environment + * @param {google.cloud.dialogflow.v2beta1.ValidationError} message ValidationError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Environment.toObject = function toObject(message, options) { + ValidationError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entries = []; if (options.defaults) { - object.name = ""; - object.description = ""; - object.agentVersion = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.updateTime = null; - object.textToSpeechSettings = null; - object.fulfillment = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.errorMessage = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) - object.agentVersion = message.agentVersion; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Environment.State[message.state] : message.state; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) - object.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); - if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) - object.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.toObject(message.fulfillment, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ValidationError.Severity[message.severity] : message.severity; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = message.entries[j]; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; return object; }; /** - * Converts this Environment to JSON. + * Converts this ValidationError to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Environment + * @memberof google.cloud.dialogflow.v2beta1.ValidationError * @instance * @returns {Object.} JSON object */ - Environment.prototype.toJSON = function toJSON() { + ValidationError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * State enum. - * @name google.cloud.dialogflow.v2beta1.Environment.State + * Severity enum. + * @name google.cloud.dialogflow.v2beta1.ValidationError.Severity * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STOPPED=1 STOPPED value - * @property {number} LOADING=2 LOADING value - * @property {number} RUNNING=3 RUNNING value + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ERROR=3 ERROR value + * @property {number} CRITICAL=4 CRITICAL value */ - Environment.State = (function() { + ValidationError.Severity = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STOPPED"] = 1; - values[valuesById[2] = "LOADING"] = 2; - values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ERROR"] = 3; + values[valuesById[4] = "CRITICAL"] = 4; return values; })(); - return Environment; + return ValidationError; })(); - v2beta1.TextToSpeechSettings = (function() { + v2beta1.ValidationResult = (function() { /** - * Properties of a TextToSpeechSettings. + * Properties of a ValidationResult. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ITextToSpeechSettings - * @property {boolean|null} [enableTextToSpeech] TextToSpeechSettings enableTextToSpeech - * @property {google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null} [outputAudioEncoding] TextToSpeechSettings outputAudioEncoding - * @property {number|null} [sampleRateHertz] TextToSpeechSettings sampleRateHertz - * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs + * @interface IValidationResult + * @property {Array.|null} [validationErrors] ValidationResult validationErrors */ /** - * Constructs a new TextToSpeechSettings. + * Constructs a new ValidationResult. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a TextToSpeechSettings. - * @implements ITextToSpeechSettings + * @classdesc Represents a ValidationResult. + * @implements IValidationResult * @constructor - * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IValidationResult=} [properties] Properties to set */ - function TextToSpeechSettings(properties) { - this.synthesizeSpeechConfigs = {}; + function ValidationResult(properties) { + this.validationErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -76492,136 +76177,78 @@ } /** - * TextToSpeechSettings enableTextToSpeech. - * @member {boolean} enableTextToSpeech - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings - * @instance - */ - TextToSpeechSettings.prototype.enableTextToSpeech = false; - - /** - * TextToSpeechSettings outputAudioEncoding. - * @member {google.cloud.dialogflow.v2beta1.OutputAudioEncoding} outputAudioEncoding - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings - * @instance - */ - TextToSpeechSettings.prototype.outputAudioEncoding = 0; - - /** - * TextToSpeechSettings sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings - * @instance - */ - TextToSpeechSettings.prototype.sampleRateHertz = 0; - - /** - * TextToSpeechSettings synthesizeSpeechConfigs. - * @member {Object.} synthesizeSpeechConfigs - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * ValidationResult validationErrors. + * @member {Array.} validationErrors + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @instance */ - TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; + ValidationResult.prototype.validationErrors = $util.emptyArray; /** - * Creates a new TextToSpeechSettings instance using the specified properties. + * Creates a new ValidationResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static - * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings instance + * @param {google.cloud.dialogflow.v2beta1.IValidationResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult instance */ - TextToSpeechSettings.create = function create(properties) { - return new TextToSpeechSettings(properties); + ValidationResult.create = function create(properties) { + return new ValidationResult(properties); }; /** - * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static - * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IValidationResult} message ValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextToSpeechSettings.encode = function encode(message, writer) { + ValidationResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableTextToSpeech != null && Object.hasOwnProperty.call(message, "enableTextToSpeech")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableTextToSpeech); - if (message.outputAudioEncoding != null && Object.hasOwnProperty.call(message, "outputAudioEncoding")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outputAudioEncoding); - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sampleRateHertz); - if (message.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) - for (var keys = Object.keys(message.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.validationErrors != null && message.validationErrors.length) + for (var i = 0; i < message.validationErrors.length; ++i) + $root.google.cloud.dialogflow.v2beta1.ValidationError.encode(message.validationErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static - * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IValidationResult} message ValidationResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { + ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer. + * Decodes a ValidationResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextToSpeechSettings.decode = function decode(reader, length) { + ValidationResult.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.v2beta1.TextToSpeechSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ValidationResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.enableTextToSpeech = reader.bool(); - break; - case 2: - message.outputAudioEncoding = reader.int32(); - break; - case 3: - message.sampleRateHertz = reader.int32(); - break; - case 4: - if (message.synthesizeSpeechConfigs === $util.emptyObject) - message.synthesizeSpeechConfigs = {}; - 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.v2beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.synthesizeSpeechConfigs[key] = value; + if (!(message.validationErrors && message.validationErrors.length)) + message.validationErrors = []; + message.validationErrors.push($root.google.cloud.dialogflow.v2beta1.ValidationError.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -76632,419 +76259,260 @@ }; /** - * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. + * Decodes a ValidationResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { + ValidationResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextToSpeechSettings message. + * Verifies a ValidationResult message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextToSpeechSettings.verify = function verify(message) { + ValidationResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableTextToSpeech != null && message.hasOwnProperty("enableTextToSpeech")) - if (typeof message.enableTextToSpeech !== "boolean") - return "enableTextToSpeech: boolean expected"; - if (message.outputAudioEncoding != null && message.hasOwnProperty("outputAudioEncoding")) - switch (message.outputAudioEncoding) { - default: - return "outputAudioEncoding: 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.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { - if (!$util.isObject(message.synthesizeSpeechConfigs)) - return "synthesizeSpeechConfigs: object expected"; - var key = Object.keys(message.synthesizeSpeechConfigs); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); + if (message.validationErrors != null && message.hasOwnProperty("validationErrors")) { + if (!Array.isArray(message.validationErrors)) + return "validationErrors: array expected"; + for (var i = 0; i < message.validationErrors.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.ValidationError.verify(message.validationErrors[i]); if (error) - return "synthesizeSpeechConfigs." + error; + return "validationErrors." + error; } } return null; }; /** - * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings + * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult */ - TextToSpeechSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings) + ValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ValidationResult) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings(); - if (object.enableTextToSpeech != null) - message.enableTextToSpeech = Boolean(object.enableTextToSpeech); - switch (object.outputAudioEncoding) { - case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": - case 0: - message.outputAudioEncoding = 0; - break; - case "OUTPUT_AUDIO_ENCODING_LINEAR_16": - case 1: - message.outputAudioEncoding = 1; - break; - case "OUTPUT_AUDIO_ENCODING_MP3": - case 2: - message.outputAudioEncoding = 2; - break; - case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": - case 4: - message.outputAudioEncoding = 4; - break; - case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": - case 3: - message.outputAudioEncoding = 3; - break; - case "OUTPUT_AUDIO_ENCODING_MULAW": - case 5: - message.outputAudioEncoding = 5; - break; - } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.synthesizeSpeechConfigs) { - if (typeof object.synthesizeSpeechConfigs !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); - message.synthesizeSpeechConfigs = {}; - for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { - if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); - message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); + var message = new $root.google.cloud.dialogflow.v2beta1.ValidationResult(); + if (object.validationErrors) { + if (!Array.isArray(object.validationErrors)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationResult.validationErrors: array expected"); + message.validationErrors = []; + for (var i = 0; i < object.validationErrors.length; ++i) { + if (typeof object.validationErrors[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationResult.validationErrors: object expected"); + message.validationErrors[i] = $root.google.cloud.dialogflow.v2beta1.ValidationError.fromObject(object.validationErrors[i]); } } return message; }; /** - * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @static - * @param {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} message TextToSpeechSettings + * @param {google.cloud.dialogflow.v2beta1.ValidationResult} message ValidationResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextToSpeechSettings.toObject = function toObject(message, options) { + ValidationResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.synthesizeSpeechConfigs = {}; - if (options.defaults) { - object.enableTextToSpeech = false; - object.outputAudioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - } - if (message.enableTextToSpeech != null && message.hasOwnProperty("enableTextToSpeech")) - object.enableTextToSpeech = message.enableTextToSpeech; - if (message.outputAudioEncoding != null && message.hasOwnProperty("outputAudioEncoding")) - object.outputAudioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.OutputAudioEncoding[message.outputAudioEncoding] : message.outputAudioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - var keys2; - if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { - object.synthesizeSpeechConfigs = {}; - for (var j = 0; j < keys2.length; ++j) - object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], options); + if (options.arrays || options.defaults) + object.validationErrors = []; + if (message.validationErrors && message.validationErrors.length) { + object.validationErrors = []; + for (var j = 0; j < message.validationErrors.length; ++j) + object.validationErrors[j] = $root.google.cloud.dialogflow.v2beta1.ValidationError.toObject(message.validationErrors[j], options); } return object; }; /** - * Converts this TextToSpeechSettings to JSON. + * Converts this ValidationResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.ValidationResult * @instance * @returns {Object.} JSON object */ - TextToSpeechSettings.prototype.toJSON = function toJSON() { + ValidationResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextToSpeechSettings; + return ValidationResult; })(); - v2beta1.ListEnvironmentsRequest = (function() { + v2beta1.AnswerRecords = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Constructs a new AnswerRecords service. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @classdesc Represents an AnswerRecords + * @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 AnswerRecords(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AnswerRecords.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnswerRecords; /** - * Constructs a new ListEnvironmentsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest=} [properties] Properties to set + * Creates new AnswerRecords service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @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 {AnswerRecords} RPC service. Useful where requests and/or responses are streamed. */ - function ListEnvironmentsRequest(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]]; - } + AnswerRecords.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListEnvironmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#getAnswerRecord}. + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @typedef GetAnswerRecordCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} [response] AnswerRecord */ - ListEnvironmentsRequest.prototype.parent = ""; /** - * ListEnvironmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest + * Calls GetAnswerRecord. + * @function getAnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} request GetAnswerRecordRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecordCallback} callback Node-style callback called with the error, if any, and AnswerRecord + * @returns {undefined} + * @variation 1 */ - ListEnvironmentsRequest.prototype.pageSize = 0; + Object.defineProperty(AnswerRecords.prototype.getAnswerRecord = function getAnswerRecord(request, callback) { + return this.rpcCall(getAnswerRecord, $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest, $root.google.cloud.dialogflow.v2beta1.AnswerRecord, request, callback); + }, "name", { value: "GetAnswerRecord" }); /** - * ListEnvironmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest + * Calls GetAnswerRecord. + * @function getAnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} request GetAnswerRecordRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEnvironmentsRequest.prototype.pageToken = ""; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#listAnswerRecords}. + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @typedef ListAnswerRecordsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} [response] ListAnswerRecordsResponse */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); - }; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListAnswerRecords. + * @function listAnswerRecords + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} request ListAnswerRecordsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecordsCallback} callback Node-style callback called with the error, if any, and ListAnswerRecordsResponse + * @returns {undefined} + * @variation 1 */ - ListEnvironmentsRequest.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(AnswerRecords.prototype.listAnswerRecords = function listAnswerRecords(request, callback) { + return this.rpcCall(listAnswerRecords, $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest, $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse, request, callback); + }, "name", { value: "ListAnswerRecords" }); /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListAnswerRecords. + * @function listAnswerRecords + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} request ListAnswerRecordsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @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.v2beta1.AnswerRecords#updateAnswerRecord}. + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @typedef UpdateAnswerRecordCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} [response] AnswerRecord */ - 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.v2beta1.ListEnvironmentsRequest(); - 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 ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @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) { - 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 ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.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 a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateAnswerRecord. + * @function updateAnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} request UpdateAnswerRecordRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecordCallback} callback Node-style callback called with the error, if any, and AnswerRecord + * @returns {undefined} + * @variation 1 */ - ListEnvironmentsRequest.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; - }; + Object.defineProperty(AnswerRecords.prototype.updateAnswerRecord = function updateAnswerRecord(request, callback) { + return this.rpcCall(updateAnswerRecord, $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest, $root.google.cloud.dialogflow.v2beta1.AnswerRecord, request, callback); + }, "name", { value: "UpdateAnswerRecord" }); /** - * Converts this ListEnvironmentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest + * Calls UpdateAnswerRecord. + * @function updateAnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} request UpdateAnswerRecordRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ListEnvironmentsRequest; + return AnswerRecords; })(); - v2beta1.ListEnvironmentsResponse = (function() { + v2beta1.AnswerRecord = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of an AnswerRecord. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + * @interface IAnswerRecord + * @property {string|null} [name] AnswerRecord name + * @property {google.cloud.dialogflow.v2beta1.IAnswerFeedback|null} [answerFeedback] AnswerRecord answerFeedback + * @property {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null} [agentAssistantRecord] AnswerRecord agentAssistantRecord */ /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new AnswerRecord. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents an AnswerRecord. + * @implements IAnswerRecord * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord=} [properties] Properties to set */ - function ListEnvironmentsResponse(properties) { - this.environments = []; + function AnswerRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77052,91 +76520,115 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * AnswerRecord name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @instance */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + AnswerRecord.prototype.name = ""; /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * AnswerRecord answerFeedback. + * @member {google.cloud.dialogflow.v2beta1.IAnswerFeedback|null|undefined} answerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @instance */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; + AnswerRecord.prototype.answerFeedback = null; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * AnswerRecord agentAssistantRecord. + * @member {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null|undefined} agentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @instance + */ + AnswerRecord.prototype.agentAssistantRecord = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnswerRecord record. + * @member {"agentAssistantRecord"|undefined} record + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @instance + */ + Object.defineProperty(AnswerRecord.prototype, "record", { + get: $util.oneOfGetter($oneOfFields = ["agentAssistantRecord"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnswerRecord instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord instance */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); + AnswerRecord.create = function create(properties) { + return new AnswerRecord(properties); }; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified AnswerRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord} message AnswerRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encode = function encode(message, writer) { + AnswerRecord.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.v2beta1.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); + if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) + $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.agentAssistantRecord != null && Object.hasOwnProperty.call(message, "agentAssistantRecord")) + $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.encode(message.agentAssistantRecord, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified AnswerRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord} message AnswerRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + AnswerRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes an AnswerRecord message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord * @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) { + AnswerRecord.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.v2beta1.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AnswerRecord(); 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.v2beta1.Environment.decode(reader, reader.uint32())); + message.name = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.decode(reader, reader.uint32()); + break; + case 4: + message.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -77147,133 +76639,141 @@ }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes an AnswerRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord * @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) { + AnswerRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies an AnswerRecord message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @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) { + AnswerRecord.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.v2beta1.Environment.verify(message.environments[i]); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { + var error = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.verify(message.answerFeedback); + if (error) + return "answerFeedback." + error; + } + if (message.agentAssistantRecord != null && message.hasOwnProperty("agentAssistantRecord")) { + properties.record = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify(message.agentAssistantRecord); if (error) - return "environments." + error; + return "agentAssistantRecord." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AnswerRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + AnswerRecord.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnswerRecord) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environments[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.AnswerRecord(); + if (object.name != null) + message.name = String(object.name); + if (object.answerFeedback != null) { + if (typeof object.answerFeedback !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerRecord.answerFeedback: object expected"); + message.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.fromObject(object.answerFeedback); + } + if (object.agentAssistantRecord != null) { + if (typeof object.agentAssistantRecord !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerRecord.agentAssistantRecord: object expected"); + message.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.fromObject(object.agentAssistantRecord); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * Creates a plain object from an AnswerRecord message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @static - * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} message AnswerRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { + AnswerRecord.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.v2beta1.Environment.toObject(message.environments[j], options); + if (options.defaults) { + object.name = ""; + object.answerFeedback = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) + object.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.toObject(message.answerFeedback, options); + if (message.agentAssistantRecord != null && message.hasOwnProperty("agentAssistantRecord")) { + object.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.toObject(message.agentAssistantRecord, options); + if (options.oneofs) + object.record = "agentAssistantRecord"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this AnswerRecord to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord * @instance * @returns {Object.} JSON object */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + AnswerRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEnvironmentsResponse; + return AnswerRecord; })(); - v2beta1.GetEnvironmentRequest = (function() { + v2beta1.AgentAssistantRecord = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of an AgentAssistantRecord. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name + * @interface IAgentAssistantRecord + * @property {google.cloud.dialogflow.v2beta1.IArticleAnswer|null} [articleSuggestionAnswer] AgentAssistantRecord articleSuggestionAnswer + * @property {google.cloud.dialogflow.v2beta1.IFaqAnswer|null} [faqAnswer] AgentAssistantRecord faqAnswer */ /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new AgentAssistantRecord. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents an AgentAssistantRecord. + * @implements IAgentAssistantRecord * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord=} [properties] Properties to set */ - function GetEnvironmentRequest(properties) { + function AgentAssistantRecord(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77281,75 +76781,102 @@ } /** - * GetEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * AgentAssistantRecord articleSuggestionAnswer. + * @member {google.cloud.dialogflow.v2beta1.IArticleAnswer|null|undefined} articleSuggestionAnswer + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @instance */ - GetEnvironmentRequest.prototype.name = ""; + AgentAssistantRecord.prototype.articleSuggestionAnswer = null; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * AgentAssistantRecord faqAnswer. + * @member {google.cloud.dialogflow.v2beta1.IFaqAnswer|null|undefined} faqAnswer + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @instance + */ + AgentAssistantRecord.prototype.faqAnswer = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AgentAssistantRecord answer. + * @member {"articleSuggestionAnswer"|"faqAnswer"|undefined} answer + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @instance + */ + Object.defineProperty(AgentAssistantRecord.prototype, "answer", { + get: $util.oneOfGetter($oneOfFields = ["articleSuggestionAnswer", "faqAnswer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AgentAssistantRecord instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord instance */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); + AgentAssistantRecord.create = function create(properties) { + return new AgentAssistantRecord(properties); }; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified AgentAssistantRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord} message AgentAssistantRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encode = function encode(message, writer) { + AgentAssistantRecord.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.articleSuggestionAnswer != null && Object.hasOwnProperty.call(message, "articleSuggestionAnswer")) + $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.encode(message.articleSuggestionAnswer, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.faqAnswer != null && Object.hasOwnProperty.call(message, "faqAnswer")) + $root.google.cloud.dialogflow.v2beta1.FaqAnswer.encode(message.faqAnswer, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified AgentAssistantRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord} message AgentAssistantRecord message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AgentAssistantRecord.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes an AgentAssistantRecord message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord * @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) { + AgentAssistantRecord.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.v2beta1.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 5: + message.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.decode(reader, reader.uint32()); + break; + case 6: + message.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -77360,109 +76887,142 @@ }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AgentAssistantRecord message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord * @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) { + AgentAssistantRecord.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentRequest message. + * Verifies an AgentAssistantRecord message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @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) { + AgentAssistantRecord.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"; + var properties = {}; + if (message.articleSuggestionAnswer != null && message.hasOwnProperty("articleSuggestionAnswer")) { + properties.answer = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.verify(message.articleSuggestionAnswer); + if (error) + return "articleSuggestionAnswer." + error; + } + } + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + if (properties.answer === 1) + return "answer: multiple values"; + properties.answer = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.verify(message.faqAnswer); + if (error) + return "faqAnswer." + error; + } + } return null; }; /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AgentAssistantRecord message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest) + AgentAssistantRecord.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest(); - 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. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord(); + if (object.articleSuggestionAnswer != null) { + if (typeof object.articleSuggestionAnswer !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantRecord.articleSuggestionAnswer: object expected"); + message.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.fromObject(object.articleSuggestionAnswer); + } + if (object.faqAnswer != null) { + if (typeof object.faqAnswer !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantRecord.faqAnswer: object expected"); + message.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.fromObject(object.faqAnswer); + } + return message; + }; + + /** + * Creates a plain object from an AgentAssistantRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @static - * @param {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} message AgentAssistantRecord * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentRequest.toObject = function toObject(message, options) { + AgentAssistantRecord.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 (message.articleSuggestionAnswer != null && message.hasOwnProperty("articleSuggestionAnswer")) { + object.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.toObject(message.articleSuggestionAnswer, options); + if (options.oneofs) + object.answer = "articleSuggestionAnswer"; + } + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + object.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.toObject(message.faqAnswer, options); + if (options.oneofs) + object.answer = "faqAnswer"; + } return object; }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this AgentAssistantRecord to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord * @instance * @returns {Object.} JSON object */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { + AgentAssistantRecord.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEnvironmentRequest; + return AgentAssistantRecord; })(); - v2beta1.CreateEnvironmentRequest = (function() { + v2beta1.AnswerFeedback = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of an AnswerFeedback. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.dialogflow.v2beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId + * @interface IAnswerFeedback + * @property {google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|null} [correctnessLevel] AnswerFeedback correctnessLevel + * @property {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null} [agentAssistantDetailFeedback] AnswerFeedback agentAssistantDetailFeedback + * @property {boolean|null} [clicked] AnswerFeedback clicked + * @property {google.protobuf.ITimestamp|null} [clickTime] AnswerFeedback clickTime + * @property {boolean|null} [displayed] AnswerFeedback displayed + * @property {google.protobuf.ITimestamp|null} [displayTime] AnswerFeedback displayTime */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new AnswerFeedback. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents an AnswerFeedback. + * @implements IAnswerFeedback * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback=} [properties] Properties to set */ - function CreateEnvironmentRequest(properties) { + function AnswerFeedback(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77470,101 +77030,154 @@ } /** - * CreateEnvironmentRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * AnswerFeedback correctnessLevel. + * @member {google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel} correctnessLevel + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @instance */ - CreateEnvironmentRequest.prototype.parent = ""; + AnswerFeedback.prototype.correctnessLevel = 0; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.v2beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * AnswerFeedback agentAssistantDetailFeedback. + * @member {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null|undefined} agentAssistantDetailFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @instance */ - CreateEnvironmentRequest.prototype.environment = null; + AnswerFeedback.prototype.agentAssistantDetailFeedback = null; /** - * CreateEnvironmentRequest environmentId. - * @member {string} environmentId - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * AnswerFeedback clicked. + * @member {boolean} clicked + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @instance */ - CreateEnvironmentRequest.prototype.environmentId = ""; + AnswerFeedback.prototype.clicked = false; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * AnswerFeedback clickTime. + * @member {google.protobuf.ITimestamp|null|undefined} clickTime + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.clickTime = null; + + /** + * AnswerFeedback displayed. + * @member {boolean} displayed + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.displayed = false; + + /** + * AnswerFeedback displayTime. + * @member {google.protobuf.ITimestamp|null|undefined} displayTime + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.displayTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnswerFeedback detailFeedback. + * @member {"agentAssistantDetailFeedback"|undefined} detailFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @instance + */ + Object.defineProperty(AnswerFeedback.prototype, "detailFeedback", { + get: $util.oneOfGetter($oneOfFields = ["agentAssistantDetailFeedback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnswerFeedback instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback instance */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); + AnswerFeedback.create = function create(properties) { + return new AnswerFeedback(properties); }; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback} message AnswerFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encode = function encode(message, writer) { + AnswerFeedback.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.v2beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.environmentId); + if (message.correctnessLevel != null && Object.hasOwnProperty.call(message, "correctnessLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.correctnessLevel); + if (message.agentAssistantDetailFeedback != null && Object.hasOwnProperty.call(message, "agentAssistantDetailFeedback")) + $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.encode(message.agentAssistantDetailFeedback, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.clicked != null && Object.hasOwnProperty.call(message, "clicked")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clicked); + if (message.displayed != null && Object.hasOwnProperty.call(message, "displayed")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.displayed); + if (message.clickTime != null && Object.hasOwnProperty.call(message, "clickTime")) + $root.google.protobuf.Timestamp.encode(message.clickTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.displayTime != null && Object.hasOwnProperty.call(message, "displayTime")) + $root.google.protobuf.Timestamp.encode(message.displayTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback} message AnswerFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes an AnswerFeedback message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback * @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) { + AnswerFeedback.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.v2beta1.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AnswerFeedback(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.correctnessLevel = reader.int32(); break; case 2: - message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.decode(reader, reader.uint32()); + message.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.decode(reader, reader.uint32()); break; case 3: - message.environmentId = reader.string(); + message.clicked = reader.bool(); + break; + case 5: + message.clickTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.displayed = reader.bool(); + break; + case 6: + message.displayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -77575,131 +77188,213 @@ }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback * @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) { + AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies an AnswerFeedback message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @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) { + AnswerFeedback.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.v2beta1.Environment.verify(message.environment); + var properties = {}; + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + switch (message.correctnessLevel) { + default: + return "correctnessLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.agentAssistantDetailFeedback != null && message.hasOwnProperty("agentAssistantDetailFeedback")) { + properties.detailFeedback = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify(message.agentAssistantDetailFeedback); + if (error) + return "agentAssistantDetailFeedback." + error; + } + } + if (message.clicked != null && message.hasOwnProperty("clicked")) + if (typeof message.clicked !== "boolean") + return "clicked: boolean expected"; + if (message.clickTime != null && message.hasOwnProperty("clickTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.clickTime); if (error) - return "environment." + error; + return "clickTime." + error; + } + if (message.displayed != null && message.hasOwnProperty("displayed")) + if (typeof message.displayed !== "boolean") + return "displayed: boolean expected"; + if (message.displayTime != null && message.hasOwnProperty("displayTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.displayTime); + if (error) + return "displayTime." + error; } - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - if (!$util.isString(message.environmentId)) - return "environmentId: string expected"; return null; }; /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest) + AnswerFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnswerFeedback) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.v2beta1.AnswerFeedback(); + switch (object.correctnessLevel) { + case "CORRECTNESS_LEVEL_UNSPECIFIED": + case 0: + message.correctnessLevel = 0; + break; + case "NOT_CORRECT": + case 1: + message.correctnessLevel = 1; + break; + case "PARTIALLY_CORRECT": + case 2: + message.correctnessLevel = 2; + break; + case "FULLY_CORRECT": + case 3: + message.correctnessLevel = 3; + break; + } + if (object.agentAssistantDetailFeedback != null) { + if (typeof object.agentAssistantDetailFeedback !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.agentAssistantDetailFeedback: object expected"); + message.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.fromObject(object.agentAssistantDetailFeedback); + } + if (object.clicked != null) + message.clicked = Boolean(object.clicked); + if (object.clickTime != null) { + if (typeof object.clickTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.clickTime: object expected"); + message.clickTime = $root.google.protobuf.Timestamp.fromObject(object.clickTime); + } + if (object.displayed != null) + message.displayed = Boolean(object.displayed); + if (object.displayTime != null) { + if (typeof object.displayTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.displayTime: object expected"); + message.displayTime = $root.google.protobuf.Timestamp.fromObject(object.displayTime); } - if (object.environmentId != null) - message.environmentId = String(object.environmentId); return message; }; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dialogflow.v2beta1.AnswerFeedback} message AnswerFeedback * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { + AnswerFeedback.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.environment = null; - object.environmentId = ""; + object.correctnessLevel = options.enums === String ? "CORRECTNESS_LEVEL_UNSPECIFIED" : 0; + object.clicked = false; + object.displayed = false; + object.clickTime = null; + object.displayTime = 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.v2beta1.Environment.toObject(message.environment, options); - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - object.environmentId = message.environmentId; + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + object.correctnessLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; + if (message.agentAssistantDetailFeedback != null && message.hasOwnProperty("agentAssistantDetailFeedback")) { + object.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.toObject(message.agentAssistantDetailFeedback, options); + if (options.oneofs) + object.detailFeedback = "agentAssistantDetailFeedback"; + } + if (message.clicked != null && message.hasOwnProperty("clicked")) + object.clicked = message.clicked; + if (message.displayed != null && message.hasOwnProperty("displayed")) + object.displayed = message.displayed; + if (message.clickTime != null && message.hasOwnProperty("clickTime")) + object.clickTime = $root.google.protobuf.Timestamp.toObject(message.clickTime, options); + if (message.displayTime != null && message.hasOwnProperty("displayTime")) + object.displayTime = $root.google.protobuf.Timestamp.toObject(message.displayTime, options); return object; }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this AnswerFeedback to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback * @instance * @returns {Object.} JSON object */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + AnswerFeedback.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateEnvironmentRequest; + /** + * CorrectnessLevel enum. + * @name google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel + * @enum {number} + * @property {number} CORRECTNESS_LEVEL_UNSPECIFIED=0 CORRECTNESS_LEVEL_UNSPECIFIED value + * @property {number} NOT_CORRECT=1 NOT_CORRECT value + * @property {number} PARTIALLY_CORRECT=2 PARTIALLY_CORRECT value + * @property {number} FULLY_CORRECT=3 FULLY_CORRECT value + */ + AnswerFeedback.CorrectnessLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CORRECTNESS_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_CORRECT"] = 1; + values[valuesById[2] = "PARTIALLY_CORRECT"] = 2; + values[valuesById[3] = "FULLY_CORRECT"] = 3; + return values; + })(); + + return AnswerFeedback; })(); - v2beta1.UpdateEnvironmentRequest = (function() { + v2beta1.AgentAssistantFeedback = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of an AgentAssistantFeedback. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateEnvironmentRequest - * @property {google.cloud.dialogflow.v2beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - * @property {boolean|null} [allowLoadToDraftAndDiscardChanges] UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges + * @interface IAgentAssistantFeedback + * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|null} [answerRelevance] AgentAssistantFeedback answerRelevance + * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|null} [documentCorrectness] AgentAssistantFeedback documentCorrectness + * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|null} [documentEfficiency] AgentAssistantFeedback documentEfficiency + * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null} [summarizationFeedback] AgentAssistantFeedback summarizationFeedback */ /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new AgentAssistantFeedback. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents an AgentAssistantFeedback. + * @implements IAgentAssistantFeedback * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback=} [properties] Properties to set */ - function UpdateEnvironmentRequest(properties) { + function AgentAssistantFeedback(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77707,101 +77402,114 @@ } /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dialogflow.v2beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * AgentAssistantFeedback answerRelevance. + * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance} answerRelevance + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @instance */ - UpdateEnvironmentRequest.prototype.environment = null; + AgentAssistantFeedback.prototype.answerRelevance = 0; /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * AgentAssistantFeedback documentCorrectness. + * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness} documentCorrectness + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @instance */ - UpdateEnvironmentRequest.prototype.updateMask = null; + AgentAssistantFeedback.prototype.documentCorrectness = 0; /** - * UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges. - * @member {boolean} allowLoadToDraftAndDiscardChanges - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * AgentAssistantFeedback documentEfficiency. + * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency} documentEfficiency + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @instance */ - UpdateEnvironmentRequest.prototype.allowLoadToDraftAndDiscardChanges = false; + AgentAssistantFeedback.prototype.documentEfficiency = 0; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * AgentAssistantFeedback summarizationFeedback. + * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null|undefined} summarizationFeedback + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @instance + */ + AgentAssistantFeedback.prototype.summarizationFeedback = null; + + /** + * Creates a new AgentAssistantFeedback instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback instance */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); + AgentAssistantFeedback.create = function create(properties) { + return new AgentAssistantFeedback(properties); }; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified AgentAssistantFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback} message AgentAssistantFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { + AgentAssistantFeedback.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dialogflow.v2beta1.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(); - if (message.allowLoadToDraftAndDiscardChanges != null && Object.hasOwnProperty.call(message, "allowLoadToDraftAndDiscardChanges")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowLoadToDraftAndDiscardChanges); + if (message.answerRelevance != null && Object.hasOwnProperty.call(message, "answerRelevance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.answerRelevance); + if (message.documentCorrectness != null && Object.hasOwnProperty.call(message, "documentCorrectness")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.documentCorrectness); + if (message.documentEfficiency != null && Object.hasOwnProperty.call(message, "documentEfficiency")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.documentEfficiency); + if (message.summarizationFeedback != null && Object.hasOwnProperty.call(message, "summarizationFeedback")) + $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.encode(message.summarizationFeedback, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified AgentAssistantFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback} message AgentAssistantFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AgentAssistantFeedback.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes an AgentAssistantFeedback message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback * @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) { + AgentAssistantFeedback.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.v2beta1.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.decode(reader, reader.uint32()); + message.answerRelevance = reader.int32(); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.documentCorrectness = reader.int32(); break; case 3: - message.allowLoadToDraftAndDiscardChanges = reader.bool(); + message.documentEfficiency = reader.int32(); + break; + case 4: + message.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -77812,134 +77520,481 @@ }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AgentAssistantFeedback message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback * @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) { + AgentAssistantFeedback.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies an AgentAssistantFeedback message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @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) { + AgentAssistantFeedback.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.v2beta1.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 (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) + switch (message.answerRelevance) { + default: + return "answerRelevance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.documentCorrectness != null && message.hasOwnProperty("documentCorrectness")) + switch (message.documentCorrectness) { + default: + return "documentCorrectness: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.documentEfficiency != null && message.hasOwnProperty("documentEfficiency")) + switch (message.documentEfficiency) { + default: + return "documentEfficiency: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.summarizationFeedback != null && message.hasOwnProperty("summarizationFeedback")) { + var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify(message.summarizationFeedback); if (error) - return "updateMask." + error; + return "summarizationFeedback." + error; } - if (message.allowLoadToDraftAndDiscardChanges != null && message.hasOwnProperty("allowLoadToDraftAndDiscardChanges")) - if (typeof message.allowLoadToDraftAndDiscardChanges !== "boolean") - return "allowLoadToDraftAndDiscardChanges: boolean expected"; return null; }; /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AgentAssistantFeedback message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest) + AgentAssistantFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest(); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback(); + switch (object.answerRelevance) { + case "ANSWER_RELEVANCE_UNSPECIFIED": + case 0: + message.answerRelevance = 0; + break; + case "IRRELEVANT": + case 1: + message.answerRelevance = 1; + break; + case "RELEVANT": + case 2: + message.answerRelevance = 2; + break; } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + switch (object.documentCorrectness) { + case "DOCUMENT_CORRECTNESS_UNSPECIFIED": + case 0: + message.documentCorrectness = 0; + break; + case "INCORRECT": + case 1: + message.documentCorrectness = 1; + break; + case "CORRECT": + case 2: + message.documentCorrectness = 2; + break; + } + switch (object.documentEfficiency) { + case "DOCUMENT_EFFICIENCY_UNSPECIFIED": + case 0: + message.documentEfficiency = 0; + break; + case "INEFFICIENT": + case 1: + message.documentEfficiency = 1; + break; + case "EFFICIENT": + case 2: + message.documentEfficiency = 2; + break; + } + if (object.summarizationFeedback != null) { + if (typeof object.summarizationFeedback !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.summarizationFeedback: object expected"); + message.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.fromObject(object.summarizationFeedback); } - if (object.allowLoadToDraftAndDiscardChanges != null) - message.allowLoadToDraftAndDiscardChanges = Boolean(object.allowLoadToDraftAndDiscardChanges); return message; }; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an AgentAssistantFeedback message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} message AgentAssistantFeedback * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { + AgentAssistantFeedback.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.environment = null; - object.updateMask = null; - object.allowLoadToDraftAndDiscardChanges = false; + object.answerRelevance = options.enums === String ? "ANSWER_RELEVANCE_UNSPECIFIED" : 0; + object.documentCorrectness = options.enums === String ? "DOCUMENT_CORRECTNESS_UNSPECIFIED" : 0; + object.documentEfficiency = options.enums === String ? "DOCUMENT_EFFICIENCY_UNSPECIFIED" : 0; + object.summarizationFeedback = null; } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dialogflow.v2beta1.Environment.toObject(message.environment, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.allowLoadToDraftAndDiscardChanges != null && message.hasOwnProperty("allowLoadToDraftAndDiscardChanges")) - object.allowLoadToDraftAndDiscardChanges = message.allowLoadToDraftAndDiscardChanges; + if (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) + object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] : message.answerRelevance; + if (message.documentCorrectness != null && message.hasOwnProperty("documentCorrectness")) + object.documentCorrectness = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] : message.documentCorrectness; + if (message.documentEfficiency != null && message.hasOwnProperty("documentEfficiency")) + object.documentEfficiency = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] : message.documentEfficiency; + if (message.summarizationFeedback != null && message.hasOwnProperty("summarizationFeedback")) + object.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.toObject(message.summarizationFeedback, options); return object; }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this AgentAssistantFeedback to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback * @instance * @returns {Object.} JSON object */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + AgentAssistantFeedback.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateEnvironmentRequest; + /** + * AnswerRelevance enum. + * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance + * @enum {number} + * @property {number} ANSWER_RELEVANCE_UNSPECIFIED=0 ANSWER_RELEVANCE_UNSPECIFIED value + * @property {number} IRRELEVANT=1 IRRELEVANT value + * @property {number} RELEVANT=2 RELEVANT value + */ + AgentAssistantFeedback.AnswerRelevance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANSWER_RELEVANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IRRELEVANT"] = 1; + values[valuesById[2] = "RELEVANT"] = 2; + return values; + })(); + + /** + * DocumentCorrectness enum. + * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness + * @enum {number} + * @property {number} DOCUMENT_CORRECTNESS_UNSPECIFIED=0 DOCUMENT_CORRECTNESS_UNSPECIFIED value + * @property {number} INCORRECT=1 INCORRECT value + * @property {number} CORRECT=2 CORRECT value + */ + AgentAssistantFeedback.DocumentCorrectness = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENT_CORRECTNESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCORRECT"] = 1; + values[valuesById[2] = "CORRECT"] = 2; + return values; + })(); + + /** + * DocumentEfficiency enum. + * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency + * @enum {number} + * @property {number} DOCUMENT_EFFICIENCY_UNSPECIFIED=0 DOCUMENT_EFFICIENCY_UNSPECIFIED value + * @property {number} INEFFICIENT=1 INEFFICIENT value + * @property {number} EFFICIENT=2 EFFICIENT value + */ + AgentAssistantFeedback.DocumentEfficiency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENT_EFFICIENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INEFFICIENT"] = 1; + values[valuesById[2] = "EFFICIENT"] = 2; + return values; + })(); + + AgentAssistantFeedback.SummarizationFeedback = (function() { + + /** + * Properties of a SummarizationFeedback. + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @interface ISummarizationFeedback + * @property {google.protobuf.ITimestamp|null} [startTimestamp] SummarizationFeedback startTimestamp + * @property {google.protobuf.ITimestamp|null} [submitTimestamp] SummarizationFeedback submitTimestamp + * @property {string|null} [summaryText] SummarizationFeedback summaryText + */ + + /** + * Constructs a new SummarizationFeedback. + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @classdesc Represents a SummarizationFeedback. + * @implements ISummarizationFeedback + * @constructor + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback=} [properties] Properties to set + */ + function SummarizationFeedback(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]]; + } + + /** + * SummarizationFeedback startTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} startTimestamp + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @instance + */ + SummarizationFeedback.prototype.startTimestamp = null; + + /** + * SummarizationFeedback submitTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} submitTimestamp + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @instance + */ + SummarizationFeedback.prototype.submitTimestamp = null; + + /** + * SummarizationFeedback summaryText. + * @member {string} summaryText + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @instance + */ + SummarizationFeedback.prototype.summaryText = ""; + + /** + * Creates a new SummarizationFeedback instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback instance + */ + SummarizationFeedback.create = function create(properties) { + return new SummarizationFeedback(properties); + }; + + /** + * Encodes the specified SummarizationFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback} message SummarizationFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationFeedback.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimestamp != null && Object.hasOwnProperty.call(message, "startTimestamp")) + $root.google.protobuf.Timestamp.encode(message.startTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.submitTimestamp != null && Object.hasOwnProperty.call(message, "submitTimestamp")) + $root.google.protobuf.Timestamp.encode(message.submitTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.summaryText != null && Object.hasOwnProperty.call(message, "summaryText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.summaryText); + return writer; + }; + + /** + * Encodes the specified SummarizationFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback} message SummarizationFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationFeedback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationFeedback message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationFeedback.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.v2beta1.AgentAssistantFeedback.SummarizationFeedback(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.submitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.summaryText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationFeedback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationFeedback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationFeedback message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationFeedback.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTimestamp); + if (error) + return "startTimestamp." + error; + } + if (message.submitTimestamp != null && message.hasOwnProperty("submitTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.submitTimestamp); + if (error) + return "submitTimestamp." + error; + } + if (message.summaryText != null && message.hasOwnProperty("summaryText")) + if (!$util.isString(message.summaryText)) + return "summaryText: string expected"; + return null; + }; + + /** + * Creates a SummarizationFeedback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback + */ + SummarizationFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback(); + if (object.startTimestamp != null) { + if (typeof object.startTimestamp !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.startTimestamp: object expected"); + message.startTimestamp = $root.google.protobuf.Timestamp.fromObject(object.startTimestamp); + } + if (object.submitTimestamp != null) { + if (typeof object.submitTimestamp !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.submitTimestamp: object expected"); + message.submitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.submitTimestamp); + } + if (object.summaryText != null) + message.summaryText = String(object.summaryText); + return message; + }; + + /** + * Creates a plain object from a SummarizationFeedback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @static + * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} message SummarizationFeedback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationFeedback.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTimestamp = null; + object.submitTimestamp = null; + object.summaryText = ""; + } + if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) + object.startTimestamp = $root.google.protobuf.Timestamp.toObject(message.startTimestamp, options); + if (message.submitTimestamp != null && message.hasOwnProperty("submitTimestamp")) + object.submitTimestamp = $root.google.protobuf.Timestamp.toObject(message.submitTimestamp, options); + if (message.summaryText != null && message.hasOwnProperty("summaryText")) + object.summaryText = message.summaryText; + return object; + }; + + /** + * Converts this SummarizationFeedback to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback + * @instance + * @returns {Object.} JSON object + */ + SummarizationFeedback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SummarizationFeedback; + })(); + + return AgentAssistantFeedback; })(); - v2beta1.DeleteEnvironmentRequest = (function() { + v2beta1.GetAnswerRecordRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a GetAnswerRecordRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name + * @interface IGetAnswerRecordRequest + * @property {string|null} [name] GetAnswerRecordRequest name */ /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new GetAnswerRecordRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a GetAnswerRecordRequest. + * @implements IGetAnswerRecordRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest=} [properties] Properties to set */ - function DeleteEnvironmentRequest(properties) { + function GetAnswerRecordRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -77947,35 +78002,35 @@ } /** - * DeleteEnvironmentRequest name. + * GetAnswerRecordRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @instance */ - DeleteEnvironmentRequest.prototype.name = ""; + GetAnswerRecordRequest.prototype.name = ""; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * Creates a new GetAnswerRecordRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest instance */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); + GetAnswerRecordRequest.create = function create(properties) { + return new GetAnswerRecordRequest(properties); }; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} message GetAnswerRecordRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { + GetAnswerRecordRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -77984,33 +78039,33 @@ }; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} message GetAnswerRecordRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAnswerRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetAnswerRecordRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest * @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) { + GetAnswerRecordRequest.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.v2beta1.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -78026,30 +78081,30 @@ }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAnswerRecordRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest * @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) { + GetAnswerRecordRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a GetAnswerRecordRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @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) { + GetAnswerRecordRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -78059,32 +78114,32 @@ }; /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest) + GetAnswerRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest(); 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 GetAnswerRecordRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} message GetAnswerRecordRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { + GetAnswerRecordRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -78096,39 +78151,39 @@ }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this GetAnswerRecordRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest * @instance * @returns {Object.} JSON object */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + GetAnswerRecordRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEnvironmentRequest; + return GetAnswerRecordRequest; })(); - v2beta1.GetEnvironmentHistoryRequest = (function() { + v2beta1.ListAnswerRecordsRequest = (function() { /** - * Properties of a GetEnvironmentHistoryRequest. + * Properties of a ListAnswerRecordsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetEnvironmentHistoryRequest - * @property {string|null} [parent] GetEnvironmentHistoryRequest parent - * @property {number|null} [pageSize] GetEnvironmentHistoryRequest pageSize - * @property {string|null} [pageToken] GetEnvironmentHistoryRequest pageToken + * @interface IListAnswerRecordsRequest + * @property {string|null} [parent] ListAnswerRecordsRequest parent + * @property {number|null} [pageSize] ListAnswerRecordsRequest pageSize + * @property {string|null} [pageToken] ListAnswerRecordsRequest pageToken */ /** - * Constructs a new GetEnvironmentHistoryRequest. + * Constructs a new ListAnswerRecordsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetEnvironmentHistoryRequest. - * @implements IGetEnvironmentHistoryRequest + * @classdesc Represents a ListAnswerRecordsRequest. + * @implements IListAnswerRecordsRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest=} [properties] Properties to set */ - function GetEnvironmentHistoryRequest(properties) { + function ListAnswerRecordsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78136,100 +78191,100 @@ } /** - * GetEnvironmentHistoryRequest parent. + * ListAnswerRecordsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @instance */ - GetEnvironmentHistoryRequest.prototype.parent = ""; + ListAnswerRecordsRequest.prototype.parent = ""; /** - * GetEnvironmentHistoryRequest pageSize. + * ListAnswerRecordsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @instance */ - GetEnvironmentHistoryRequest.prototype.pageSize = 0; + ListAnswerRecordsRequest.prototype.pageSize = 0; /** - * GetEnvironmentHistoryRequest pageToken. + * ListAnswerRecordsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @instance */ - GetEnvironmentHistoryRequest.prototype.pageToken = ""; + ListAnswerRecordsRequest.prototype.pageToken = ""; /** - * Creates a new GetEnvironmentHistoryRequest instance using the specified properties. + * Creates a new ListAnswerRecordsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest instance */ - GetEnvironmentHistoryRequest.create = function create(properties) { - return new GetEnvironmentHistoryRequest(properties); + ListAnswerRecordsRequest.create = function create(properties) { + return new ListAnswerRecordsRequest(properties); }; /** - * Encodes the specified GetEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified ListAnswerRecordsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} message ListAnswerRecordsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentHistoryRequest.encode = function encode(message, writer) { + ListAnswerRecordsRequest.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); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); return writer; }; /** - * Encodes the specified GetEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. + * Encodes the specified ListAnswerRecordsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} message ListAnswerRecordsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAnswerRecordsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer. + * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentHistoryRequest.decode = function decode(reader, length) { + ListAnswerRecordsRequest.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.v2beta1.GetEnvironmentHistoryRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.parent = reader.string(); break; - case 2: + case 3: message.pageSize = reader.int32(); break; - case 3: + case 4: message.pageToken = reader.string(); break; default: @@ -78241,30 +78296,30 @@ }; /** - * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { + ListAnswerRecordsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentHistoryRequest message. + * Verifies a ListAnswerRecordsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnvironmentHistoryRequest.verify = function verify(message) { + ListAnswerRecordsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -78280,17 +78335,17 @@ }; /** - * Creates a GetEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnswerRecordsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest */ - GetEnvironmentHistoryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest) + ListAnswerRecordsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -78301,15 +78356,15 @@ }; /** - * Creates a plain object from a GetEnvironmentHistoryRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAnswerRecordsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest + * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} message ListAnswerRecordsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentHistoryRequest.toObject = function toObject(message, options) { + ListAnswerRecordsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -78328,40 +78383,39 @@ }; /** - * Converts this GetEnvironmentHistoryRequest to JSON. + * Converts this ListAnswerRecordsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest * @instance * @returns {Object.} JSON object */ - GetEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { + ListAnswerRecordsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEnvironmentHistoryRequest; + return ListAnswerRecordsRequest; })(); - v2beta1.EnvironmentHistory = (function() { + v2beta1.ListAnswerRecordsResponse = (function() { /** - * Properties of an EnvironmentHistory. + * Properties of a ListAnswerRecordsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IEnvironmentHistory - * @property {string|null} [parent] EnvironmentHistory parent - * @property {Array.|null} [entries] EnvironmentHistory entries - * @property {string|null} [nextPageToken] EnvironmentHistory nextPageToken + * @interface IListAnswerRecordsResponse + * @property {Array.|null} [answerRecords] ListAnswerRecordsResponse answerRecords + * @property {string|null} [nextPageToken] ListAnswerRecordsResponse nextPageToken */ /** - * Constructs a new EnvironmentHistory. + * Constructs a new ListAnswerRecordsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an EnvironmentHistory. - * @implements IEnvironmentHistory + * @classdesc Represents a ListAnswerRecordsResponse. + * @implements IListAnswerRecordsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse=} [properties] Properties to set */ - function EnvironmentHistory(properties) { - this.entries = []; + function ListAnswerRecordsResponse(properties) { + this.answerRecords = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -78369,103 +78423,90 @@ } /** - * EnvironmentHistory parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory - * @instance - */ - EnvironmentHistory.prototype.parent = ""; - - /** - * EnvironmentHistory entries. - * @member {Array.} entries - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * ListAnswerRecordsResponse answerRecords. + * @member {Array.} answerRecords + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @instance */ - EnvironmentHistory.prototype.entries = $util.emptyArray; + ListAnswerRecordsResponse.prototype.answerRecords = $util.emptyArray; /** - * EnvironmentHistory nextPageToken. + * ListAnswerRecordsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @instance */ - EnvironmentHistory.prototype.nextPageToken = ""; + ListAnswerRecordsResponse.prototype.nextPageToken = ""; /** - * Creates a new EnvironmentHistory instance using the specified properties. + * Creates a new ListAnswerRecordsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory instance + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse instance */ - EnvironmentHistory.create = function create(properties) { - return new EnvironmentHistory(properties); + ListAnswerRecordsResponse.create = function create(properties) { + return new ListAnswerRecordsResponse(properties); }; /** - * Encodes the specified EnvironmentHistory message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. + * Encodes the specified ListAnswerRecordsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory} message EnvironmentHistory message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse} message ListAnswerRecordsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentHistory.encode = function encode(message, writer) { + ListAnswerRecordsResponse.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.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.answerRecords != null && message.answerRecords.length) + for (var i = 0; i < message.answerRecords.length; ++i) + $root.google.cloud.dialogflow.v2beta1.AnswerRecord.encode(message.answerRecords[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified EnvironmentHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. + * Encodes the specified ListAnswerRecordsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory} message EnvironmentHistory message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse} message ListAnswerRecordsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnvironmentHistory.encodeDelimited = function encodeDelimited(message, writer) { + ListAnswerRecordsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnvironmentHistory message from the specified reader or buffer. + * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentHistory.decode = function decode(reader, length) { + ListAnswerRecordsResponse.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.v2beta1.EnvironmentHistory(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + if (!(message.answerRecords && message.answerRecords.length)) + message.answerRecords = []; + message.answerRecords.push($root.google.cloud.dialogflow.v2beta1.AnswerRecord.decode(reader, reader.uint32())); break; case 2: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.decode(reader, reader.uint32())); - break; - case 3: message.nextPageToken = reader.string(); break; default: @@ -78477,42 +78518,39 @@ }; /** - * Decodes an EnvironmentHistory message from the specified reader or buffer, length delimited. + * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnvironmentHistory.decodeDelimited = function decodeDelimited(reader) { + ListAnswerRecordsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnvironmentHistory message. + * Verifies a ListAnswerRecordsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnvironmentHistory.verify = function verify(message) { + ListAnswerRecordsResponse.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.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify(message.entries[i]); + if (message.answerRecords != null && message.hasOwnProperty("answerRecords")) { + if (!Array.isArray(message.answerRecords)) + return "answerRecords: array expected"; + for (var i = 0; i < message.answerRecords.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.verify(message.answerRecords[i]); if (error) - return "entries." + error; + return "answerRecords." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -78522,27 +78560,25 @@ }; /** - * Creates an EnvironmentHistory message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnswerRecordsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory + * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse */ - EnvironmentHistory.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory) + ListAnswerRecordsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.entries: object expected"); - message.entries[i] = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.fromObject(object.entries[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse(); + if (object.answerRecords) { + if (!Array.isArray(object.answerRecords)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.answerRecords: array expected"); + message.answerRecords = []; + for (var i = 0; i < object.answerRecords.length; ++i) { + if (typeof object.answerRecords[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.answerRecords: object expected"); + message.answerRecords[i] = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.fromObject(object.answerRecords[i]); } } if (object.nextPageToken != null) @@ -78551,30 +78587,26 @@ }; /** - * Creates a plain object from an EnvironmentHistory message. Also converts values to other types if specified. + * Creates a plain object from a ListAnswerRecordsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory} message EnvironmentHistory + * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} message ListAnswerRecordsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnvironmentHistory.toObject = function toObject(message, options) { + ListAnswerRecordsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - object.parent = ""; + object.answerRecords = []; + if (options.defaults) object.nextPageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.toObject(message.entries[j], options); + if (message.answerRecords && message.answerRecords.length) { + object.answerRecords = []; + for (var j = 0; j < message.answerRecords.length; ++j) + object.answerRecords[j] = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.toObject(message.answerRecords[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -78582,394 +78614,127 @@ }; /** - * Converts this EnvironmentHistory to JSON. + * Converts this ListAnswerRecordsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse * @instance * @returns {Object.} JSON object */ - EnvironmentHistory.prototype.toJSON = function toJSON() { + ListAnswerRecordsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - EnvironmentHistory.Entry = (function() { + return ListAnswerRecordsResponse; + })(); - /** - * Properties of an Entry. - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory - * @interface IEntry - * @property {string|null} [agentVersion] Entry agentVersion - * @property {string|null} [description] Entry description - * @property {google.protobuf.ITimestamp|null} [createTime] Entry createTime - */ + v2beta1.UpdateAnswerRecordRequest = (function() { - /** - * Constructs a new Entry. - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry=} [properties] Properties to set - */ - function Entry(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 UpdateAnswerRecordRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IUpdateAnswerRecordRequest + * @property {google.cloud.dialogflow.v2beta1.IAnswerRecord|null} [answerRecord] UpdateAnswerRecordRequest answerRecord + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAnswerRecordRequest updateMask + */ - /** - * Entry agentVersion. - * @member {string} agentVersion - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @instance - */ - Entry.prototype.agentVersion = ""; + /** + * Constructs a new UpdateAnswerRecordRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an UpdateAnswerRecordRequest. + * @implements IUpdateAnswerRecordRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest=} [properties] Properties to set + */ + function UpdateAnswerRecordRequest(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]]; + } - /** - * Entry description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @instance - */ - Entry.prototype.description = ""; + /** + * UpdateAnswerRecordRequest answerRecord. + * @member {google.cloud.dialogflow.v2beta1.IAnswerRecord|null|undefined} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @instance + */ + UpdateAnswerRecordRequest.prototype.answerRecord = null; - /** - * Entry createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @instance - */ - Entry.prototype.createTime = null; + /** + * UpdateAnswerRecordRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @instance + */ + UpdateAnswerRecordRequest.prototype.updateMask = null; - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; + /** + * Creates a new UpdateAnswerRecordRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest instance + */ + UpdateAnswerRecordRequest.create = function create(properties) { + return new UpdateAnswerRecordRequest(properties); + }; - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agentVersion != null && Object.hasOwnProperty.call(message, "agentVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentVersion); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified UpdateAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} message UpdateAnswerRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAnswerRecordRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + $root.google.cloud.dialogflow.v2beta1.AnswerRecord.encode(message.answerRecord, 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 Entry message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.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.v2beta1.EnvironmentHistory.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.agentVersion = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) - if (!$util.isString(message.agentVersion)) - return "agentVersion: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry(); - if (object.agentVersion != null) - message.agentVersion = String(object.agentVersion); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @static - * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.agentVersion = ""; - object.description = ""; - object.createTime = null; - } - if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) - object.agentVersion = message.agentVersion; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Entry; - })(); - - return EnvironmentHistory; - })(); - - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.v2beta1.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 - */ - v2beta1.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; - })(); - - v2beta1.SpeechContext = (function() { - - /** - * Properties of a SpeechContext. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISpeechContext - * @property {Array.|null} [phrases] SpeechContext phrases - * @property {number|null} [boost] SpeechContext boost - */ - - /** - * Constructs a new SpeechContext. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SpeechContext. - * @implements ISpeechContext - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISpeechContext=} [properties] Properties to set - */ - function SpeechContext(properties) { - this.phrases = []; - 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 UpdateAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} message UpdateAnswerRecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAnswerRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * SpeechContext phrases. - * @member {Array.} phrases - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext - * @instance - */ - SpeechContext.prototype.phrases = $util.emptyArray; - - /** - * SpeechContext boost. - * @member {number} boost - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext - * @instance - */ - SpeechContext.prototype.boost = 0; - - /** - * Creates a new SpeechContext instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechContext=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext instance - */ - SpeechContext.create = function create(properties) { - return new SpeechContext(properties); - }; - - /** - * Encodes the specified SpeechContext message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechContext} message SpeechContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpeechContext.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phrases != null && message.phrases.length) - for (var i = 0; i < message.phrases.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.boost); - return writer; - }; - - /** - * Encodes the specified SpeechContext message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechContext} message SpeechContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpeechContext message from the specified reader or buffer. + * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext + * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechContext.decode = function decode(reader, length) { + UpdateAnswerRecordRequest.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.v2beta1.SpeechContext(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.phrases && message.phrases.length)) - message.phrases = []; - message.phrases.push(reader.string()); + message.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.decode(reader, reader.uint32()); break; case 2: - message.boost = reader.float(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -78980,620 +78745,630 @@ }; /** - * Decodes a SpeechContext message from the specified reader or buffer, length delimited. + * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext + * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechContext.decodeDelimited = function decodeDelimited(reader) { + UpdateAnswerRecordRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechContext message. + * Verifies an UpdateAnswerRecordRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechContext.verify = function verify(message) { + UpdateAnswerRecordRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { - if (!Array.isArray(message.phrases)) - return "phrases: array expected"; - for (var i = 0; i < message.phrases.length; ++i) - if (!$util.isString(message.phrases[i])) - return "phrases: string[] expected"; + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) { + var error = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.verify(message.answerRecord); + if (error) + return "answerRecord." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.boost != null && message.hasOwnProperty("boost")) - if (typeof message.boost !== "number") - return "boost: number expected"; return null; }; /** - * Creates a SpeechContext message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext + * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest */ - SpeechContext.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechContext) + UpdateAnswerRecordRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SpeechContext(); - if (object.phrases) { - if (!Array.isArray(object.phrases)) - throw TypeError(".google.cloud.dialogflow.v2beta1.SpeechContext.phrases: array expected"); - message.phrases = []; - for (var i = 0; i < object.phrases.length; ++i) - message.phrases[i] = String(object.phrases[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest(); + if (object.answerRecord != null) { + if (typeof object.answerRecord !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.answerRecord: object expected"); + message.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.fromObject(object.answerRecord); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.boost != null) - message.boost = Number(object.boost); return message; }; /** - * Creates a plain object from a SpeechContext message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAnswerRecordRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @static - * @param {google.cloud.dialogflow.v2beta1.SpeechContext} message SpeechContext + * @param {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} message UpdateAnswerRecordRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechContext.toObject = function toObject(message, options) { + UpdateAnswerRecordRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phrases = []; - if (options.defaults) - object.boost = 0; - if (message.phrases && message.phrases.length) { - object.phrases = []; - for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = message.phrases[j]; + if (options.defaults) { + object.answerRecord = null; + object.updateMask = null; } - if (message.boost != null && message.hasOwnProperty("boost")) - object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.toObject(message.answerRecord, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this SpeechContext to JSON. + * Converts this UpdateAnswerRecordRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SpeechContext + * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest * @instance * @returns {Object.} JSON object */ - SpeechContext.prototype.toJSON = function toJSON() { + UpdateAnswerRecordRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SpeechContext; - })(); - - /** - * SpeechModelVariant enum. - * @name google.cloud.dialogflow.v2beta1.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 - */ - v2beta1.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 UpdateAnswerRecordRequest; })(); - v2beta1.SpeechWordInfo = (function() { - - /** - * Properties of a SpeechWordInfo. - * @memberof google.cloud.dialogflow.v2beta1 - * @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 - */ + v2beta1.Participants = (function() { /** - * Constructs a new SpeechWordInfo. + * Constructs a new Participants service. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SpeechWordInfo. - * @implements ISpeechWordInfo + * @classdesc Represents a Participants + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo=} [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 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]]; + function Participants(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Participants.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Participants; + /** - * SpeechWordInfo word. - * @member {string} word - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @instance + * Creates new Participants service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @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 {Participants} RPC service. Useful where requests and/or responses are streamed. */ - SpeechWordInfo.prototype.word = ""; + Participants.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * SpeechWordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#createParticipant}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef CreateParticipantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant */ - SpeechWordInfo.prototype.startOffset = null; /** - * SpeechWordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo + * Calls CreateParticipant. + * @function createParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} request CreateParticipantRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.CreateParticipantCallback} callback Node-style callback called with the error, if any, and Participant + * @returns {undefined} + * @variation 1 */ - SpeechWordInfo.prototype.endOffset = null; + Object.defineProperty(Participants.prototype.createParticipant = function createParticipant(request, callback) { + return this.rpcCall(createParticipant, $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); + }, "name", { value: "CreateParticipant" }); /** - * SpeechWordInfo confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo + * Calls CreateParticipant. + * @function createParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} request CreateParticipantRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - SpeechWordInfo.prototype.confidence = 0; /** - * Creates a new SpeechWordInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#getParticipant}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef GetParticipantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant */ - SpeechWordInfo.create = function create(properties) { - return new SpeechWordInfo(properties); - }; /** - * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetParticipant. + * @function getParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} request GetParticipantRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.GetParticipantCallback} callback Node-style callback called with the error, if any, and Participant + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(Participants.prototype.getParticipant = function getParticipant(request, callback) { + return this.rpcCall(getParticipant, $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); + }, "name", { value: "GetParticipant" }); /** - * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetParticipant. + * @function getParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} request GetParticipantRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v2beta1.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.v2beta1.SpeechWordInfo} SpeechWordInfo - * @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.v2beta1.Participants#listParticipants}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef ListParticipantsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} [response] ListParticipantsResponse */ - 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.v2beta1.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.v2beta1.SpeechWordInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListParticipants. + * @function listParticipants + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} request ListParticipantsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.ListParticipantsCallback} callback Node-style callback called with the error, if any, and ListParticipantsResponse + * @returns {undefined} + * @variation 1 */ - SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Participants.prototype.listParticipants = function listParticipants(request, callback) { + return this.rpcCall(listParticipants, $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest, $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse, request, callback); + }, "name", { value: "ListParticipants" }); /** - * Verifies a SpeechWordInfo message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListParticipants. + * @function listParticipants + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} request ListParticipantsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - 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.v2beta1.SpeechWordInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#updateParticipant}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef UpdateParticipantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant */ - SpeechWordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo(); - if (object.word != null) - message.word = String(object.word); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.SpeechWordInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.SpeechWordInfo} message SpeechWordInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateParticipant. + * @function updateParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} request UpdateParticipantRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.UpdateParticipantCallback} callback Node-style callback called with the error, if any, and Participant + * @returns {undefined} + * @variation 1 */ - 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; - }; + Object.defineProperty(Participants.prototype.updateParticipant = function updateParticipant(request, callback) { + return this.rpcCall(updateParticipant, $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); + }, "name", { value: "UpdateParticipant" }); /** - * Converts this SpeechWordInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo + * Calls UpdateParticipant. + * @function updateParticipant + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} request UpdateParticipantRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - SpeechWordInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return SpeechWordInfo; - })(); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#analyzeContent}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef AnalyzeContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} [response] AnalyzeContentResponse + */ - v2beta1.InputAudioConfig = (function() { + /** + * Calls AnalyzeContent. + * @function analyzeContent + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} request AnalyzeContentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.AnalyzeContentCallback} callback Node-style callback called with the error, if any, and AnalyzeContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Participants.prototype.analyzeContent = function analyzeContent(request, callback) { + return this.rpcCall(analyzeContent, $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest, $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse, request, callback); + }, "name", { value: "AnalyzeContent" }); /** - * Properties of an InputAudioConfig. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IInputAudioConfig - * @property {google.cloud.dialogflow.v2beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz - * @property {string|null} [languageCode] InputAudioConfig languageCode - * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo - * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints - * @property {Array.|null} [speechContexts] InputAudioConfig speechContexts - * @property {string|null} [model] InputAudioConfig model - * @property {google.cloud.dialogflow.v2beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant - * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance - * @property {boolean|null} [disableNoSpeechRecognizedEvent] InputAudioConfig disableNoSpeechRecognizedEvent + * Calls AnalyzeContent. + * @function analyzeContent + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @instance + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} request AnalyzeContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new InputAudioConfig. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an InputAudioConfig. - * @implements IInputAudioConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig=} [properties] Properties to set + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestArticles}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef SuggestArticlesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} [response] SuggestArticlesResponse */ - function InputAudioConfig(properties) { - this.phraseHints = []; - this.speechContexts = []; - 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.v2beta1.AudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls SuggestArticles. + * @function suggestArticles + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} request SuggestArticlesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestArticlesCallback} callback Node-style callback called with the error, if any, and SuggestArticlesResponse + * @returns {undefined} + * @variation 1 */ - InputAudioConfig.prototype.audioEncoding = 0; + Object.defineProperty(Participants.prototype.suggestArticles = function suggestArticles(request, callback) { + return this.rpcCall(suggestArticles, $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest, $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse, request, callback); + }, "name", { value: "SuggestArticles" }); /** - * InputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls SuggestArticles. + * @function suggestArticles + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} request SuggestArticlesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - InputAudioConfig.prototype.sampleRateHertz = 0; /** - * InputAudioConfig languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestFaqAnswers}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef SuggestFaqAnswersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} [response] SuggestFaqAnswersResponse + */ + + /** + * Calls SuggestFaqAnswers. + * @function suggestFaqAnswers + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} request SuggestFaqAnswersRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswersCallback} callback Node-style callback called with the error, if any, and SuggestFaqAnswersResponse + * @returns {undefined} + * @variation 1 */ - InputAudioConfig.prototype.languageCode = ""; + Object.defineProperty(Participants.prototype.suggestFaqAnswers = function suggestFaqAnswers(request, callback) { + return this.rpcCall(suggestFaqAnswers, $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest, $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse, request, callback); + }, "name", { value: "SuggestFaqAnswers" }); /** - * InputAudioConfig enableWordInfo. - * @member {boolean} enableWordInfo - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls SuggestFaqAnswers. + * @function suggestFaqAnswers + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} request SuggestFaqAnswersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - InputAudioConfig.prototype.enableWordInfo = false; /** - * InputAudioConfig phraseHints. - * @member {Array.} phraseHints - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestSmartReplies}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef SuggestSmartRepliesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} [response] SuggestSmartRepliesResponse + */ + + /** + * Calls SuggestSmartReplies. + * @function suggestSmartReplies + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} request SuggestSmartRepliesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestSmartRepliesCallback} callback Node-style callback called with the error, if any, and SuggestSmartRepliesResponse + * @returns {undefined} + * @variation 1 */ - InputAudioConfig.prototype.phraseHints = $util.emptyArray; + Object.defineProperty(Participants.prototype.suggestSmartReplies = function suggestSmartReplies(request, callback) { + return this.rpcCall(suggestSmartReplies, $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest, $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse, request, callback); + }, "name", { value: "SuggestSmartReplies" }); /** - * InputAudioConfig speechContexts. - * @member {Array.} speechContexts - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls SuggestSmartReplies. + * @function suggestSmartReplies + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} request SuggestSmartRepliesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - InputAudioConfig.prototype.speechContexts = $util.emptyArray; /** - * InputAudioConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listSuggestions}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef ListSuggestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} [response] ListSuggestionsResponse + */ + + /** + * Calls ListSuggestions. + * @function listSuggestions + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} request ListSuggestionsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.ListSuggestionsCallback} callback Node-style callback called with the error, if any, and ListSuggestionsResponse + * @returns {undefined} + * @variation 1 */ - InputAudioConfig.prototype.model = ""; + Object.defineProperty(Participants.prototype.listSuggestions = function listSuggestions(request, callback) { + return this.rpcCall(listSuggestions, $root.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest, $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse, request, callback); + }, "name", { value: "ListSuggestions" }); /** - * InputAudioConfig modelVariant. - * @member {google.cloud.dialogflow.v2beta1.SpeechModelVariant} modelVariant - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls ListSuggestions. + * @function listSuggestions + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} request ListSuggestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - InputAudioConfig.prototype.modelVariant = 0; /** - * InputAudioConfig singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#compileSuggestion}. + * @memberof google.cloud.dialogflow.v2beta1.Participants + * @typedef CompileSuggestionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} [response] CompileSuggestionResponse + */ + + /** + * Calls CompileSuggestion. + * @function compileSuggestion + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} request CompileSuggestionRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Participants.CompileSuggestionCallback} callback Node-style callback called with the error, if any, and CompileSuggestionResponse + * @returns {undefined} + * @variation 1 */ - InputAudioConfig.prototype.singleUtterance = false; + Object.defineProperty(Participants.prototype.compileSuggestion = function compileSuggestion(request, callback) { + return this.rpcCall(compileSuggestion, $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest, $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse, request, callback); + }, "name", { value: "CompileSuggestion" }); /** - * InputAudioConfig disableNoSpeechRecognizedEvent. - * @member {boolean} disableNoSpeechRecognizedEvent - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * Calls CompileSuggestion. + * @function compileSuggestion + * @memberof google.cloud.dialogflow.v2beta1.Participants * @instance + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} request CompileSuggestionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - InputAudioConfig.prototype.disableNoSpeechRecognizedEvent = false; + + return Participants; + })(); + + v2beta1.Participant = (function() { /** - * Creates a new InputAudioConfig instance using the specified properties. + * Properties of a Participant. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IParticipant + * @property {string|null} [name] Participant name + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [role] Participant role + * @property {string|null} [obfuscatedExternalUserId] Participant obfuscatedExternalUserId + * @property {Object.|null} [documentsMetadataFilters] Participant documentsMetadataFilters + */ + + /** + * Constructs a new Participant. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a Participant. + * @implements IParticipant + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IParticipant=} [properties] Properties to set + */ + function Participant(properties) { + this.documentsMetadataFilters = {}; + 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]]; + } + + /** + * Participant name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Participant + * @instance + */ + Participant.prototype.name = ""; + + /** + * Participant role. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} role + * @memberof google.cloud.dialogflow.v2beta1.Participant + * @instance + */ + Participant.prototype.role = 0; + + /** + * Participant obfuscatedExternalUserId. + * @member {string} obfuscatedExternalUserId + * @memberof google.cloud.dialogflow.v2beta1.Participant + * @instance + */ + Participant.prototype.obfuscatedExternalUserId = ""; + + /** + * Participant documentsMetadataFilters. + * @member {Object.} documentsMetadataFilters + * @memberof google.cloud.dialogflow.v2beta1.Participant + * @instance + */ + Participant.prototype.documentsMetadataFilters = $util.emptyObject; + + /** + * Creates a new Participant instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static - * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig instance + * @param {google.cloud.dialogflow.v2beta1.IParticipant=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant instance */ - InputAudioConfig.create = function create(properties) { - return new InputAudioConfig(properties); + Participant.create = function create(properties) { + return new Participant(properties); }; /** - * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified Participant message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static - * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IParticipant} message Participant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encode = function encode(message, writer) { + Participant.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - 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.speechContexts != null && message.speechContexts.length) - for (var i = 0; i < message.speechContexts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); - if (message.disableNoSpeechRecognizedEvent != null && Object.hasOwnProperty.call(message, "disableNoSpeechRecognizedEvent")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.disableNoSpeechRecognizedEvent); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.role); + if (message.obfuscatedExternalUserId != null && Object.hasOwnProperty.call(message, "obfuscatedExternalUserId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.obfuscatedExternalUserId); + if (message.documentsMetadataFilters != null && Object.hasOwnProperty.call(message, "documentsMetadataFilters")) + for (var keys = Object.keys(message.documentsMetadataFilters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.documentsMetadataFilters[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. + * Encodes the specified Participant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static - * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IParticipant} message Participant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + Participant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer. + * Decodes a Participant message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant * @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) { + Participant.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.v2beta1.InputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Participant(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioEncoding = reader.int32(); + message.name = reader.string(); break; case 2: - message.sampleRateHertz = reader.int32(); - break; - case 3: - message.languageCode = reader.string(); - 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 11: - if (!(message.speechContexts && message.speechContexts.length)) - message.speechContexts = []; - message.speechContexts.push($root.google.cloud.dialogflow.v2beta1.SpeechContext.decode(reader, reader.uint32())); + message.role = reader.int32(); break; case 7: - message.model = reader.string(); - break; - case 10: - message.modelVariant = reader.int32(); + message.obfuscatedExternalUserId = reader.string(); break; case 8: - message.singleUtterance = reader.bool(); - break; - case 14: - message.disableNoSpeechRecognizedEvent = reader.bool(); + if (message.documentsMetadataFilters === $util.emptyObject) + message.documentsMetadataFilters = {}; + 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.documentsMetadataFilters[key] = value; break; default: reader.skipType(tag & 7); @@ -79604,296 +79379,196 @@ }; /** - * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a Participant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant * @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) { + Participant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputAudioConfig message. + * Verifies a Participant message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @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) { + Participant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - switch (message.audioEncoding) { + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { default: - return "audioEncoding: enum value expected"; + return "role: 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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string 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.speechContexts != null && message.hasOwnProperty("speechContexts")) { - if (!Array.isArray(message.speechContexts)) - return "speechContexts: array expected"; - for (var i = 0; i < message.speechContexts.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SpeechContext.verify(message.speechContexts[i]); - if (error) - return "speechContexts." + error; - } + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + if (!$util.isString(message.obfuscatedExternalUserId)) + return "obfuscatedExternalUserId: string expected"; + if (message.documentsMetadataFilters != null && message.hasOwnProperty("documentsMetadataFilters")) { + if (!$util.isObject(message.documentsMetadataFilters)) + return "documentsMetadataFilters: object expected"; + var key = Object.keys(message.documentsMetadataFilters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.documentsMetadataFilters[key[i]])) + return "documentsMetadataFilters: string{k: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"; - if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) - if (typeof message.disableNoSpeechRecognizedEvent !== "boolean") - return "disableNoSpeechRecognizedEvent: boolean expected"; return null; }; /** - * Creates an InputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Participant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant */ - InputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.InputAudioConfig) + Participant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Participant) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.InputAudioConfig(); - switch (object.audioEncoding) { - case "AUDIO_ENCODING_UNSPECIFIED": + var message = new $root.google.cloud.dialogflow.v2beta1.Participant(); + if (object.name != null) + message.name = String(object.name); + switch (object.role) { + case "ROLE_UNSPECIFIED": case 0: - message.audioEncoding = 0; + message.role = 0; break; - case "AUDIO_ENCODING_LINEAR_16": + case "HUMAN_AGENT": case 1: - message.audioEncoding = 1; + message.role = 1; break; - case "AUDIO_ENCODING_FLAC": + case "AUTOMATED_AGENT": case 2: - message.audioEncoding = 2; + message.role = 2; break; - case "AUDIO_ENCODING_MULAW": + case "END_USER": 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; + message.role = 3; break; } - if (object.sampleRateHertz != null) - message.sampleRateHertz = object.sampleRateHertz | 0; - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.enableWordInfo != null) - message.enableWordInfo = Boolean(object.enableWordInfo); - if (object.phraseHints) { - if (!Array.isArray(object.phraseHints)) - throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.phraseHints: array expected"); - message.phraseHints = []; - for (var i = 0; i < object.phraseHints.length; ++i) - message.phraseHints[i] = String(object.phraseHints[i]); - } - if (object.speechContexts) { - if (!Array.isArray(object.speechContexts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.speechContexts: array expected"); - message.speechContexts = []; - for (var i = 0; i < object.speechContexts.length; ++i) { - if (typeof object.speechContexts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.speechContexts: object expected"); - message.speechContexts[i] = $root.google.cloud.dialogflow.v2beta1.SpeechContext.fromObject(object.speechContexts[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.obfuscatedExternalUserId != null) + message.obfuscatedExternalUserId = String(object.obfuscatedExternalUserId); + if (object.documentsMetadataFilters) { + if (typeof object.documentsMetadataFilters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Participant.documentsMetadataFilters: object expected"); + message.documentsMetadataFilters = {}; + for (var keys = Object.keys(object.documentsMetadataFilters), i = 0; i < keys.length; ++i) + message.documentsMetadataFilters[keys[i]] = String(object.documentsMetadataFilters[keys[i]]); } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); - if (object.disableNoSpeechRecognizedEvent != null) - message.disableNoSpeechRecognizedEvent = Boolean(object.disableNoSpeechRecognizedEvent); return message; }; /** - * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a Participant message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @static - * @param {google.cloud.dialogflow.v2beta1.InputAudioConfig} message InputAudioConfig + * @param {google.cloud.dialogflow.v2beta1.Participant} message Participant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputAudioConfig.toObject = function toObject(message, options) { + Participant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.phraseHints = []; - object.speechContexts = []; - } + if (options.objects || options.defaults) + object.documentsMetadataFilters = {}; if (options.defaults) { - object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; - object.sampleRateHertz = 0; - object.languageCode = ""; - object.model = ""; - object.singleUtterance = false; - object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - object.enableWordInfo = false; - object.disableNoSpeechRecognizedEvent = false; - } - if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) - object.sampleRateHertz = message.sampleRateHertz; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.phraseHints && message.phraseHints.length) { - object.phraseHints = []; - for (var j = 0; j < message.phraseHints.length; ++j) - object.phraseHints[j] = message.phraseHints[j]; + object.name = ""; + object.role = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.obfuscatedExternalUserId = ""; } - 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.v2beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; - if (message.speechContexts && message.speechContexts.length) { - object.speechContexts = []; - for (var j = 0; j < message.speechContexts.length; ++j) - object.speechContexts[j] = $root.google.cloud.dialogflow.v2beta1.SpeechContext.toObject(message.speechContexts[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.role] : message.role; + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; + var keys2; + if (message.documentsMetadataFilters && (keys2 = Object.keys(message.documentsMetadataFilters)).length) { + object.documentsMetadataFilters = {}; + for (var j = 0; j < keys2.length; ++j) + object.documentsMetadataFilters[keys2[j]] = message.documentsMetadataFilters[keys2[j]]; } - if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) - object.enableWordInfo = message.enableWordInfo; - if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) - object.disableNoSpeechRecognizedEvent = message.disableNoSpeechRecognizedEvent; return object; }; /** - * Converts this InputAudioConfig to JSON. + * Converts this Participant to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.Participant * @instance * @returns {Object.} JSON object */ - InputAudioConfig.prototype.toJSON = function toJSON() { + Participant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return InputAudioConfig; - })(); + /** + * Role enum. + * @name google.cloud.dialogflow.v2beta1.Participant.Role + * @enum {number} + * @property {number} ROLE_UNSPECIFIED=0 ROLE_UNSPECIFIED value + * @property {number} HUMAN_AGENT=1 HUMAN_AGENT value + * @property {number} AUTOMATED_AGENT=2 AUTOMATED_AGENT value + * @property {number} END_USER=3 END_USER value + */ + Participant.Role = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HUMAN_AGENT"] = 1; + values[valuesById[2] = "AUTOMATED_AGENT"] = 2; + values[valuesById[3] = "END_USER"] = 3; + return values; + })(); - /** - * SsmlVoiceGender enum. - * @name google.cloud.dialogflow.v2beta1.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 - */ - v2beta1.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; + return Participant; })(); - v2beta1.VoiceSelectionParams = (function() { + v2beta1.Message = (function() { /** - * Properties of a VoiceSelectionParams. + * Properties of a Message. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IVoiceSelectionParams - * @property {string|null} [name] VoiceSelectionParams name - * @property {google.cloud.dialogflow.v2beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender + * @interface IMessage + * @property {string|null} [name] Message name + * @property {string|null} [content] Message content + * @property {string|null} [languageCode] Message languageCode + * @property {string|null} [participant] Message participant + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] Message participantRole + * @property {google.protobuf.ITimestamp|null} [createTime] Message createTime + * @property {google.protobuf.ITimestamp|null} [sendTime] Message sendTime + * @property {google.cloud.dialogflow.v2beta1.IMessageAnnotation|null} [messageAnnotation] Message messageAnnotation + * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null} [sentimentAnalysis] Message sentimentAnalysis */ /** - * Constructs a new VoiceSelectionParams. + * Constructs a new Message. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a VoiceSelectionParams. - * @implements IVoiceSelectionParams + * @classdesc Represents a Message. + * @implements IMessage * @constructor - * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IMessage=} [properties] Properties to set */ - function VoiceSelectionParams(properties) { + function Message(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -79901,80 +79576,150 @@ } /** - * VoiceSelectionParams name. + * Message name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @instance */ - VoiceSelectionParams.prototype.name = ""; + Message.prototype.name = ""; /** - * VoiceSelectionParams ssmlGender. - * @member {google.cloud.dialogflow.v2beta1.SsmlVoiceGender} ssmlGender - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * Message content. + * @member {string} content + * @memberof google.cloud.dialogflow.v2beta1.Message * @instance */ - VoiceSelectionParams.prototype.ssmlGender = 0; + Message.prototype.content = ""; /** - * Creates a new VoiceSelectionParams instance using the specified properties. + * Message languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.languageCode = ""; + + /** + * Message participant. + * @member {string} participant + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.participant = ""; + + /** + * Message participantRole. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.participantRole = 0; + + /** + * Message createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.createTime = null; + + /** + * Message sendTime. + * @member {google.protobuf.ITimestamp|null|undefined} sendTime + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.sendTime = null; + + /** + * Message messageAnnotation. + * @member {google.cloud.dialogflow.v2beta1.IMessageAnnotation|null|undefined} messageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.messageAnnotation = null; + + /** + * Message sentimentAnalysis. + * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null|undefined} sentimentAnalysis + * @memberof google.cloud.dialogflow.v2beta1.Message + * @instance + */ + Message.prototype.sentimentAnalysis = null; + + /** + * Creates a new Message instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static - * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams instance + * @param {google.cloud.dialogflow.v2beta1.IMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Message} Message instance */ - VoiceSelectionParams.create = function create(properties) { - return new VoiceSelectionParams(properties); + Message.create = function create(properties) { + return new Message(properties); }; /** - * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static - * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encode = function encode(message, writer) { + Message.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.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.participantRole); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.messageAnnotation != null && Object.hasOwnProperty.call(message, "messageAnnotation")) + $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.encode(message.messageAnnotation, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.sentimentAnalysis != null && Object.hasOwnProperty.call(message, "sentimentAnalysis")) + $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.encode(message.sentimentAnalysis, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sendTime != null && Object.hasOwnProperty.call(message, "sendTime")) + $root.google.protobuf.Timestamp.encode(message.sendTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static - * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { + Message.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer. + * Decodes a Message message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.v2beta1.Message} Message * @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) { + Message.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.v2beta1.VoiceSelectionParams(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Message(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -79982,7 +79727,28 @@ message.name = reader.string(); break; case 2: - message.ssmlGender = reader.int32(); + message.content = reader.string(); + break; + case 3: + message.languageCode = reader.string(); + break; + case 4: + message.participant = reader.string(); + break; + case 5: + message.participantRole = reader.int32(); + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.sendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.decode(reader, reader.uint32()); + break; + case 8: + message.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -79993,144 +79759,216 @@ }; /** - * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. + * Decodes a Message message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.v2beta1.Message} Message * @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) { + Message.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VoiceSelectionParams message. + * Verifies a Message message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @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) { + Message.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) { + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { default: - return "ssmlGender: enum value expected"; + return "participantRole: enum value expected"; case 0: case 1: case 2: case 3: break; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.sendTime != null && message.hasOwnProperty("sendTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.sendTime); + if (error) + return "sendTime." + error; + } + if (message.messageAnnotation != null && message.hasOwnProperty("messageAnnotation")) { + var error = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.verify(message.messageAnnotation); + if (error) + return "messageAnnotation." + error; + } + if (message.sentimentAnalysis != null && message.hasOwnProperty("sentimentAnalysis")) { + var error = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify(message.sentimentAnalysis); + if (error) + return "sentimentAnalysis." + error; + } return null; }; /** - * Creates a VoiceSelectionParams message from a plain object. Also converts values to their respective internal types. + * Creates a Message message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams + * @returns {google.cloud.dialogflow.v2beta1.Message} Message */ - VoiceSelectionParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams) + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Message) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams(); + var message = new $root.google.cloud.dialogflow.v2beta1.Message(); if (object.name != null) message.name = String(object.name); - switch (object.ssmlGender) { - case "SSML_VOICE_GENDER_UNSPECIFIED": + if (object.content != null) + message.content = String(object.content); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.participant != null) + message.participant = String(object.participant); + switch (object.participantRole) { + case "ROLE_UNSPECIFIED": case 0: - message.ssmlGender = 0; + message.participantRole = 0; break; - case "SSML_VOICE_GENDER_MALE": + case "HUMAN_AGENT": case 1: - message.ssmlGender = 1; + message.participantRole = 1; break; - case "SSML_VOICE_GENDER_FEMALE": + case "AUTOMATED_AGENT": case 2: - message.ssmlGender = 2; + message.participantRole = 2; break; - case "SSML_VOICE_GENDER_NEUTRAL": + case "END_USER": case 3: - message.ssmlGender = 3; + message.participantRole = 3; break; } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Message.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.sendTime != null) { + if (typeof object.sendTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Message.sendTime: object expected"); + message.sendTime = $root.google.protobuf.Timestamp.fromObject(object.sendTime); + } + if (object.messageAnnotation != null) { + if (typeof object.messageAnnotation !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Message.messageAnnotation: object expected"); + message.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.fromObject(object.messageAnnotation); + } + if (object.sentimentAnalysis != null) { + if (typeof object.sentimentAnalysis !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Message.sentimentAnalysis: object expected"); + message.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.fromObject(object.sentimentAnalysis); + } return message; }; /** - * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. + * Creates a plain object from a Message message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @static - * @param {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} message VoiceSelectionParams + * @param {google.cloud.dialogflow.v2beta1.Message} message Message * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceSelectionParams.toObject = function toObject(message, options) { + Message.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.content = ""; + object.languageCode = ""; + object.participant = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.createTime = null; + object.messageAnnotation = null; + object.sentimentAnalysis = null; + object.sendTime = null; } 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.v2beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.messageAnnotation != null && message.hasOwnProperty("messageAnnotation")) + object.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.toObject(message.messageAnnotation, options); + if (message.sentimentAnalysis != null && message.hasOwnProperty("sentimentAnalysis")) + object.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.toObject(message.sentimentAnalysis, options); + if (message.sendTime != null && message.hasOwnProperty("sendTime")) + object.sendTime = $root.google.protobuf.Timestamp.toObject(message.sendTime, options); return object; }; /** - * Converts this VoiceSelectionParams to JSON. + * Converts this Message to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams + * @memberof google.cloud.dialogflow.v2beta1.Message * @instance * @returns {Object.} JSON object */ - VoiceSelectionParams.prototype.toJSON = function toJSON() { + Message.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VoiceSelectionParams; + return Message; })(); - v2beta1.SynthesizeSpeechConfig = (function() { + v2beta1.CreateParticipantRequest = (function() { /** - * Properties of a SynthesizeSpeechConfig. + * Properties of a CreateParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @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.v2beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice + * @interface ICreateParticipantRequest + * @property {string|null} [parent] CreateParticipantRequest parent + * @property {google.cloud.dialogflow.v2beta1.IParticipant|null} [participant] CreateParticipantRequest participant */ /** - * Constructs a new SynthesizeSpeechConfig. + * Constructs a new CreateParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SynthesizeSpeechConfig. - * @implements ISynthesizeSpeechConfig + * @classdesc Represents a CreateParticipantRequest. + * @implements ICreateParticipantRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest=} [properties] Properties to set */ - function SynthesizeSpeechConfig(properties) { - this.effectsProfileId = []; + function CreateParticipantRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80138,130 +79976,88 @@ } /** - * SynthesizeSpeechConfig speakingRate. - * @member {number} speakingRate - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig - * @instance - */ - SynthesizeSpeechConfig.prototype.speakingRate = 0; - - /** - * SynthesizeSpeechConfig pitch. - * @member {number} pitch - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig - * @instance - */ - SynthesizeSpeechConfig.prototype.pitch = 0; - - /** - * SynthesizeSpeechConfig volumeGainDb. - * @member {number} volumeGainDb - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig - * @instance - */ - SynthesizeSpeechConfig.prototype.volumeGainDb = 0; - - /** - * SynthesizeSpeechConfig effectsProfileId. - * @member {Array.} effectsProfileId - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * CreateParticipantRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @instance */ - SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; + CreateParticipantRequest.prototype.parent = ""; /** - * SynthesizeSpeechConfig voice. - * @member {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null|undefined} voice - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * CreateParticipantRequest participant. + * @member {google.cloud.dialogflow.v2beta1.IParticipant|null|undefined} participant + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @instance */ - SynthesizeSpeechConfig.prototype.voice = null; + CreateParticipantRequest.prototype.participant = null; /** - * Creates a new SynthesizeSpeechConfig instance using the specified properties. + * Creates a new CreateParticipantRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest instance */ - SynthesizeSpeechConfig.create = function create(properties) { - return new SynthesizeSpeechConfig(properties); + CreateParticipantRequest.create = function create(properties) { + return new CreateParticipantRequest(properties); }; /** - * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified CreateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} message CreateParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encode = function encode(message, writer) { + CreateParticipantRequest.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.v2beta1.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participant, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. + * Encodes the specified CreateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} message CreateParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + CreateParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. + * Decodes a CreateParticipantRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest * @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) { + CreateParticipantRequest.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.v2beta1.SynthesizeSpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.speakingRate = reader.double(); + message.parent = reader.string(); 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.v2beta1.VoiceSelectionParams.decode(reader, reader.uint32()); + message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -80272,182 +80068,121 @@ }; /** - * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateParticipantRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest * @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) { + CreateParticipantRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SynthesizeSpeechConfig message. + * Verifies a CreateParticipantRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @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) { + CreateParticipantRequest.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.v2beta1.VoiceSelectionParams.verify(message.voice); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.participant != null && message.hasOwnProperty("participant")) { + var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participant); if (error) - return "voice." + error; + return "participant." + error; } return null; }; /** - * Creates a SynthesizeSpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateParticipantRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig + * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest */ - SynthesizeSpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig) + CreateParticipantRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.SynthesizeSpeechConfig.voice: object expected"); - message.voice = $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams.fromObject(object.voice); + var message = new $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.participant != null) { + if (typeof object.participant !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateParticipantRequest.participant: object expected"); + message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participant); } return message; }; /** - * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from a CreateParticipantRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig + * @param {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} message CreateParticipantRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SynthesizeSpeechConfig.toObject = function toObject(message, options) { + CreateParticipantRequest.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.v2beta1.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]; + object.parent = ""; + object.participant = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participant, options); return object; }; /** - * Converts this SynthesizeSpeechConfig to JSON. + * Converts this CreateParticipantRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest * @instance * @returns {Object.} JSON object */ - SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { + CreateParticipantRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SynthesizeSpeechConfig; - })(); - - /** - * OutputAudioEncoding enum. - * @name google.cloud.dialogflow.v2beta1.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 - */ - v2beta1.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; + return CreateParticipantRequest; })(); - v2beta1.OutputAudioConfig = (function() { + v2beta1.GetParticipantRequest = (function() { /** - * Properties of an OutputAudioConfig. + * Properties of a GetParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IOutputAudioConfig - * @property {google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding - * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz - * @property {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig + * @interface IGetParticipantRequest + * @property {string|null} [name] GetParticipantRequest name */ /** - * Constructs a new OutputAudioConfig. + * Constructs a new GetParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an OutputAudioConfig. - * @implements IOutputAudioConfig + * @classdesc Represents a GetParticipantRequest. + * @implements IGetParticipantRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest=} [properties] Properties to set */ - function OutputAudioConfig(properties) { + function GetParticipantRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80455,101 +80190,75 @@ } /** - * OutputAudioConfig audioEncoding. - * @member {google.cloud.dialogflow.v2beta1.OutputAudioEncoding} audioEncoding - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig - * @instance - */ - OutputAudioConfig.prototype.audioEncoding = 0; - - /** - * OutputAudioConfig sampleRateHertz. - * @member {number} sampleRateHertz - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig - * @instance - */ - OutputAudioConfig.prototype.sampleRateHertz = 0; - - /** - * OutputAudioConfig synthesizeSpeechConfig. - * @member {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * GetParticipantRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @instance */ - OutputAudioConfig.prototype.synthesizeSpeechConfig = null; + GetParticipantRequest.prototype.name = ""; /** - * Creates a new OutputAudioConfig instance using the specified properties. + * Creates a new GetParticipantRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig instance + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest instance */ - OutputAudioConfig.create = function create(properties) { - return new OutputAudioConfig(properties); + GetParticipantRequest.create = function create(properties) { + return new GetParticipantRequest(properties); }; /** - * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified GetParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} message GetParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encode = function encode(message, writer) { + GetParticipantRequest.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.v2beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, 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 OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. + * Encodes the specified GetParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} message GetParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { + GetParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer. + * Decodes a GetParticipantRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest * @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) { + GetParticipantRequest.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.v2beta1.OutputAudioConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest(); 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 3: - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -80560,207 +80269,109 @@ }; /** - * Decodes an OutputAudioConfig message from the specified reader or buffer, length delimited. + * Decodes a GetParticipantRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest * @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) { + GetParticipantRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudioConfig message. + * Verifies a GetParticipantRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @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) { + GetParticipantRequest.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.v2beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); - if (error) - return "synthesizeSpeechConfig." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an OutputAudioConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GetParticipantRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig + * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest */ - OutputAudioConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig) + GetParticipantRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); - message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); - } + var message = new $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. + * Creates a plain object from a GetParticipantRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.OutputAudioConfig} message OutputAudioConfig + * @param {google.cloud.dialogflow.v2beta1.GetParticipantRequest} message GetParticipantRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudioConfig.toObject = function toObject(message, options) { + GetParticipantRequest.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.v2beta1.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.v2beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this OutputAudioConfig to JSON. + * Converts this GetParticipantRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest * @instance * @returns {Object.} JSON object */ - OutputAudioConfig.prototype.toJSON = function toJSON() { + GetParticipantRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputAudioConfig; - })(); - - /** - * TelephonyDtmf enum. - * @name google.cloud.dialogflow.v2beta1.TelephonyDtmf - * @enum {number} - * @property {number} TELEPHONY_DTMF_UNSPECIFIED=0 TELEPHONY_DTMF_UNSPECIFIED value - * @property {number} DTMF_ONE=1 DTMF_ONE value - * @property {number} DTMF_TWO=2 DTMF_TWO value - * @property {number} DTMF_THREE=3 DTMF_THREE value - * @property {number} DTMF_FOUR=4 DTMF_FOUR value - * @property {number} DTMF_FIVE=5 DTMF_FIVE value - * @property {number} DTMF_SIX=6 DTMF_SIX value - * @property {number} DTMF_SEVEN=7 DTMF_SEVEN value - * @property {number} DTMF_EIGHT=8 DTMF_EIGHT value - * @property {number} DTMF_NINE=9 DTMF_NINE value - * @property {number} DTMF_ZERO=10 DTMF_ZERO value - * @property {number} DTMF_A=11 DTMF_A value - * @property {number} DTMF_B=12 DTMF_B value - * @property {number} DTMF_C=13 DTMF_C value - * @property {number} DTMF_D=14 DTMF_D value - * @property {number} DTMF_STAR=15 DTMF_STAR value - * @property {number} DTMF_POUND=16 DTMF_POUND value - */ - v2beta1.TelephonyDtmf = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TELEPHONY_DTMF_UNSPECIFIED"] = 0; - values[valuesById[1] = "DTMF_ONE"] = 1; - values[valuesById[2] = "DTMF_TWO"] = 2; - values[valuesById[3] = "DTMF_THREE"] = 3; - values[valuesById[4] = "DTMF_FOUR"] = 4; - values[valuesById[5] = "DTMF_FIVE"] = 5; - values[valuesById[6] = "DTMF_SIX"] = 6; - values[valuesById[7] = "DTMF_SEVEN"] = 7; - values[valuesById[8] = "DTMF_EIGHT"] = 8; - values[valuesById[9] = "DTMF_NINE"] = 9; - values[valuesById[10] = "DTMF_ZERO"] = 10; - values[valuesById[11] = "DTMF_A"] = 11; - values[valuesById[12] = "DTMF_B"] = 12; - values[valuesById[13] = "DTMF_C"] = 13; - values[valuesById[14] = "DTMF_D"] = 14; - values[valuesById[15] = "DTMF_STAR"] = 15; - values[valuesById[16] = "DTMF_POUND"] = 16; - return values; + return GetParticipantRequest; })(); - v2beta1.TelephonyDtmfEvents = (function() { + v2beta1.ListParticipantsRequest = (function() { /** - * Properties of a TelephonyDtmfEvents. + * Properties of a ListParticipantsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ITelephonyDtmfEvents - * @property {Array.|null} [dtmfEvents] TelephonyDtmfEvents dtmfEvents + * @interface IListParticipantsRequest + * @property {string|null} [parent] ListParticipantsRequest parent + * @property {number|null} [pageSize] ListParticipantsRequest pageSize + * @property {string|null} [pageToken] ListParticipantsRequest pageToken */ /** - * Constructs a new TelephonyDtmfEvents. + * Constructs a new ListParticipantsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a TelephonyDtmfEvents. - * @implements ITelephonyDtmfEvents + * @classdesc Represents a ListParticipantsRequest. + * @implements IListParticipantsRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest=} [properties] Properties to set */ - function TelephonyDtmfEvents(properties) { - this.dtmfEvents = []; + function ListParticipantsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80768,86 +80379,101 @@ } /** - * TelephonyDtmfEvents dtmfEvents. - * @member {Array.} dtmfEvents - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * ListParticipantsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @instance */ - TelephonyDtmfEvents.prototype.dtmfEvents = $util.emptyArray; + ListParticipantsRequest.prototype.parent = ""; /** - * Creates a new TelephonyDtmfEvents instance using the specified properties. + * ListParticipantsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @instance + */ + ListParticipantsRequest.prototype.pageSize = 0; + + /** + * ListParticipantsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @instance + */ + ListParticipantsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListParticipantsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents instance + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest instance */ - TelephonyDtmfEvents.create = function create(properties) { - return new TelephonyDtmfEvents(properties); + ListParticipantsRequest.create = function create(properties) { + return new ListParticipantsRequest(properties); }; /** - * Encodes the specified TelephonyDtmfEvents message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. + * Encodes the specified ListParticipantsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents} message TelephonyDtmfEvents message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} message ListParticipantsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TelephonyDtmfEvents.encode = function encode(message, writer) { + ListParticipantsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dtmfEvents != null && message.dtmfEvents.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.dtmfEvents.length; ++i) - writer.int32(message.dtmfEvents[i]); - writer.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 TelephonyDtmfEvents message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. + * Encodes the specified ListParticipantsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents} message TelephonyDtmfEvents message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} message ListParticipantsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TelephonyDtmfEvents.encodeDelimited = function encodeDelimited(message, writer) { + ListParticipantsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TelephonyDtmfEvents message from the specified reader or buffer. + * Decodes a ListParticipantsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TelephonyDtmfEvents.decode = function decode(reader, length) { + ListParticipantsRequest.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.v2beta1.TelephonyDtmfEvents(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.dtmfEvents && message.dtmfEvents.length)) - message.dtmfEvents = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.dtmfEvents.push(reader.int32()); - } else - message.dtmfEvents.push(reader.int32()); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -80858,209 +80484,126 @@ }; /** - * Decodes a TelephonyDtmfEvents message from the specified reader or buffer, length delimited. + * Decodes a ListParticipantsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TelephonyDtmfEvents.decodeDelimited = function decodeDelimited(reader) { + ListParticipantsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TelephonyDtmfEvents message. + * Verifies a ListParticipantsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TelephonyDtmfEvents.verify = function verify(message) { + ListParticipantsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dtmfEvents != null && message.hasOwnProperty("dtmfEvents")) { - if (!Array.isArray(message.dtmfEvents)) - return "dtmfEvents: array expected"; - for (var i = 0; i < message.dtmfEvents.length; ++i) - switch (message.dtmfEvents[i]) { - default: - return "dtmfEvents: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - 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 TelephonyDtmfEvents message from a plain object. Also converts values to their respective internal types. + * Creates a ListParticipantsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest */ - TelephonyDtmfEvents.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) + ListParticipantsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents(); - if (object.dtmfEvents) { - if (!Array.isArray(object.dtmfEvents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.dtmfEvents: array expected"); - message.dtmfEvents = []; - for (var i = 0; i < object.dtmfEvents.length; ++i) - switch (object.dtmfEvents[i]) { - default: - case "TELEPHONY_DTMF_UNSPECIFIED": - case 0: - message.dtmfEvents[i] = 0; - break; - case "DTMF_ONE": - case 1: - message.dtmfEvents[i] = 1; - break; - case "DTMF_TWO": - case 2: - message.dtmfEvents[i] = 2; - break; - case "DTMF_THREE": - case 3: - message.dtmfEvents[i] = 3; - break; - case "DTMF_FOUR": - case 4: - message.dtmfEvents[i] = 4; - break; - case "DTMF_FIVE": - case 5: - message.dtmfEvents[i] = 5; - break; - case "DTMF_SIX": - case 6: - message.dtmfEvents[i] = 6; - break; - case "DTMF_SEVEN": - case 7: - message.dtmfEvents[i] = 7; - break; - case "DTMF_EIGHT": - case 8: - message.dtmfEvents[i] = 8; - break; - case "DTMF_NINE": - case 9: - message.dtmfEvents[i] = 9; - break; - case "DTMF_ZERO": - case 10: - message.dtmfEvents[i] = 10; - break; - case "DTMF_A": - case 11: - message.dtmfEvents[i] = 11; - break; - case "DTMF_B": - case 12: - message.dtmfEvents[i] = 12; - break; - case "DTMF_C": - case 13: - message.dtmfEvents[i] = 13; - break; - case "DTMF_D": - case 14: - message.dtmfEvents[i] = 14; - break; - case "DTMF_STAR": - case 15: - message.dtmfEvents[i] = 15; - break; - case "DTMF_POUND": - case 16: - message.dtmfEvents[i] = 16; - break; - } - } + var message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest(); + 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 TelephonyDtmfEvents message. Also converts values to other types if specified. + * Creates a plain object from a ListParticipantsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} message TelephonyDtmfEvents + * @param {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} message ListParticipantsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TelephonyDtmfEvents.toObject = function toObject(message, options) { + ListParticipantsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dtmfEvents = []; - if (message.dtmfEvents && message.dtmfEvents.length) { - object.dtmfEvents = []; - for (var j = 0; j < message.dtmfEvents.length; ++j) - object.dtmfEvents[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.TelephonyDtmf[message.dtmfEvents[j]] : message.dtmfEvents[j]; + 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 TelephonyDtmfEvents to JSON. + * Converts this ListParticipantsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest * @instance * @returns {Object.} JSON object */ - TelephonyDtmfEvents.prototype.toJSON = function toJSON() { + ListParticipantsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TelephonyDtmfEvents; + return ListParticipantsRequest; })(); - v2beta1.SpeechToTextConfig = (function() { + v2beta1.ListParticipantsResponse = (function() { /** - * Properties of a SpeechToTextConfig. + * Properties of a ListParticipantsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISpeechToTextConfig - * @property {google.cloud.dialogflow.v2beta1.SpeechModelVariant|null} [speechModelVariant] SpeechToTextConfig speechModelVariant + * @interface IListParticipantsResponse + * @property {Array.|null} [participants] ListParticipantsResponse participants + * @property {string|null} [nextPageToken] ListParticipantsResponse nextPageToken */ /** - * Constructs a new SpeechToTextConfig. + * Constructs a new ListParticipantsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SpeechToTextConfig. - * @implements ISpeechToTextConfig + * @classdesc Represents a ListParticipantsResponse. + * @implements IListParticipantsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse=} [properties] Properties to set */ - function SpeechToTextConfig(properties) { + function ListParticipantsResponse(properties) { + this.participants = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81068,75 +80611,91 @@ } /** - * SpeechToTextConfig speechModelVariant. - * @member {google.cloud.dialogflow.v2beta1.SpeechModelVariant} speechModelVariant - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * ListParticipantsResponse participants. + * @member {Array.} participants + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @instance */ - SpeechToTextConfig.prototype.speechModelVariant = 0; + ListParticipantsResponse.prototype.participants = $util.emptyArray; /** - * Creates a new SpeechToTextConfig instance using the specified properties. + * ListParticipantsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse + * @instance + */ + ListParticipantsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListParticipantsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig instance + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse instance */ - SpeechToTextConfig.create = function create(properties) { - return new SpeechToTextConfig(properties); + ListParticipantsResponse.create = function create(properties) { + return new ListParticipantsResponse(properties); }; /** - * Encodes the specified SpeechToTextConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. + * Encodes the specified ListParticipantsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig} message SpeechToTextConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse} message ListParticipantsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextConfig.encode = function encode(message, writer) { + ListParticipantsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speechModelVariant != null && Object.hasOwnProperty.call(message, "speechModelVariant")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.speechModelVariant); + if (message.participants != null && message.participants.length) + for (var i = 0; i < message.participants.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participants[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 SpeechToTextConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. + * Encodes the specified ListParticipantsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig} message SpeechToTextConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse} message ListParticipantsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechToTextConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListParticipantsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechToTextConfig message from the specified reader or buffer. + * Decodes a ListParticipantsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextConfig.decode = function decode(reader, length) { + ListParticipantsResponse.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.v2beta1.SpeechToTextConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.speechModelVariant = reader.int32(); + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -81147,236 +80706,134 @@ }; /** - * Decodes a SpeechToTextConfig message from the specified reader or buffer, length delimited. + * Decodes a ListParticipantsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechToTextConfig.decodeDelimited = function decodeDelimited(reader) { + ListParticipantsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechToTextConfig message. + * Verifies a ListParticipantsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechToTextConfig.verify = function verify(message) { + ListParticipantsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speechModelVariant != null && message.hasOwnProperty("speechModelVariant")) - switch (message.speechModelVariant) { - default: - return "speechModelVariant: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.participants != null && message.hasOwnProperty("participants")) { + if (!Array.isArray(message.participants)) + return "participants: array expected"; + for (var i = 0; i < message.participants.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participants[i]); + if (error) + return "participants." + error; } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a SpeechToTextConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListParticipantsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig + * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse */ - SpeechToTextConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig) + ListParticipantsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig(); - switch (object.speechModelVariant) { - case "SPEECH_MODEL_VARIANT_UNSPECIFIED": - case 0: - message.speechModelVariant = 0; - break; - case "USE_BEST_AVAILABLE": - case 1: - message.speechModelVariant = 1; - break; - case "USE_STANDARD": - case 2: - message.speechModelVariant = 2; - break; - case "USE_ENHANCED": - case 3: - message.speechModelVariant = 3; - break; + var message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse(); + if (object.participants) { + if (!Array.isArray(object.participants)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListParticipantsResponse.participants: array expected"); + message.participants = []; + for (var i = 0; i < object.participants.length; ++i) { + if (typeof object.participants[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListParticipantsResponse.participants: object expected"); + message.participants[i] = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participants[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a SpeechToTextConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListParticipantsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} message SpeechToTextConfig + * @param {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} message ListParticipantsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechToTextConfig.toObject = function toObject(message, options) { + ListParticipantsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.participants = []; if (options.defaults) - object.speechModelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; - if (message.speechModelVariant != null && message.hasOwnProperty("speechModelVariant")) - object.speechModelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SpeechModelVariant[message.speechModelVariant] : message.speechModelVariant; + object.nextPageToken = ""; + if (message.participants && message.participants.length) { + object.participants = []; + for (var j = 0; j < message.participants.length; ++j) + object.participants[j] = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participants[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this SpeechToTextConfig to JSON. + * Converts this ListParticipantsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig + * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse * @instance * @returns {Object.} JSON object */ - SpeechToTextConfig.prototype.toJSON = function toJSON() { + ListParticipantsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SpeechToTextConfig; - })(); - - v2beta1.Fulfillments = (function() { - - /** - * Constructs a new Fulfillments service. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Fulfillments - * @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 Fulfillments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Fulfillments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Fulfillments; - - /** - * Creates new Fulfillments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @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 {Fulfillments} RPC service. Useful where requests and/or responses are streamed. - */ - Fulfillments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#getFulfillment}. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @typedef GetFulfillmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Fulfillment} [response] Fulfillment - */ - - /** - * Calls GetFulfillment. - * @function getFulfillment - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} request GetFulfillmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Fulfillments.GetFulfillmentCallback} callback Node-style callback called with the error, if any, and Fulfillment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Fulfillments.prototype.getFulfillment = function getFulfillment(request, callback) { - return this.rpcCall(getFulfillment, $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest, $root.google.cloud.dialogflow.v2beta1.Fulfillment, request, callback); - }, "name", { value: "GetFulfillment" }); - - /** - * Calls GetFulfillment. - * @function getFulfillment - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} request GetFulfillmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#updateFulfillment}. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @typedef UpdateFulfillmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Fulfillment} [response] Fulfillment - */ - - /** - * Calls UpdateFulfillment. - * @function updateFulfillment - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} request UpdateFulfillmentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Fulfillments.UpdateFulfillmentCallback} callback Node-style callback called with the error, if any, and Fulfillment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Fulfillments.prototype.updateFulfillment = function updateFulfillment(request, callback) { - return this.rpcCall(updateFulfillment, $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest, $root.google.cloud.dialogflow.v2beta1.Fulfillment, request, callback); - }, "name", { value: "UpdateFulfillment" }); - - /** - * Calls UpdateFulfillment. - * @function updateFulfillment - * @memberof google.cloud.dialogflow.v2beta1.Fulfillments - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} request UpdateFulfillmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Fulfillments; + return ListParticipantsResponse; })(); - v2beta1.Fulfillment = (function() { + v2beta1.UpdateParticipantRequest = (function() { /** - * Properties of a Fulfillment. + * Properties of an UpdateParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IFulfillment - * @property {string|null} [name] Fulfillment name - * @property {string|null} [displayName] Fulfillment displayName - * @property {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null} [genericWebService] Fulfillment genericWebService - * @property {boolean|null} [enabled] Fulfillment enabled - * @property {Array.|null} [features] Fulfillment features + * @interface IUpdateParticipantRequest + * @property {google.cloud.dialogflow.v2beta1.IParticipant|null} [participant] UpdateParticipantRequest participant + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateParticipantRequest updateMask */ /** - * Constructs a new Fulfillment. + * Constructs a new UpdateParticipantRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Fulfillment. - * @implements IFulfillment + * @classdesc Represents an UpdateParticipantRequest. + * @implements IUpdateParticipantRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IFulfillment=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest=} [properties] Properties to set */ - function Fulfillment(properties) { - this.features = []; + function UpdateParticipantRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81384,144 +80841,88 @@ } /** - * Fulfillment name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @instance - */ - Fulfillment.prototype.name = ""; - - /** - * Fulfillment displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @instance - */ - Fulfillment.prototype.displayName = ""; - - /** - * Fulfillment genericWebService. - * @member {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null|undefined} genericWebService - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @instance - */ - Fulfillment.prototype.genericWebService = null; - - /** - * Fulfillment enabled. - * @member {boolean} enabled - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @instance - */ - Fulfillment.prototype.enabled = false; - - /** - * Fulfillment features. - * @member {Array.} features - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * UpdateParticipantRequest participant. + * @member {google.cloud.dialogflow.v2beta1.IParticipant|null|undefined} participant + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @instance */ - Fulfillment.prototype.features = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateParticipantRequest.prototype.participant = null; /** - * Fulfillment fulfillment. - * @member {"genericWebService"|undefined} fulfillment - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * UpdateParticipantRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @instance */ - Object.defineProperty(Fulfillment.prototype, "fulfillment", { - get: $util.oneOfGetter($oneOfFields = ["genericWebService"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateParticipantRequest.prototype.updateMask = null; /** - * Creates a new Fulfillment instance using the specified properties. + * Creates a new UpdateParticipantRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IFulfillment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest instance */ - Fulfillment.create = function create(properties) { - return new Fulfillment(properties); + UpdateParticipantRequest.create = function create(properties) { + return new UpdateParticipantRequest(properties); }; /** - * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. + * Encodes the specified UpdateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} message UpdateParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encode = function encode(message, writer) { + UpdateParticipantRequest.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.v2beta1.Fulfillment.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); - if (message.features != null && message.features.length) - for (var i = 0; i < message.features.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.encode(message.features[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participant, 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 Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. + * Encodes the specified UpdateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IFulfillment} message Fulfillment message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} message UpdateParticipantRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { + UpdateParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fulfillment message from the specified reader or buffer. + * Decodes an UpdateParticipantRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest * @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) { + UpdateParticipantRequest.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.v2beta1.Fulfillment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32()); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.decode(reader, reader.uint32()); - break; - case 4: - message.enabled = reader.bool(); - break; - case 5: - if (!(message.features && message.features.length)) - message.features = []; - message.features.push($root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -81532,695 +80933,359 @@ }; /** - * Decodes a Fulfillment message from the specified reader or buffer, length delimited. + * Decodes an UpdateParticipantRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest * @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) { + UpdateParticipantRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fulfillment message. + * Verifies an UpdateParticipantRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @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) { + UpdateParticipantRequest.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.fulfillment = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify(message.genericWebService); - if (error) - return "genericWebService." + error; - } + if (message.participant != null && message.hasOwnProperty("participant")) { + var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participant); + if (error) + return "participant." + error; } - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - if (!Array.isArray(message.features)) - return "features: array expected"; - for (var i = 0; i < message.features.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify(message.features[i]); - if (error) - return "features." + 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 Fulfillment message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateParticipantRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment + * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest */ - Fulfillment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment) + UpdateParticipantRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment(); - 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.v2beta1.Fulfillment.genericWebService: object expected"); - message.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.fromObject(object.genericWebService); + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest(); + if (object.participant != null) { + if (typeof object.participant !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.participant: object expected"); + message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participant); } - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.features) { - if (!Array.isArray(object.features)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Fulfillment.features: array expected"); - message.features = []; - for (var i = 0; i < object.features.length; ++i) { - if (typeof object.features[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Fulfillment.features: object expected"); - message.features[i] = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.fromObject(object.features[i]); - } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. + * Creates a plain object from an UpdateParticipantRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment} message Fulfillment + * @param {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} message UpdateParticipantRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fulfillment.toObject = function toObject(message, options) { + UpdateParticipantRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.features = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.enabled = 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.genericWebService != null && message.hasOwnProperty("genericWebService")) { - object.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.toObject(message.genericWebService, options); - if (options.oneofs) - object.fulfillment = "genericWebService"; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.features && message.features.length) { - object.features = []; - for (var j = 0; j < message.features.length; ++j) - object.features[j] = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.toObject(message.features[j], options); + object.participant = null; + object.updateMask = null; } + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participant, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this Fulfillment to JSON. + * Converts this UpdateParticipantRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest * @instance * @returns {Object.} JSON object */ - Fulfillment.prototype.toJSON = function toJSON() { + UpdateParticipantRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Fulfillment.GenericWebService = (function() { - - /** - * Properties of a GenericWebService. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @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 - * @property {boolean|null} [isCloudFunction] GenericWebService isCloudFunction - */ - - /** - * Constructs a new GenericWebService. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @classdesc Represents a GenericWebService. - * @implements IGenericWebService - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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]]; - } + return UpdateParticipantRequest; + })(); - /** - * GenericWebService uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - */ - GenericWebService.prototype.uri = ""; + v2beta1.OutputAudio = (function() { - /** - * GenericWebService username. - * @member {string} username - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - */ - GenericWebService.prototype.username = ""; + /** + * Properties of an OutputAudio. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IOutputAudio + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [config] OutputAudio config + * @property {Uint8Array|null} [audio] OutputAudio audio + */ - /** - * GenericWebService password. - * @member {string} password - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - */ - GenericWebService.prototype.password = ""; + /** + * Constructs a new OutputAudio. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an OutputAudio. + * @implements IOutputAudio + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IOutputAudio=} [properties] Properties to set + */ + function OutputAudio(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]]; + } - /** - * GenericWebService requestHeaders. - * @member {Object.} requestHeaders - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - */ - GenericWebService.prototype.requestHeaders = $util.emptyObject; + /** + * OutputAudio config. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} config + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @instance + */ + OutputAudio.prototype.config = null; - /** - * GenericWebService isCloudFunction. - * @member {boolean} isCloudFunction - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - */ - GenericWebService.prototype.isCloudFunction = false; + /** + * OutputAudio audio. + * @member {Uint8Array} audio + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @instance + */ + OutputAudio.prototype.audio = $util.newBuffer([]); - /** - * Creates a new GenericWebService instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService} GenericWebService instance - */ - GenericWebService.create = function create(properties) { - return new GenericWebService(properties); - }; + /** + * Creates a new OutputAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.IOutputAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio instance + */ + OutputAudio.create = function create(properties) { + return new OutputAudio(properties); + }; - /** - * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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(); - if (message.isCloudFunction != null && Object.hasOwnProperty.call(message, "isCloudFunction")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isCloudFunction); - return writer; - }; + /** + * Encodes the specified OutputAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.IOutputAudio} message OutputAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudio.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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 GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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(); - }; + /** + * Encodes the specified OutputAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.IOutputAudio} message OutputAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputAudio.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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; - case 5: - message.isCloudFunction = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an OutputAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudio.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.v2beta1.OutputAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + break; + case 2: + message.audio = reader.bytes(); + 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.v2beta1.Fulfillment.GenericWebService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.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()); - }; + } + return message; + }; - /** - * Verifies a GenericWebService message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.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"; - } - if (message.isCloudFunction != null && message.hasOwnProperty("isCloudFunction")) - if (typeof message.isCloudFunction !== "boolean") - return "isCloudFunction: boolean expected"; - return null; - }; + /** + * Decodes an OutputAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService} GenericWebService - */ - GenericWebService.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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]]); - } - if (object.isCloudFunction != null) - message.isCloudFunction = Boolean(object.isCloudFunction); - return message; - }; + /** + * Verifies an OutputAudio message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputAudio.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.v2beta1.OutputAudioConfig.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"; + return null; + }; - /** - * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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 = ""; - object.isCloudFunction = false; - } - 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]]; - } - if (message.isCloudFunction != null && message.hasOwnProperty("isCloudFunction")) - object.isCloudFunction = message.isCloudFunction; + /** + * Creates an OutputAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio + */ + OutputAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.OutputAudio) return object; - }; - - /** - * Converts this GenericWebService to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService - * @instance - * @returns {Object.} JSON object - */ - GenericWebService.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenericWebService; - })(); - - Fulfillment.Feature = (function() { - - /** - * Properties of a Feature. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @interface IFeature - * @property {google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|null} [type] Feature type - */ - - /** - * Constructs a new Feature. - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment - * @classdesc Represents a Feature. - * @implements IFeature - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature=} [properties] Properties to set - */ - function Feature(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]]; + var message = new $root.google.cloud.dialogflow.v2beta1.OutputAudio(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.OutputAudio.config: object expected"); + message.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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; + }; - /** - * Feature type. - * @member {google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type} type - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @instance - */ - Feature.prototype.type = 0; - - /** - * Creates a new Feature instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature instance - */ - Feature.create = function create(properties) { - return new Feature(properties); - }; - - /** - * Encodes the specified Feature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature} message Feature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feature.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); - return writer; - }; - - /** - * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature} message Feature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Feature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feature.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.v2beta1.Fulfillment.Feature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Feature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Feature message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Feature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Feature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature - */ - Feature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SMALLTALK": - case 1: - message.type = 1; - break; + /** + * Creates a plain object from an OutputAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.OutputAudio} message OutputAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputAudio.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); } - return message; - }; - - /** - * Creates a plain object from a Feature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @static - * @param {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} message Feature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Feature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type[message.type] : message.type; - return object; - }; - - /** - * Converts this Feature to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature - * @instance - * @returns {Object.} JSON object - */ - Feature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Type enum. - * @name google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SMALLTALK=1 SMALLTALK value - */ - Feature.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SMALLTALK"] = 1; - return values; - })(); + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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; + }; - return Feature; - })(); + /** + * Converts this OutputAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @instance + * @returns {Object.} JSON object + */ + OutputAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Fulfillment; + return OutputAudio; })(); - v2beta1.GetFulfillmentRequest = (function() { + v2beta1.AutomatedAgentReply = (function() { /** - * Properties of a GetFulfillmentRequest. + * Properties of an AutomatedAgentReply. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetFulfillmentRequest - * @property {string|null} [name] GetFulfillmentRequest name + * @interface IAutomatedAgentReply + * @property {google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null} [detectIntentResponse] AutomatedAgentReply detectIntentResponse + * @property {Array.|null} [responseMessages] AutomatedAgentReply responseMessages + * @property {string|null} [intent] AutomatedAgentReply intent + * @property {string|null} [event] AutomatedAgentReply event + * @property {number|null} [matchConfidence] AutomatedAgentReply matchConfidence + * @property {google.protobuf.IStruct|null} [parameters] AutomatedAgentReply parameters + * @property {google.protobuf.IStruct|null} [cxSessionParameters] AutomatedAgentReply cxSessionParameters + * @property {google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|null} [automatedAgentReplyType] AutomatedAgentReply automatedAgentReplyType + * @property {boolean|null} [allowCancellation] AutomatedAgentReply allowCancellation */ /** - * Constructs a new GetFulfillmentRequest. + * Constructs a new AutomatedAgentReply. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetFulfillmentRequest. - * @implements IGetFulfillmentRequest + * @classdesc Represents an AutomatedAgentReply. + * @implements IAutomatedAgentReply * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply=} [properties] Properties to set */ - function GetFulfillmentRequest(properties) { + function AutomatedAgentReply(properties) { + this.responseMessages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82228,75 +81293,207 @@ } /** - * GetFulfillmentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * AutomatedAgentReply detectIntentResponse. + * @member {google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null|undefined} detectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @instance */ - GetFulfillmentRequest.prototype.name = ""; + AutomatedAgentReply.prototype.detectIntentResponse = null; /** - * Creates a new GetFulfillmentRequest instance using the specified properties. + * AutomatedAgentReply responseMessages. + * @member {Array.} responseMessages + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.responseMessages = $util.emptyArray; + + /** + * AutomatedAgentReply intent. + * @member {string|null|undefined} intent + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.intent = null; + + /** + * AutomatedAgentReply event. + * @member {string|null|undefined} event + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.event = null; + + /** + * AutomatedAgentReply matchConfidence. + * @member {number} matchConfidence + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.matchConfidence = 0; + + /** + * AutomatedAgentReply parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.parameters = null; + + /** + * AutomatedAgentReply cxSessionParameters. + * @member {google.protobuf.IStruct|null|undefined} cxSessionParameters + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.cxSessionParameters = null; + + /** + * AutomatedAgentReply automatedAgentReplyType. + * @member {google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType} automatedAgentReplyType + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.automatedAgentReplyType = 0; + + /** + * AutomatedAgentReply allowCancellation. + * @member {boolean} allowCancellation + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + AutomatedAgentReply.prototype.allowCancellation = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomatedAgentReply response. + * @member {"detectIntentResponse"|undefined} response + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + Object.defineProperty(AutomatedAgentReply.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["detectIntentResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AutomatedAgentReply match. + * @member {"intent"|"event"|undefined} match + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @instance + */ + Object.defineProperty(AutomatedAgentReply.prototype, "match", { + get: $util.oneOfGetter($oneOfFields = ["intent", "event"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomatedAgentReply instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply instance */ - GetFulfillmentRequest.create = function create(properties) { - return new GetFulfillmentRequest(properties); + AutomatedAgentReply.create = function create(properties) { + return new AutomatedAgentReply(properties); }; /** - * Encodes the specified GetFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. + * Encodes the specified AutomatedAgentReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} message GetFulfillmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply} message AutomatedAgentReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFulfillmentRequest.encode = function encode(message, writer) { + AutomatedAgentReply.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.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) + $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.responseMessages != null && message.responseMessages.length) + for (var i = 0; i < message.responseMessages.length; ++i) + $root.google.cloud.dialogflow.v2beta1.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.intent); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.event); + if (message.cxSessionParameters != null && Object.hasOwnProperty.call(message, "cxSessionParameters")) + $root.google.protobuf.Struct.encode(message.cxSessionParameters, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.automatedAgentReplyType != null && Object.hasOwnProperty.call(message, "automatedAgentReplyType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.automatedAgentReplyType); + if (message.allowCancellation != null && Object.hasOwnProperty.call(message, "allowCancellation")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.allowCancellation); + if (message.matchConfidence != null && Object.hasOwnProperty.call(message, "matchConfidence")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.matchConfidence); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. + * Encodes the specified AutomatedAgentReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static - * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} message GetFulfillmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply} message AutomatedAgentReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFulfillmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + AutomatedAgentReply.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFulfillmentRequest message from the specified reader or buffer. + * Decodes an AutomatedAgentReply message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFulfillmentRequest.decode = function decode(reader, length) { + AutomatedAgentReply.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.v2beta1.GetFulfillmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.responseMessages && message.responseMessages.length)) + message.responseMessages = []; + message.responseMessages.push($root.google.cloud.dialogflow.v2beta1.ResponseMessage.decode(reader, reader.uint32())); + break; + case 4: + message.intent = reader.string(); + break; + case 5: + message.event = reader.string(); + break; + case 9: + message.matchConfidence = reader.float(); + break; + case 10: + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 6: + message.cxSessionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 7: + message.automatedAgentReplyType = reader.int32(); + break; + case 8: + message.allowCancellation = reader.bool(); break; default: reader.skipType(tag & 7); @@ -82307,108 +81504,255 @@ }; /** - * Decodes a GetFulfillmentRequest message from the specified reader or buffer, length delimited. + * Decodes an AutomatedAgentReply message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFulfillmentRequest.decodeDelimited = function decodeDelimited(reader) { + AutomatedAgentReply.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFulfillmentRequest message. + * Verifies an AutomatedAgentReply message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFulfillmentRequest.verify = function verify(message) { + AutomatedAgentReply.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"; + var properties = {}; + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + properties.response = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify(message.detectIntentResponse); + if (error) + return "detectIntentResponse." + 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.v2beta1.ResponseMessage.verify(message.responseMessages[i]); + if (error) + return "responseMessages." + error; + } + } + if (message.intent != null && message.hasOwnProperty("intent")) { + properties.match = 1; + if (!$util.isString(message.intent)) + return "intent: string expected"; + } + if (message.event != null && message.hasOwnProperty("event")) { + if (properties.match === 1) + return "match: multiple values"; + properties.match = 1; + if (!$util.isString(message.event)) + return "event: string expected"; + } + if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) + if (typeof message.matchConfidence !== "number") + return "matchConfidence: number expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); + if (error) + return "parameters." + error; + } + if (message.cxSessionParameters != null && message.hasOwnProperty("cxSessionParameters")) { + var error = $root.google.protobuf.Struct.verify(message.cxSessionParameters); + if (error) + return "cxSessionParameters." + error; + } + if (message.automatedAgentReplyType != null && message.hasOwnProperty("automatedAgentReplyType")) + switch (message.automatedAgentReplyType) { + default: + return "automatedAgentReplyType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) + if (typeof message.allowCancellation !== "boolean") + return "allowCancellation: boolean expected"; return null; }; /** - * Creates a GetFulfillmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AutomatedAgentReply message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply */ - GetFulfillmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest) + AutomatedAgentReply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply(); + if (object.detectIntentResponse != null) { + if (typeof object.detectIntentResponse !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.detectIntentResponse: object expected"); + message.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.fromObject(object.detectIntentResponse); + } + if (object.responseMessages) { + if (!Array.isArray(object.responseMessages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.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.v2beta1.AutomatedAgentReply.responseMessages: object expected"); + message.responseMessages[i] = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.fromObject(object.responseMessages[i]); + } + } + if (object.intent != null) + message.intent = String(object.intent); + if (object.event != null) + message.event = String(object.event); + if (object.matchConfidence != null) + message.matchConfidence = Number(object.matchConfidence); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.cxSessionParameters != null) { + if (typeof object.cxSessionParameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cxSessionParameters: object expected"); + message.cxSessionParameters = $root.google.protobuf.Struct.fromObject(object.cxSessionParameters); + } + switch (object.automatedAgentReplyType) { + case "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": + case 0: + message.automatedAgentReplyType = 0; + break; + case "PARTIAL": + case 1: + message.automatedAgentReplyType = 1; + break; + case "FINAL": + case 2: + message.automatedAgentReplyType = 2; + break; + } + if (object.allowCancellation != null) + message.allowCancellation = Boolean(object.allowCancellation); return message; }; /** - * Creates a plain object from a GetFulfillmentRequest message. Also converts values to other types if specified. + * Creates a plain object from an AutomatedAgentReply message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @static - * @param {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} message GetFulfillmentRequest + * @param {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} message AutomatedAgentReply * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFulfillmentRequest.toObject = function toObject(message, options) { + AutomatedAgentReply.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.arrays || options.defaults) + object.responseMessages = []; + if (options.defaults) { + object.cxSessionParameters = null; + object.automatedAgentReplyType = options.enums === String ? "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED" : 0; + object.allowCancellation = false; + object.matchConfidence = 0; + object.parameters = null; + } + if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { + object.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.toObject(message.detectIntentResponse, options); + if (options.oneofs) + object.response = "detectIntentResponse"; + } + if (message.responseMessages && message.responseMessages.length) { + object.responseMessages = []; + for (var j = 0; j < message.responseMessages.length; ++j) + object.responseMessages[j] = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.toObject(message.responseMessages[j], options); + } + if (message.intent != null && message.hasOwnProperty("intent")) { + object.intent = message.intent; + if (options.oneofs) + object.match = "intent"; + } + if (message.event != null && message.hasOwnProperty("event")) { + object.event = message.event; + if (options.oneofs) + object.match = "event"; + } + if (message.cxSessionParameters != null && message.hasOwnProperty("cxSessionParameters")) + object.cxSessionParameters = $root.google.protobuf.Struct.toObject(message.cxSessionParameters, options); + if (message.automatedAgentReplyType != null && message.hasOwnProperty("automatedAgentReplyType")) + object.automatedAgentReplyType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] : message.automatedAgentReplyType; + if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) + object.allowCancellation = message.allowCancellation; + if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) + object.matchConfidence = options.json && !isFinite(message.matchConfidence) ? String(message.matchConfidence) : message.matchConfidence; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); return object; }; /** - * Converts this GetFulfillmentRequest to JSON. + * Converts this AutomatedAgentReply to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply * @instance * @returns {Object.} JSON object */ - GetFulfillmentRequest.prototype.toJSON = function toJSON() { + AutomatedAgentReply.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetFulfillmentRequest; + /** + * AutomatedAgentReplyType enum. + * @name google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType + * @enum {number} + * @property {number} AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED=0 AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED value + * @property {number} PARTIAL=1 PARTIAL value + * @property {number} FINAL=2 FINAL value + */ + AutomatedAgentReply.AutomatedAgentReplyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARTIAL"] = 1; + values[valuesById[2] = "FINAL"] = 2; + return values; + })(); + + return AutomatedAgentReply; })(); - v2beta1.UpdateFulfillmentRequest = (function() { + v2beta1.SuggestionFeature = (function() { /** - * Properties of an UpdateFulfillmentRequest. + * Properties of a SuggestionFeature. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateFulfillmentRequest - * @property {google.cloud.dialogflow.v2beta1.IFulfillment|null} [fulfillment] UpdateFulfillmentRequest fulfillment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFulfillmentRequest updateMask + * @interface ISuggestionFeature + * @property {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null} [type] SuggestionFeature type */ /** - * Constructs a new UpdateFulfillmentRequest. + * Constructs a new SuggestionFeature. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateFulfillmentRequest. - * @implements IUpdateFulfillmentRequest + * @classdesc Represents a SuggestionFeature. + * @implements ISuggestionFeature * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature=} [properties] Properties to set */ - function UpdateFulfillmentRequest(properties) { + function SuggestionFeature(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82416,88 +81760,75 @@ } /** - * UpdateFulfillmentRequest fulfillment. - * @member {google.cloud.dialogflow.v2beta1.IFulfillment|null|undefined} fulfillment - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest - * @instance - */ - UpdateFulfillmentRequest.prototype.fulfillment = null; - - /** - * UpdateFulfillmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * SuggestionFeature type. + * @member {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} type + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @instance */ - UpdateFulfillmentRequest.prototype.updateMask = null; + SuggestionFeature.prototype.type = 0; /** - * Creates a new UpdateFulfillmentRequest instance using the specified properties. + * Creates a new SuggestionFeature instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature instance */ - UpdateFulfillmentRequest.create = function create(properties) { - return new UpdateFulfillmentRequest(properties); + SuggestionFeature.create = function create(properties) { + return new SuggestionFeature(properties); }; /** - * Encodes the specified UpdateFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. + * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} message UpdateFulfillmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature} message SuggestionFeature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFulfillmentRequest.encode = function encode(message, writer) { + SuggestionFeature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) - $root.google.cloud.dialogflow.v2beta1.Fulfillment.encode(message.fulfillment, 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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); return writer; }; /** - * Encodes the specified UpdateFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. + * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} message UpdateFulfillmentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature} message SuggestionFeature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateFulfillmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionFeature.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer. + * Decodes a SuggestionFeature message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFulfillmentRequest.decode = function decode(reader, length) { + SuggestionFeature.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.v2beta1.UpdateFulfillmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestionFeature(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.type = reader.int32(); break; default: reader.skipType(tag & 7); @@ -82508,129 +81839,149 @@ }; /** - * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateFulfillmentRequest.decodeDelimited = function decodeDelimited(reader) { + SuggestionFeature.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateFulfillmentRequest message. + * Verifies a SuggestionFeature message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateFulfillmentRequest.verify = function verify(message) { + SuggestionFeature.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { - var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.verify(message.fulfillment); - if (error) - return "fulfillment." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates an UpdateFulfillmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature */ - UpdateFulfillmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest) + SuggestionFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestionFeature) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest(); - if (object.fulfillment != null) { - if (typeof object.fulfillment !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.fulfillment: object expected"); - message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.fromObject(object.fulfillment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestionFeature(); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.type = 1; + break; + case "FAQ": + case 2: + message.type = 2; + break; + case "SMART_REPLY": + case 3: + message.type = 3; + break; } return message; }; /** - * Creates a plain object from an UpdateFulfillmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} message UpdateFulfillmentRequest + * @param {google.cloud.dialogflow.v2beta1.SuggestionFeature} message SuggestionFeature * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateFulfillmentRequest.toObject = function toObject(message, options) { + SuggestionFeature.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fulfillment = null; - object.updateMask = null; - } - if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) - object.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.toObject(message.fulfillment, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.type] : message.type; return object; }; /** - * Converts this UpdateFulfillmentRequest to JSON. + * Converts this SuggestionFeature to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature * @instance * @returns {Object.} JSON object */ - UpdateFulfillmentRequest.prototype.toJSON = function toJSON() { + SuggestionFeature.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateFulfillmentRequest; + /** + * Type enum. + * @name google.cloud.dialogflow.v2beta1.SuggestionFeature.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ARTICLE_SUGGESTION=1 ARTICLE_SUGGESTION value + * @property {number} FAQ=2 FAQ value + * @property {number} SMART_REPLY=3 SMART_REPLY value + */ + SuggestionFeature.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ARTICLE_SUGGESTION"] = 1; + values[valuesById[2] = "FAQ"] = 2; + values[valuesById[3] = "SMART_REPLY"] = 3; + return values; + })(); + + return SuggestionFeature; })(); - v2beta1.ValidationError = (function() { + v2beta1.AssistQueryParameters = (function() { /** - * Properties of a ValidationError. + * Properties of an AssistQueryParameters. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IValidationError - * @property {google.cloud.dialogflow.v2beta1.ValidationError.Severity|null} [severity] ValidationError severity - * @property {Array.|null} [entries] ValidationError entries - * @property {string|null} [errorMessage] ValidationError errorMessage + * @interface IAssistQueryParameters + * @property {Object.|null} [documentsMetadataFilters] AssistQueryParameters documentsMetadataFilters */ /** - * Constructs a new ValidationError. + * Constructs a new AssistQueryParameters. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ValidationError. - * @implements IValidationError + * @classdesc Represents an AssistQueryParameters. + * @implements IAssistQueryParameters * @constructor - * @param {google.cloud.dialogflow.v2beta1.IValidationError=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters=} [properties] Properties to set */ - function ValidationError(properties) { - this.entries = []; + function AssistQueryParameters(properties) { + this.documentsMetadataFilters = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82638,104 +81989,95 @@ } /** - * ValidationError severity. - * @member {google.cloud.dialogflow.v2beta1.ValidationError.Severity} severity - * @memberof google.cloud.dialogflow.v2beta1.ValidationError - * @instance - */ - ValidationError.prototype.severity = 0; - - /** - * ValidationError entries. - * @member {Array.} entries - * @memberof google.cloud.dialogflow.v2beta1.ValidationError - * @instance - */ - ValidationError.prototype.entries = $util.emptyArray; - - /** - * ValidationError errorMessage. - * @member {string} errorMessage - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * AssistQueryParameters documentsMetadataFilters. + * @member {Object.} documentsMetadataFilters + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @instance */ - ValidationError.prototype.errorMessage = ""; + AssistQueryParameters.prototype.documentsMetadataFilters = $util.emptyObject; /** - * Creates a new ValidationError instance using the specified properties. + * Creates a new AssistQueryParameters instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationError=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError instance + * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters instance */ - ValidationError.create = function create(properties) { - return new ValidationError(properties); + AssistQueryParameters.create = function create(properties) { + return new AssistQueryParameters(properties); }; /** - * Encodes the specified ValidationError message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. + * Encodes the specified AssistQueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationError} message ValidationError message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters} message AssistQueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationError.encode = function encode(message, writer) { + AssistQueryParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entries[i]); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.errorMessage); + if (message.documentsMetadataFilters != null && Object.hasOwnProperty.call(message, "documentsMetadataFilters")) + for (var keys = Object.keys(message.documentsMetadataFilters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.documentsMetadataFilters[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ValidationError message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationError.verify|verify} messages. + * Encodes the specified AssistQueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationError} message ValidationError message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters} message AssistQueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationError.encodeDelimited = function encodeDelimited(message, writer) { + AssistQueryParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationError message from the specified reader or buffer. + * Decodes an AssistQueryParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError + * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationError.decode = function decode(reader, length) { + AssistQueryParameters.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.v2beta1.ValidationError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.severity = reader.int32(); - break; - case 3: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push(reader.string()); - break; - case 4: - message.errorMessage = reader.string(); + if (message.documentsMetadataFilters === $util.emptyObject) + message.documentsMetadataFilters = {}; + 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.documentsMetadataFilters[key] = value; break; default: reader.skipType(tag & 7); @@ -82746,186 +82088,128 @@ }; /** - * Decodes a ValidationError message from the specified reader or buffer, length delimited. + * Decodes an AssistQueryParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError + * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationError.decodeDelimited = function decodeDelimited(reader) { + AssistQueryParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationError message. + * Verifies an AssistQueryParameters message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationError.verify = function verify(message) { + AssistQueryParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) - if (!$util.isString(message.entries[i])) - return "entries: string[] expected"; + if (message.documentsMetadataFilters != null && message.hasOwnProperty("documentsMetadataFilters")) { + if (!$util.isObject(message.documentsMetadataFilters)) + return "documentsMetadataFilters: object expected"; + var key = Object.keys(message.documentsMetadataFilters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.documentsMetadataFilters[key[i]])) + return "documentsMetadataFilters: string{k:string} expected"; } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; return null; }; /** - * Creates a ValidationError message from a plain object. Also converts values to their respective internal types. + * Creates an AssistQueryParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ValidationError} ValidationError + * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters */ - ValidationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ValidationError) + AssistQueryParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ValidationError(); - switch (object.severity) { - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "INFO": - case 1: - message.severity = 1; - break; - case "WARNING": - case 2: - message.severity = 2; - break; - case "ERROR": - case 3: - message.severity = 3; - break; - case "CRITICAL": - case 4: - message.severity = 4; - break; - } - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationError.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) - message.entries[i] = String(object.entries[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters(); + if (object.documentsMetadataFilters) { + if (typeof object.documentsMetadataFilters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AssistQueryParameters.documentsMetadataFilters: object expected"); + message.documentsMetadataFilters = {}; + for (var keys = Object.keys(object.documentsMetadataFilters), i = 0; i < keys.length; ++i) + message.documentsMetadataFilters[keys[i]] = String(object.documentsMetadataFilters[keys[i]]); } - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); return message; }; /** - * Creates a plain object from a ValidationError message. Also converts values to other types if specified. + * Creates a plain object from an AssistQueryParameters message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.ValidationError} message ValidationError + * @param {google.cloud.dialogflow.v2beta1.AssistQueryParameters} message AssistQueryParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationError.toObject = function toObject(message, options) { + AssistQueryParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.errorMessage = ""; - } - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ValidationError.Severity[message.severity] : message.severity; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = message.entries[j]; + if (options.objects || options.defaults) + object.documentsMetadataFilters = {}; + var keys2; + if (message.documentsMetadataFilters && (keys2 = Object.keys(message.documentsMetadataFilters)).length) { + object.documentsMetadataFilters = {}; + for (var j = 0; j < keys2.length; ++j) + object.documentsMetadataFilters[keys2[j]] = message.documentsMetadataFilters[keys2[j]]; } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; return object; }; /** - * Converts this ValidationError to JSON. + * Converts this AssistQueryParameters to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ValidationError + * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters * @instance * @returns {Object.} JSON object */ - ValidationError.prototype.toJSON = function toJSON() { + AssistQueryParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Severity enum. - * @name google.cloud.dialogflow.v2beta1.ValidationError.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} INFO=1 INFO value - * @property {number} WARNING=2 WARNING value - * @property {number} ERROR=3 ERROR value - * @property {number} CRITICAL=4 CRITICAL value - */ - ValidationError.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INFO"] = 1; - values[valuesById[2] = "WARNING"] = 2; - values[valuesById[3] = "ERROR"] = 3; - values[valuesById[4] = "CRITICAL"] = 4; - return values; - })(); - - return ValidationError; + return AssistQueryParameters; })(); - v2beta1.ValidationResult = (function() { + v2beta1.AnalyzeContentRequest = (function() { /** - * Properties of a ValidationResult. + * Properties of an AnalyzeContentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IValidationResult - * @property {Array.|null} [validationErrors] ValidationResult validationErrors + * @interface IAnalyzeContentRequest + * @property {string|null} [participant] AnalyzeContentRequest participant + * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [textInput] AnalyzeContentRequest textInput + * @property {google.cloud.dialogflow.v2beta1.IEventInput|null} [eventInput] AnalyzeContentRequest eventInput + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [replyAudioConfig] AnalyzeContentRequest replyAudioConfig + * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] AnalyzeContentRequest queryParams + * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] AnalyzeContentRequest assistQueryParams + * @property {google.protobuf.ITimestamp|null} [messageSendTime] AnalyzeContentRequest messageSendTime + * @property {string|null} [requestId] AnalyzeContentRequest requestId */ /** - * Constructs a new ValidationResult. + * Constructs a new AnalyzeContentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ValidationResult. - * @implements IValidationResult + * @classdesc Represents an AnalyzeContentRequest. + * @implements IAnalyzeContentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IValidationResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest=} [properties] Properties to set */ - function ValidationResult(properties) { - this.validationErrors = []; + function AnalyzeContentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82933,78 +82217,180 @@ } /** - * ValidationResult validationErrors. - * @member {Array.} validationErrors - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * AnalyzeContentRequest participant. + * @member {string} participant + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @instance */ - ValidationResult.prototype.validationErrors = $util.emptyArray; + AnalyzeContentRequest.prototype.participant = ""; /** - * Creates a new ValidationResult instance using the specified properties. + * AnalyzeContentRequest textInput. + * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} textInput + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.textInput = null; + + /** + * AnalyzeContentRequest eventInput. + * @member {google.cloud.dialogflow.v2beta1.IEventInput|null|undefined} eventInput + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.eventInput = null; + + /** + * AnalyzeContentRequest replyAudioConfig. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} replyAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.replyAudioConfig = null; + + /** + * AnalyzeContentRequest queryParams. + * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.queryParams = null; + + /** + * AnalyzeContentRequest assistQueryParams. + * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.assistQueryParams = null; + + /** + * AnalyzeContentRequest messageSendTime. + * @member {google.protobuf.ITimestamp|null|undefined} messageSendTime + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.messageSendTime = null; + + /** + * AnalyzeContentRequest requestId. + * @member {string} requestId + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + AnalyzeContentRequest.prototype.requestId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalyzeContentRequest input. + * @member {"textInput"|"eventInput"|undefined} input + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @instance + */ + Object.defineProperty(AnalyzeContentRequest.prototype, "input", { + get: $util.oneOfGetter($oneOfFields = ["textInput", "eventInput"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalyzeContentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult instance + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest instance */ - ValidationResult.create = function create(properties) { - return new ValidationResult(properties); + AnalyzeContentRequest.create = function create(properties) { + return new AnalyzeContentRequest(properties); }; /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. + * Encodes the specified AnalyzeContentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationResult} message ValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} message AnalyzeContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationResult.encode = function encode(message, writer) { + AnalyzeContentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.validationErrors != null && message.validationErrors.length) - for (var i = 0; i < message.validationErrors.length; ++i) - $root.google.cloud.dialogflow.v2beta1.ValidationError.encode(message.validationErrors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.participant); + if (message.replyAudioConfig != null && Object.hasOwnProperty.call(message, "replyAudioConfig")) + $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.replyAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.textInput != null && Object.hasOwnProperty.call(message, "textInput")) + $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.textInput, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.eventInput != null && Object.hasOwnProperty.call(message, "eventInput")) + $root.google.cloud.dialogflow.v2beta1.EventInput.encode(message.eventInput, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) + $root.google.cloud.dialogflow.v2beta1.QueryParameters.encode(message.queryParams, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.messageSendTime != null && Object.hasOwnProperty.call(message, "messageSendTime")) + $root.google.protobuf.Timestamp.encode(message.messageSendTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.requestId); + if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) + $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ValidationResult.verify|verify} messages. + * Encodes the specified AnalyzeContentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IValidationResult} message ValidationResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} message AnalyzeContentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeContentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationResult message from the specified reader or buffer. + * Decodes an AnalyzeContentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationResult.decode = function decode(reader, length) { + AnalyzeContentRequest.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.v2beta1.ValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.validationErrors && message.validationErrors.length)) - message.validationErrors = []; - message.validationErrors.push($root.google.cloud.dialogflow.v2beta1.ValidationError.decode(reader, reader.uint32())); + message.participant = reader.string(); + break; + case 6: + message.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); + break; + case 8: + message.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.decode(reader, reader.uint32()); + break; + case 5: + message.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + break; + case 9: + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); + break; + case 14: + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + break; + case 10: + message.messageSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + message.requestId = reader.string(); break; default: reader.skipType(tag & 7); @@ -83015,376 +82401,283 @@ }; /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeContentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationResult.decodeDelimited = function decodeDelimited(reader) { + AnalyzeContentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationResult message. + * Verifies an AnalyzeContentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationResult.verify = function verify(message) { + AnalyzeContentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.validationErrors != null && message.hasOwnProperty("validationErrors")) { - if (!Array.isArray(message.validationErrors)) - return "validationErrors: array expected"; - for (var i = 0; i < message.validationErrors.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.ValidationError.verify(message.validationErrors[i]); + var properties = {}; + if (message.participant != null && message.hasOwnProperty("participant")) + if (!$util.isString(message.participant)) + return "participant: string expected"; + if (message.textInput != null && message.hasOwnProperty("textInput")) { + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.textInput); if (error) - return "validationErrors." + error; + return "textInput." + error; + } + } + if (message.eventInput != null && message.hasOwnProperty("eventInput")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.EventInput.verify(message.eventInput); + if (error) + return "eventInput." + error; } } + if (message.replyAudioConfig != null && message.hasOwnProperty("replyAudioConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.replyAudioConfig); + if (error) + return "replyAudioConfig." + error; + } + if (message.queryParams != null && message.hasOwnProperty("queryParams")) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; + } + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { + var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); + if (error) + return "assistQueryParams." + error; + } + if (message.messageSendTime != null && message.hasOwnProperty("messageSendTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.messageSendTime); + if (error) + return "messageSendTime." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeContentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ValidationResult} ValidationResult + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest */ - ValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ValidationResult) + AnalyzeContentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ValidationResult(); - if (object.validationErrors) { - if (!Array.isArray(object.validationErrors)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationResult.validationErrors: array expected"); - message.validationErrors = []; - for (var i = 0; i < object.validationErrors.length; ++i) { - if (typeof object.validationErrors[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ValidationResult.validationErrors: object expected"); - message.validationErrors[i] = $root.google.cloud.dialogflow.v2beta1.ValidationError.fromObject(object.validationErrors[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest(); + if (object.participant != null) + message.participant = String(object.participant); + if (object.textInput != null) { + if (typeof object.textInput !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.textInput: object expected"); + message.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.textInput); + } + if (object.eventInput != null) { + if (typeof object.eventInput !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.eventInput: object expected"); + message.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.fromObject(object.eventInput); + } + if (object.replyAudioConfig != null) { + if (typeof object.replyAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.replyAudioConfig: object expected"); + message.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.replyAudioConfig); + } + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); + } + if (object.assistQueryParams != null) { + if (typeof object.assistQueryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.assistQueryParams: object expected"); + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + } + if (object.messageSendTime != null) { + if (typeof object.messageSendTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.messageSendTime: object expected"); + message.messageSendTime = $root.google.protobuf.Timestamp.fromObject(object.messageSendTime); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeContentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ValidationResult} message ValidationResult + * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} message AnalyzeContentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationResult.toObject = function toObject(message, options) { + AnalyzeContentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.validationErrors = []; - if (message.validationErrors && message.validationErrors.length) { - object.validationErrors = []; - for (var j = 0; j < message.validationErrors.length; ++j) - object.validationErrors[j] = $root.google.cloud.dialogflow.v2beta1.ValidationError.toObject(message.validationErrors[j], options); + if (options.defaults) { + object.participant = ""; + object.replyAudioConfig = null; + object.queryParams = null; + object.messageSendTime = null; + object.requestId = ""; + object.assistQueryParams = null; + } + if (message.participant != null && message.hasOwnProperty("participant")) + object.participant = message.participant; + if (message.replyAudioConfig != null && message.hasOwnProperty("replyAudioConfig")) + object.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.replyAudioConfig, options); + if (message.textInput != null && message.hasOwnProperty("textInput")) { + object.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.textInput, options); + if (options.oneofs) + object.input = "textInput"; } + if (message.eventInput != null && message.hasOwnProperty("eventInput")) { + object.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.toObject(message.eventInput, options); + if (options.oneofs) + object.input = "eventInput"; + } + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.toObject(message.queryParams, options); + if (message.messageSendTime != null && message.hasOwnProperty("messageSendTime")) + object.messageSendTime = $root.google.protobuf.Timestamp.toObject(message.messageSendTime, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) + object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); return object; }; /** - * Converts this ValidationResult to JSON. + * Converts this AnalyzeContentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ValidationResult + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest * @instance * @returns {Object.} JSON object */ - ValidationResult.prototype.toJSON = function toJSON() { + AnalyzeContentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ValidationResult; + return AnalyzeContentRequest; })(); - v2beta1.AnswerRecords = (function() { + v2beta1.DtmfParameters = (function() { /** - * Constructs a new AnswerRecords service. + * Properties of a DtmfParameters. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnswerRecords - * @extends $protobuf.rpc.Service + * @interface IDtmfParameters + * @property {boolean|null} [acceptsDtmfInput] DtmfParameters acceptsDtmfInput + */ + + /** + * Constructs a new DtmfParameters. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a DtmfParameters. + * @implements IDtmfParameters * @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.v2beta1.IDtmfParameters=} [properties] Properties to set */ - function AnswerRecords(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function DtmfParameters(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]]; } - (AnswerRecords.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnswerRecords; + /** + * DtmfParameters acceptsDtmfInput. + * @member {boolean} acceptsDtmfInput + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters + * @instance + */ + DtmfParameters.prototype.acceptsDtmfInput = false; /** - * Creates new AnswerRecords service using the specified rpc implementation. + * Creates a new DtmfParameters instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @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 {AnswerRecords} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters instance */ - AnswerRecords.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + DtmfParameters.create = function create(properties) { + return new DtmfParameters(properties); }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#getAnswerRecord}. - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @typedef GetAnswerRecordCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} [response] AnswerRecord + * Encodes the specified DtmfParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters + * @static + * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters} message DtmfParameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - - /** - * Calls GetAnswerRecord. - * @function getAnswerRecord - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} request GetAnswerRecordRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.GetAnswerRecordCallback} callback Node-style callback called with the error, if any, and AnswerRecord - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnswerRecords.prototype.getAnswerRecord = function getAnswerRecord(request, callback) { - return this.rpcCall(getAnswerRecord, $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest, $root.google.cloud.dialogflow.v2beta1.AnswerRecord, request, callback); - }, "name", { value: "GetAnswerRecord" }); - - /** - * Calls GetAnswerRecord. - * @function getAnswerRecord - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} request GetAnswerRecordRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#listAnswerRecords}. - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @typedef ListAnswerRecordsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} [response] ListAnswerRecordsResponse - */ - - /** - * Calls ListAnswerRecords. - * @function listAnswerRecords - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} request ListAnswerRecordsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.ListAnswerRecordsCallback} callback Node-style callback called with the error, if any, and ListAnswerRecordsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnswerRecords.prototype.listAnswerRecords = function listAnswerRecords(request, callback) { - return this.rpcCall(listAnswerRecords, $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest, $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse, request, callback); - }, "name", { value: "ListAnswerRecords" }); - - /** - * Calls ListAnswerRecords. - * @function listAnswerRecords - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} request ListAnswerRecordsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.AnswerRecords#updateAnswerRecord}. - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @typedef UpdateAnswerRecordCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} [response] AnswerRecord - */ - - /** - * Calls UpdateAnswerRecord. - * @function updateAnswerRecord - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} request UpdateAnswerRecordRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.AnswerRecords.UpdateAnswerRecordCallback} callback Node-style callback called with the error, if any, and AnswerRecord - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnswerRecords.prototype.updateAnswerRecord = function updateAnswerRecord(request, callback) { - return this.rpcCall(updateAnswerRecord, $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest, $root.google.cloud.dialogflow.v2beta1.AnswerRecord, request, callback); - }, "name", { value: "UpdateAnswerRecord" }); - - /** - * Calls UpdateAnswerRecord. - * @function updateAnswerRecord - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecords - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} request UpdateAnswerRecordRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return AnswerRecords; - })(); - - v2beta1.AnswerRecord = (function() { - - /** - * Properties of an AnswerRecord. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAnswerRecord - * @property {string|null} [name] AnswerRecord name - * @property {google.cloud.dialogflow.v2beta1.IAnswerFeedback|null} [answerFeedback] AnswerRecord answerFeedback - * @property {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null} [agentAssistantRecord] AnswerRecord agentAssistantRecord - */ - - /** - * Constructs a new AnswerRecord. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnswerRecord. - * @implements IAnswerRecord - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord=} [properties] Properties to set - */ - function AnswerRecord(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]]; - } - - /** - * AnswerRecord name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @instance - */ - AnswerRecord.prototype.name = ""; - - /** - * AnswerRecord answerFeedback. - * @member {google.cloud.dialogflow.v2beta1.IAnswerFeedback|null|undefined} answerFeedback - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @instance - */ - AnswerRecord.prototype.answerFeedback = null; - - /** - * AnswerRecord agentAssistantRecord. - * @member {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord|null|undefined} agentAssistantRecord - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @instance - */ - AnswerRecord.prototype.agentAssistantRecord = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AnswerRecord record. - * @member {"agentAssistantRecord"|undefined} record - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @instance - */ - Object.defineProperty(AnswerRecord.prototype, "record", { - get: $util.oneOfGetter($oneOfFields = ["agentAssistantRecord"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AnswerRecord instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord instance - */ - AnswerRecord.create = function create(properties) { - return new AnswerRecord(properties); - }; - - /** - * Encodes the specified AnswerRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord} message AnswerRecord message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnswerRecord.encode = function encode(message, writer) { + DtmfParameters.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.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) - $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.agentAssistantRecord != null && Object.hasOwnProperty.call(message, "agentAssistantRecord")) - $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.encode(message.agentAssistantRecord, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.acceptsDtmfInput != null && Object.hasOwnProperty.call(message, "acceptsDtmfInput")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsDtmfInput); return writer; }; /** - * Encodes the specified AnswerRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerRecord.verify|verify} messages. + * Encodes the specified DtmfParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerRecord} message AnswerRecord message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters} message DtmfParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerRecord.encodeDelimited = function encodeDelimited(message, writer) { + DtmfParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnswerRecord message from the specified reader or buffer. + * Decodes a DtmfParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord + * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerRecord.decode = function decode(reader, length) { + DtmfParameters.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.v2beta1.AnswerRecord(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DtmfParameters(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); - break; - case 3: - message.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.decode(reader, reader.uint32()); - break; - case 4: - message.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.decode(reader, reader.uint32()); + message.acceptsDtmfInput = reader.bool(); break; default: reader.skipType(tag & 7); @@ -83395,141 +82688,115 @@ }; /** - * Decodes an AnswerRecord message from the specified reader or buffer, length delimited. + * Decodes a DtmfParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord + * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerRecord.decodeDelimited = function decodeDelimited(reader) { + DtmfParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnswerRecord message. + * Verifies a DtmfParameters message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnswerRecord.verify = function verify(message) { + DtmfParameters.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.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { - var error = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.verify(message.answerFeedback); - if (error) - return "answerFeedback." + error; - } - if (message.agentAssistantRecord != null && message.hasOwnProperty("agentAssistantRecord")) { - properties.record = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify(message.agentAssistantRecord); - if (error) - return "agentAssistantRecord." + error; - } - } + if (message.acceptsDtmfInput != null && message.hasOwnProperty("acceptsDtmfInput")) + if (typeof message.acceptsDtmfInput !== "boolean") + return "acceptsDtmfInput: boolean expected"; return null; }; /** - * Creates an AnswerRecord message from a plain object. Also converts values to their respective internal types. + * Creates a DtmfParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AnswerRecord} AnswerRecord + * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters */ - AnswerRecord.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnswerRecord) + DtmfParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DtmfParameters) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AnswerRecord(); - if (object.name != null) - message.name = String(object.name); - if (object.answerFeedback != null) { - if (typeof object.answerFeedback !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerRecord.answerFeedback: object expected"); - message.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.fromObject(object.answerFeedback); - } - if (object.agentAssistantRecord != null) { - if (typeof object.agentAssistantRecord !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerRecord.agentAssistantRecord: object expected"); - message.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.fromObject(object.agentAssistantRecord); - } + var message = new $root.google.cloud.dialogflow.v2beta1.DtmfParameters(); + if (object.acceptsDtmfInput != null) + message.acceptsDtmfInput = Boolean(object.acceptsDtmfInput); return message; }; /** - * Creates a plain object from an AnswerRecord message. Also converts values to other types if specified. + * Creates a plain object from a DtmfParameters message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @static - * @param {google.cloud.dialogflow.v2beta1.AnswerRecord} message AnswerRecord + * @param {google.cloud.dialogflow.v2beta1.DtmfParameters} message DtmfParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnswerRecord.toObject = function toObject(message, options) { + DtmfParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.answerFeedback = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) - object.answerFeedback = $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.toObject(message.answerFeedback, options); - if (message.agentAssistantRecord != null && message.hasOwnProperty("agentAssistantRecord")) { - object.agentAssistantRecord = $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord.toObject(message.agentAssistantRecord, options); - if (options.oneofs) - object.record = "agentAssistantRecord"; - } + if (options.defaults) + object.acceptsDtmfInput = false; + if (message.acceptsDtmfInput != null && message.hasOwnProperty("acceptsDtmfInput")) + object.acceptsDtmfInput = message.acceptsDtmfInput; return object; }; /** - * Converts this AnswerRecord to JSON. + * Converts this DtmfParameters to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AnswerRecord + * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters * @instance * @returns {Object.} JSON object */ - AnswerRecord.prototype.toJSON = function toJSON() { + DtmfParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnswerRecord; + return DtmfParameters; })(); - v2beta1.AgentAssistantRecord = (function() { + v2beta1.AnalyzeContentResponse = (function() { /** - * Properties of an AgentAssistantRecord. + * Properties of an AnalyzeContentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAgentAssistantRecord - * @property {google.cloud.dialogflow.v2beta1.IArticleAnswer|null} [articleSuggestionAnswer] AgentAssistantRecord articleSuggestionAnswer - * @property {google.cloud.dialogflow.v2beta1.IFaqAnswer|null} [faqAnswer] AgentAssistantRecord faqAnswer + * @interface IAnalyzeContentResponse + * @property {string|null} [replyText] AnalyzeContentResponse replyText + * @property {google.cloud.dialogflow.v2beta1.IOutputAudio|null} [replyAudio] AnalyzeContentResponse replyAudio + * @property {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null} [automatedAgentReply] AnalyzeContentResponse automatedAgentReply + * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [message] AnalyzeContentResponse message + * @property {Array.|null} [humanAgentSuggestionResults] AnalyzeContentResponse humanAgentSuggestionResults + * @property {Array.|null} [endUserSuggestionResults] AnalyzeContentResponse endUserSuggestionResults + * @property {google.cloud.dialogflow.v2beta1.IDtmfParameters|null} [dtmfParameters] AnalyzeContentResponse dtmfParameters */ /** - * Constructs a new AgentAssistantRecord. + * Constructs a new AnalyzeContentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AgentAssistantRecord. - * @implements IAgentAssistantRecord + * @classdesc Represents an AnalyzeContentResponse. + * @implements IAnalyzeContentResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse=} [properties] Properties to set */ - function AgentAssistantRecord(properties) { + function AnalyzeContentResponse(properties) { + this.humanAgentSuggestionResults = []; + this.endUserSuggestionResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83537,102 +82804,159 @@ } /** - * AgentAssistantRecord articleSuggestionAnswer. - * @member {google.cloud.dialogflow.v2beta1.IArticleAnswer|null|undefined} articleSuggestionAnswer - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * AnalyzeContentResponse replyText. + * @member {string} replyText + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @instance */ - AgentAssistantRecord.prototype.articleSuggestionAnswer = null; + AnalyzeContentResponse.prototype.replyText = ""; /** - * AgentAssistantRecord faqAnswer. - * @member {google.cloud.dialogflow.v2beta1.IFaqAnswer|null|undefined} faqAnswer - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * AnalyzeContentResponse replyAudio. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudio|null|undefined} replyAudio + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @instance */ - AgentAssistantRecord.prototype.faqAnswer = null; + AnalyzeContentResponse.prototype.replyAudio = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * AnalyzeContentResponse automatedAgentReply. + * @member {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null|undefined} automatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse + * @instance + */ + AnalyzeContentResponse.prototype.automatedAgentReply = null; /** - * AgentAssistantRecord answer. - * @member {"articleSuggestionAnswer"|"faqAnswer"|undefined} answer - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * AnalyzeContentResponse message. + * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} message + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @instance */ - Object.defineProperty(AgentAssistantRecord.prototype, "answer", { - get: $util.oneOfGetter($oneOfFields = ["articleSuggestionAnswer", "faqAnswer"]), - set: $util.oneOfSetter($oneOfFields) - }); + AnalyzeContentResponse.prototype.message = null; /** - * Creates a new AgentAssistantRecord instance using the specified properties. + * AnalyzeContentResponse humanAgentSuggestionResults. + * @member {Array.} humanAgentSuggestionResults + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse + * @instance + */ + AnalyzeContentResponse.prototype.humanAgentSuggestionResults = $util.emptyArray; + + /** + * AnalyzeContentResponse endUserSuggestionResults. + * @member {Array.} endUserSuggestionResults + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse + * @instance + */ + AnalyzeContentResponse.prototype.endUserSuggestionResults = $util.emptyArray; + + /** + * AnalyzeContentResponse dtmfParameters. + * @member {google.cloud.dialogflow.v2beta1.IDtmfParameters|null|undefined} dtmfParameters + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse + * @instance + */ + AnalyzeContentResponse.prototype.dtmfParameters = null; + + /** + * Creates a new AnalyzeContentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord instance + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse instance */ - AgentAssistantRecord.create = function create(properties) { - return new AgentAssistantRecord(properties); + AnalyzeContentResponse.create = function create(properties) { + return new AnalyzeContentResponse(properties); }; /** - * Encodes the specified AgentAssistantRecord message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. + * Encodes the specified AnalyzeContentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord} message AgentAssistantRecord message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse} message AnalyzeContentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentAssistantRecord.encode = function encode(message, writer) { + AnalyzeContentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.articleSuggestionAnswer != null && Object.hasOwnProperty.call(message, "articleSuggestionAnswer")) - $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.encode(message.articleSuggestionAnswer, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.faqAnswer != null && Object.hasOwnProperty.call(message, "faqAnswer")) - $root.google.cloud.dialogflow.v2beta1.FaqAnswer.encode(message.faqAnswer, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.replyText != null && Object.hasOwnProperty.call(message, "replyText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.replyText); + if (message.replyAudio != null && Object.hasOwnProperty.call(message, "replyAudio")) + $root.google.cloud.dialogflow.v2beta1.OutputAudio.encode(message.replyAudio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.automatedAgentReply != null && Object.hasOwnProperty.call(message, "automatedAgentReply")) + $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.encode(message.automatedAgentReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.message, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.humanAgentSuggestionResults != null && message.humanAgentSuggestionResults.length) + for (var i = 0; i < message.humanAgentSuggestionResults.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SuggestionResult.encode(message.humanAgentSuggestionResults[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endUserSuggestionResults != null && message.endUserSuggestionResults.length) + for (var i = 0; i < message.endUserSuggestionResults.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SuggestionResult.encode(message.endUserSuggestionResults[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.dtmfParameters != null && Object.hasOwnProperty.call(message, "dtmfParameters")) + $root.google.cloud.dialogflow.v2beta1.DtmfParameters.encode(message.dtmfParameters, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; /** - * Encodes the specified AgentAssistantRecord message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantRecord.verify|verify} messages. + * Encodes the specified AnalyzeContentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantRecord} message AgentAssistantRecord message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse} message AnalyzeContentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentAssistantRecord.encodeDelimited = function encodeDelimited(message, writer) { + AnalyzeContentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AgentAssistantRecord message from the specified reader or buffer. + * Decodes an AnalyzeContentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentAssistantRecord.decode = function decode(reader, length) { + AnalyzeContentResponse.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.v2beta1.AgentAssistantRecord(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.replyText = reader.string(); + break; + case 2: + message.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.decode(reader, reader.uint32()); + break; + case 3: + message.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.decode(reader, reader.uint32()); + break; case 5: - message.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.decode(reader, reader.uint32()); + message.message = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); break; case 6: - message.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.decode(reader, reader.uint32()); + if (!(message.humanAgentSuggestionResults && message.humanAgentSuggestionResults.length)) + message.humanAgentSuggestionResults = []; + message.humanAgentSuggestionResults.push($root.google.cloud.dialogflow.v2beta1.SuggestionResult.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.endUserSuggestionResults && message.endUserSuggestionResults.length)) + message.endUserSuggestionResults = []; + message.endUserSuggestionResults.push($root.google.cloud.dialogflow.v2beta1.SuggestionResult.decode(reader, reader.uint32())); + break; + case 9: + message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -83643,142 +82967,214 @@ }; /** - * Decodes an AgentAssistantRecord message from the specified reader or buffer, length delimited. + * Decodes an AnalyzeContentResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentAssistantRecord.decodeDelimited = function decodeDelimited(reader) { + AnalyzeContentResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AgentAssistantRecord message. + * Verifies an AnalyzeContentResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AgentAssistantRecord.verify = function verify(message) { + AnalyzeContentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.articleSuggestionAnswer != null && message.hasOwnProperty("articleSuggestionAnswer")) { - properties.answer = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.verify(message.articleSuggestionAnswer); - if (error) - return "articleSuggestionAnswer." + error; - } + if (message.replyText != null && message.hasOwnProperty("replyText")) + if (!$util.isString(message.replyText)) + return "replyText: string expected"; + if (message.replyAudio != null && message.hasOwnProperty("replyAudio")) { + var error = $root.google.cloud.dialogflow.v2beta1.OutputAudio.verify(message.replyAudio); + if (error) + return "replyAudio." + error; } - if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { - if (properties.answer === 1) - return "answer: multiple values"; - properties.answer = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.verify(message.faqAnswer); - if (error) - return "faqAnswer." + error; - } + if (message.automatedAgentReply != null && message.hasOwnProperty("automatedAgentReply")) { + var error = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify(message.automatedAgentReply); + if (error) + return "automatedAgentReply." + error; + } + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.message); + if (error) + return "message." + error; + } + if (message.humanAgentSuggestionResults != null && message.hasOwnProperty("humanAgentSuggestionResults")) { + if (!Array.isArray(message.humanAgentSuggestionResults)) + return "humanAgentSuggestionResults: array expected"; + for (var i = 0; i < message.humanAgentSuggestionResults.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.verify(message.humanAgentSuggestionResults[i]); + if (error) + return "humanAgentSuggestionResults." + error; + } + } + if (message.endUserSuggestionResults != null && message.hasOwnProperty("endUserSuggestionResults")) { + if (!Array.isArray(message.endUserSuggestionResults)) + return "endUserSuggestionResults: array expected"; + for (var i = 0; i < message.endUserSuggestionResults.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.verify(message.endUserSuggestionResults[i]); + if (error) + return "endUserSuggestionResults." + error; + } + } + if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) { + var error = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.verify(message.dtmfParameters); + if (error) + return "dtmfParameters." + error; } return null; }; /** - * Creates an AgentAssistantRecord message from a plain object. Also converts values to their respective internal types. + * Creates an AnalyzeContentResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} AgentAssistantRecord + * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse */ - AgentAssistantRecord.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord) + AnalyzeContentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantRecord(); - if (object.articleSuggestionAnswer != null) { - if (typeof object.articleSuggestionAnswer !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantRecord.articleSuggestionAnswer: object expected"); - message.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.fromObject(object.articleSuggestionAnswer); + var message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse(); + if (object.replyText != null) + message.replyText = String(object.replyText); + if (object.replyAudio != null) { + if (typeof object.replyAudio !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.replyAudio: object expected"); + message.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.fromObject(object.replyAudio); } - if (object.faqAnswer != null) { - if (typeof object.faqAnswer !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantRecord.faqAnswer: object expected"); - message.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.fromObject(object.faqAnswer); + if (object.automatedAgentReply != null) { + if (typeof object.automatedAgentReply !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.automatedAgentReply: object expected"); + message.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.fromObject(object.automatedAgentReply); + } + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.message: object expected"); + message.message = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.message); + } + if (object.humanAgentSuggestionResults) { + if (!Array.isArray(object.humanAgentSuggestionResults)) + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.humanAgentSuggestionResults: array expected"); + message.humanAgentSuggestionResults = []; + for (var i = 0; i < object.humanAgentSuggestionResults.length; ++i) { + if (typeof object.humanAgentSuggestionResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.humanAgentSuggestionResults: object expected"); + message.humanAgentSuggestionResults[i] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.fromObject(object.humanAgentSuggestionResults[i]); + } + } + if (object.endUserSuggestionResults) { + if (!Array.isArray(object.endUserSuggestionResults)) + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.endUserSuggestionResults: array expected"); + message.endUserSuggestionResults = []; + for (var i = 0; i < object.endUserSuggestionResults.length; ++i) { + if (typeof object.endUserSuggestionResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.endUserSuggestionResults: object expected"); + message.endUserSuggestionResults[i] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.fromObject(object.endUserSuggestionResults[i]); + } + } + if (object.dtmfParameters != null) { + if (typeof object.dtmfParameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.dtmfParameters: object expected"); + message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.fromObject(object.dtmfParameters); } return message; }; /** - * Creates a plain object from an AgentAssistantRecord message. Also converts values to other types if specified. + * Creates a plain object from an AnalyzeContentResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantRecord} message AgentAssistantRecord + * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} message AnalyzeContentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AgentAssistantRecord.toObject = function toObject(message, options) { + AnalyzeContentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.articleSuggestionAnswer != null && message.hasOwnProperty("articleSuggestionAnswer")) { - object.articleSuggestionAnswer = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.toObject(message.articleSuggestionAnswer, options); - if (options.oneofs) - object.answer = "articleSuggestionAnswer"; + if (options.arrays || options.defaults) { + object.humanAgentSuggestionResults = []; + object.endUserSuggestionResults = []; } - if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { - object.faqAnswer = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.toObject(message.faqAnswer, options); - if (options.oneofs) - object.answer = "faqAnswer"; + if (options.defaults) { + object.replyText = ""; + object.replyAudio = null; + object.automatedAgentReply = null; + object.message = null; + object.dtmfParameters = null; + } + if (message.replyText != null && message.hasOwnProperty("replyText")) + object.replyText = message.replyText; + if (message.replyAudio != null && message.hasOwnProperty("replyAudio")) + object.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.toObject(message.replyAudio, options); + if (message.automatedAgentReply != null && message.hasOwnProperty("automatedAgentReply")) + object.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.toObject(message.automatedAgentReply, options); + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.message, options); + if (message.humanAgentSuggestionResults && message.humanAgentSuggestionResults.length) { + object.humanAgentSuggestionResults = []; + for (var j = 0; j < message.humanAgentSuggestionResults.length; ++j) + object.humanAgentSuggestionResults[j] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.toObject(message.humanAgentSuggestionResults[j], options); + } + if (message.endUserSuggestionResults && message.endUserSuggestionResults.length) { + object.endUserSuggestionResults = []; + for (var j = 0; j < message.endUserSuggestionResults.length; ++j) + object.endUserSuggestionResults[j] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.toObject(message.endUserSuggestionResults[j], options); } + if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) + object.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.toObject(message.dtmfParameters, options); return object; }; /** - * Converts this AgentAssistantRecord to JSON. + * Converts this AnalyzeContentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantRecord + * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse * @instance * @returns {Object.} JSON object */ - AgentAssistantRecord.prototype.toJSON = function toJSON() { + AnalyzeContentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AgentAssistantRecord; + return AnalyzeContentResponse; })(); - v2beta1.AnswerFeedback = (function() { + v2beta1.AnnotatedMessagePart = (function() { /** - * Properties of an AnswerFeedback. + * Properties of an AnnotatedMessagePart. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAnswerFeedback - * @property {google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel|null} [correctnessLevel] AnswerFeedback correctnessLevel - * @property {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null} [agentAssistantDetailFeedback] AnswerFeedback agentAssistantDetailFeedback - * @property {boolean|null} [clicked] AnswerFeedback clicked - * @property {google.protobuf.ITimestamp|null} [clickTime] AnswerFeedback clickTime - * @property {boolean|null} [displayed] AnswerFeedback displayed - * @property {google.protobuf.ITimestamp|null} [displayTime] AnswerFeedback displayTime + * @interface IAnnotatedMessagePart + * @property {string|null} [text] AnnotatedMessagePart text + * @property {string|null} [entityType] AnnotatedMessagePart entityType + * @property {google.protobuf.IValue|null} [formattedValue] AnnotatedMessagePart formattedValue */ /** - * Constructs a new AnswerFeedback. + * Constructs a new AnnotatedMessagePart. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnswerFeedback. - * @implements IAnswerFeedback + * @classdesc Represents an AnnotatedMessagePart. + * @implements IAnnotatedMessagePart * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart=} [properties] Properties to set */ - function AnswerFeedback(properties) { + function AnnotatedMessagePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83786,154 +83182,101 @@ } /** - * AnswerFeedback correctnessLevel. - * @member {google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel} correctnessLevel - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.correctnessLevel = 0; - - /** - * AnswerFeedback agentAssistantDetailFeedback. - * @member {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback|null|undefined} agentAssistantDetailFeedback - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.agentAssistantDetailFeedback = null; - - /** - * AnswerFeedback clicked. - * @member {boolean} clicked - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.clicked = false; - - /** - * AnswerFeedback clickTime. - * @member {google.protobuf.ITimestamp|null|undefined} clickTime - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback - * @instance - */ - AnswerFeedback.prototype.clickTime = null; - - /** - * AnswerFeedback displayed. - * @member {boolean} displayed - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * AnnotatedMessagePart text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @instance */ - AnswerFeedback.prototype.displayed = false; + AnnotatedMessagePart.prototype.text = ""; /** - * AnswerFeedback displayTime. - * @member {google.protobuf.ITimestamp|null|undefined} displayTime - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * AnnotatedMessagePart entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @instance */ - AnswerFeedback.prototype.displayTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AnnotatedMessagePart.prototype.entityType = ""; /** - * AnswerFeedback detailFeedback. - * @member {"agentAssistantDetailFeedback"|undefined} detailFeedback - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * AnnotatedMessagePart formattedValue. + * @member {google.protobuf.IValue|null|undefined} formattedValue + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @instance */ - Object.defineProperty(AnswerFeedback.prototype, "detailFeedback", { - get: $util.oneOfGetter($oneOfFields = ["agentAssistantDetailFeedback"]), - set: $util.oneOfSetter($oneOfFields) - }); + AnnotatedMessagePart.prototype.formattedValue = null; /** - * Creates a new AnswerFeedback instance using the specified properties. + * Creates a new AnnotatedMessagePart instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback instance + * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart instance */ - AnswerFeedback.create = function create(properties) { - return new AnswerFeedback(properties); + AnnotatedMessagePart.create = function create(properties) { + return new AnnotatedMessagePart(properties); }; /** - * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. + * Encodes the specified AnnotatedMessagePart message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart} message AnnotatedMessagePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encode = function encode(message, writer) { + AnnotatedMessagePart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.correctnessLevel != null && Object.hasOwnProperty.call(message, "correctnessLevel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.correctnessLevel); - if (message.agentAssistantDetailFeedback != null && Object.hasOwnProperty.call(message, "agentAssistantDetailFeedback")) - $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.encode(message.agentAssistantDetailFeedback, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.clicked != null && Object.hasOwnProperty.call(message, "clicked")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.clicked); - if (message.displayed != null && Object.hasOwnProperty.call(message, "displayed")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.displayed); - if (message.clickTime != null && Object.hasOwnProperty.call(message, "clickTime")) - $root.google.protobuf.Timestamp.encode(message.clickTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.displayTime != null && Object.hasOwnProperty.call(message, "displayTime")) - $root.google.protobuf.Timestamp.encode(message.displayTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); + if (message.formattedValue != null && Object.hasOwnProperty.call(message, "formattedValue")) + $root.google.protobuf.Value.encode(message.formattedValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnswerFeedback.verify|verify} messages. + * Encodes the specified AnnotatedMessagePart message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static - * @param {google.cloud.dialogflow.v2beta1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart} message AnnotatedMessagePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { + AnnotatedMessagePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer. + * Decodes an AnnotatedMessagePart message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerFeedback.decode = function decode(reader, length) { + AnnotatedMessagePart.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.v2beta1.AnswerFeedback(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.correctnessLevel = reader.int32(); + message.text = reader.string(); break; case 2: - message.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.decode(reader, reader.uint32()); + message.entityType = reader.string(); break; case 3: - message.clicked = reader.bool(); - break; - case 5: - message.clickTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.displayed = reader.bool(); - break; - case 6: - message.displayTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.formattedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -83944,213 +83287,131 @@ }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * Decodes an AnnotatedMessagePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { + AnnotatedMessagePart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnswerFeedback message. + * Verifies an AnnotatedMessagePart message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnswerFeedback.verify = function verify(message) { + AnnotatedMessagePart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) - switch (message.correctnessLevel) { - default: - return "correctnessLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.agentAssistantDetailFeedback != null && message.hasOwnProperty("agentAssistantDetailFeedback")) { - properties.detailFeedback = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify(message.agentAssistantDetailFeedback); - if (error) - return "agentAssistantDetailFeedback." + error; - } - } - if (message.clicked != null && message.hasOwnProperty("clicked")) - if (typeof message.clicked !== "boolean") - return "clicked: boolean expected"; - if (message.clickTime != null && message.hasOwnProperty("clickTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.clickTime); - if (error) - return "clickTime." + error; - } - if (message.displayed != null && message.hasOwnProperty("displayed")) - if (typeof message.displayed !== "boolean") - return "displayed: boolean expected"; - if (message.displayTime != null && message.hasOwnProperty("displayTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.displayTime); + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.formattedValue != null && message.hasOwnProperty("formattedValue")) { + var error = $root.google.protobuf.Value.verify(message.formattedValue); if (error) - return "displayTime." + error; + return "formattedValue." + error; } return null; }; /** - * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotatedMessagePart message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart */ - AnswerFeedback.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnswerFeedback) + AnnotatedMessagePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AnswerFeedback(); - switch (object.correctnessLevel) { - case "CORRECTNESS_LEVEL_UNSPECIFIED": - case 0: - message.correctnessLevel = 0; - break; - case "NOT_CORRECT": - case 1: - message.correctnessLevel = 1; - break; - case "PARTIALLY_CORRECT": - case 2: - message.correctnessLevel = 2; - break; - case "FULLY_CORRECT": - case 3: - message.correctnessLevel = 3; - break; - } - if (object.agentAssistantDetailFeedback != null) { - if (typeof object.agentAssistantDetailFeedback !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.agentAssistantDetailFeedback: object expected"); - message.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.fromObject(object.agentAssistantDetailFeedback); - } - if (object.clicked != null) - message.clicked = Boolean(object.clicked); - if (object.clickTime != null) { - if (typeof object.clickTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.clickTime: object expected"); - message.clickTime = $root.google.protobuf.Timestamp.fromObject(object.clickTime); - } - if (object.displayed != null) - message.displayed = Boolean(object.displayed); - if (object.displayTime != null) { - if (typeof object.displayTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnswerFeedback.displayTime: object expected"); - message.displayTime = $root.google.protobuf.Timestamp.fromObject(object.displayTime); + var message = new $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart(); + if (object.text != null) + message.text = String(object.text); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.formattedValue != null) { + if (typeof object.formattedValue !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.formattedValue: object expected"); + message.formattedValue = $root.google.protobuf.Value.fromObject(object.formattedValue); } return message; }; /** - * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * Creates a plain object from an AnnotatedMessagePart message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @static - * @param {google.cloud.dialogflow.v2beta1.AnswerFeedback} message AnswerFeedback + * @param {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} message AnnotatedMessagePart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnswerFeedback.toObject = function toObject(message, options) { + AnnotatedMessagePart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.correctnessLevel = options.enums === String ? "CORRECTNESS_LEVEL_UNSPECIFIED" : 0; - object.clicked = false; - object.displayed = false; - object.clickTime = null; - object.displayTime = null; - } - if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) - object.correctnessLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; - if (message.agentAssistantDetailFeedback != null && message.hasOwnProperty("agentAssistantDetailFeedback")) { - object.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.toObject(message.agentAssistantDetailFeedback, options); - if (options.oneofs) - object.detailFeedback = "agentAssistantDetailFeedback"; + object.text = ""; + object.entityType = ""; + object.formattedValue = null; } - if (message.clicked != null && message.hasOwnProperty("clicked")) - object.clicked = message.clicked; - if (message.displayed != null && message.hasOwnProperty("displayed")) - object.displayed = message.displayed; - if (message.clickTime != null && message.hasOwnProperty("clickTime")) - object.clickTime = $root.google.protobuf.Timestamp.toObject(message.clickTime, options); - if (message.displayTime != null && message.hasOwnProperty("displayTime")) - object.displayTime = $root.google.protobuf.Timestamp.toObject(message.displayTime, options); + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.formattedValue != null && message.hasOwnProperty("formattedValue")) + object.formattedValue = $root.google.protobuf.Value.toObject(message.formattedValue, options); return object; }; /** - * Converts this AnswerFeedback to JSON. + * Converts this AnnotatedMessagePart to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AnswerFeedback + * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart * @instance * @returns {Object.} JSON object */ - AnswerFeedback.prototype.toJSON = function toJSON() { + AnnotatedMessagePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * CorrectnessLevel enum. - * @name google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel - * @enum {number} - * @property {number} CORRECTNESS_LEVEL_UNSPECIFIED=0 CORRECTNESS_LEVEL_UNSPECIFIED value - * @property {number} NOT_CORRECT=1 NOT_CORRECT value - * @property {number} PARTIALLY_CORRECT=2 PARTIALLY_CORRECT value - * @property {number} FULLY_CORRECT=3 FULLY_CORRECT value - */ - AnswerFeedback.CorrectnessLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CORRECTNESS_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_CORRECT"] = 1; - values[valuesById[2] = "PARTIALLY_CORRECT"] = 2; - values[valuesById[3] = "FULLY_CORRECT"] = 3; - return values; - })(); - - return AnswerFeedback; + return AnnotatedMessagePart; })(); - v2beta1.AgentAssistantFeedback = (function() { + v2beta1.MessageAnnotation = (function() { /** - * Properties of an AgentAssistantFeedback. + * Properties of a MessageAnnotation. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAgentAssistantFeedback - * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance|null} [answerRelevance] AgentAssistantFeedback answerRelevance - * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness|null} [documentCorrectness] AgentAssistantFeedback documentCorrectness - * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency|null} [documentEfficiency] AgentAssistantFeedback documentEfficiency - * @property {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null} [summarizationFeedback] AgentAssistantFeedback summarizationFeedback + * @interface IMessageAnnotation + * @property {Array.|null} [parts] MessageAnnotation parts + * @property {boolean|null} [containEntities] MessageAnnotation containEntities */ /** - * Constructs a new AgentAssistantFeedback. + * Constructs a new MessageAnnotation. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AgentAssistantFeedback. - * @implements IAgentAssistantFeedback + * @classdesc Represents a MessageAnnotation. + * @implements IMessageAnnotation * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation=} [properties] Properties to set */ - function AgentAssistantFeedback(properties) { + function MessageAnnotation(properties) { + this.parts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84158,114 +83419,91 @@ } /** - * AgentAssistantFeedback answerRelevance. - * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance} answerRelevance - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * MessageAnnotation parts. + * @member {Array.} parts + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @instance */ - AgentAssistantFeedback.prototype.answerRelevance = 0; + MessageAnnotation.prototype.parts = $util.emptyArray; /** - * AgentAssistantFeedback documentCorrectness. - * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness} documentCorrectness - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * MessageAnnotation containEntities. + * @member {boolean} containEntities + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @instance */ - AgentAssistantFeedback.prototype.documentCorrectness = 0; - - /** - * AgentAssistantFeedback documentEfficiency. - * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency} documentEfficiency - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback - * @instance - */ - AgentAssistantFeedback.prototype.documentEfficiency = 0; - - /** - * AgentAssistantFeedback summarizationFeedback. - * @member {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback|null|undefined} summarizationFeedback - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback - * @instance - */ - AgentAssistantFeedback.prototype.summarizationFeedback = null; + MessageAnnotation.prototype.containEntities = false; /** - * Creates a new AgentAssistantFeedback instance using the specified properties. + * Creates a new MessageAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback instance + * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation instance */ - AgentAssistantFeedback.create = function create(properties) { - return new AgentAssistantFeedback(properties); + MessageAnnotation.create = function create(properties) { + return new MessageAnnotation(properties); }; /** - * Encodes the specified AgentAssistantFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. + * Encodes the specified MessageAnnotation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback} message AgentAssistantFeedback message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation} message MessageAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentAssistantFeedback.encode = function encode(message, writer) { + MessageAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answerRelevance != null && Object.hasOwnProperty.call(message, "answerRelevance")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.answerRelevance); - if (message.documentCorrectness != null && Object.hasOwnProperty.call(message, "documentCorrectness")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.documentCorrectness); - if (message.documentEfficiency != null && Object.hasOwnProperty.call(message, "documentEfficiency")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.documentEfficiency); - if (message.summarizationFeedback != null && Object.hasOwnProperty.call(message, "summarizationFeedback")) - $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.encode(message.summarizationFeedback, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.encode(message.parts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.containEntities != null && Object.hasOwnProperty.call(message, "containEntities")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.containEntities); return writer; }; /** - * Encodes the specified AgentAssistantFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.verify|verify} messages. + * Encodes the specified MessageAnnotation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static - * @param {google.cloud.dialogflow.v2beta1.IAgentAssistantFeedback} message AgentAssistantFeedback message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation} message MessageAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentAssistantFeedback.encodeDelimited = function encodeDelimited(message, writer) { + MessageAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AgentAssistantFeedback message from the specified reader or buffer. + * Decodes a MessageAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback + * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentAssistantFeedback.decode = function decode(reader, length) { + MessageAnnotation.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.v2beta1.AgentAssistantFeedback(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.MessageAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.answerRelevance = reader.int32(); + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.decode(reader, reader.uint32())); break; case 2: - message.documentCorrectness = reader.int32(); - break; - case 3: - message.documentEfficiency = reader.int32(); - break; - case 4: - message.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.decode(reader, reader.uint32()); + message.containEntities = reader.bool(); break; default: reader.skipType(tag & 7); @@ -84276,557 +83514,290 @@ }; /** - * Decodes an AgentAssistantFeedback message from the specified reader or buffer, length delimited. + * Decodes a MessageAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback + * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentAssistantFeedback.decodeDelimited = function decodeDelimited(reader) { + MessageAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AgentAssistantFeedback message. + * Verifies a MessageAnnotation message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AgentAssistantFeedback.verify = function verify(message) { + MessageAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) - switch (message.answerRelevance) { - default: - return "answerRelevance: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.documentCorrectness != null && message.hasOwnProperty("documentCorrectness")) - switch (message.documentCorrectness) { - default: - return "documentCorrectness: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.documentEfficiency != null && message.hasOwnProperty("documentEfficiency")) - switch (message.documentEfficiency) { - default: - return "documentEfficiency: enum value expected"; - case 0: - case 1: - case 2: - break; + 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.v2beta1.AnnotatedMessagePart.verify(message.parts[i]); + if (error) + return "parts." + error; } - if (message.summarizationFeedback != null && message.hasOwnProperty("summarizationFeedback")) { - var error = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify(message.summarizationFeedback); - if (error) - return "summarizationFeedback." + error; } + if (message.containEntities != null && message.hasOwnProperty("containEntities")) + if (typeof message.containEntities !== "boolean") + return "containEntities: boolean expected"; return null; }; /** - * Creates an AgentAssistantFeedback message from a plain object. Also converts values to their respective internal types. + * Creates a MessageAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} AgentAssistantFeedback + * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation */ - AgentAssistantFeedback.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback) + MessageAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.MessageAnnotation) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback(); - switch (object.answerRelevance) { - case "ANSWER_RELEVANCE_UNSPECIFIED": - case 0: - message.answerRelevance = 0; - break; - case "IRRELEVANT": - case 1: - message.answerRelevance = 1; - break; - case "RELEVANT": - case 2: - message.answerRelevance = 2; - break; - } - switch (object.documentCorrectness) { - case "DOCUMENT_CORRECTNESS_UNSPECIFIED": - case 0: - message.documentCorrectness = 0; - break; - case "INCORRECT": - case 1: - message.documentCorrectness = 1; - break; - case "CORRECT": - case 2: - message.documentCorrectness = 2; - break; - } - switch (object.documentEfficiency) { - case "DOCUMENT_EFFICIENCY_UNSPECIFIED": - case 0: - message.documentEfficiency = 0; - break; - case "INEFFICIENT": - case 1: - message.documentEfficiency = 1; - break; - case "EFFICIENT": - case 2: - message.documentEfficiency = 2; - break; - } - if (object.summarizationFeedback != null) { - if (typeof object.summarizationFeedback !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.summarizationFeedback: object expected"); - message.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.fromObject(object.summarizationFeedback); + var message = new $root.google.cloud.dialogflow.v2beta1.MessageAnnotation(); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.MessageAnnotation.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.v2beta1.MessageAnnotation.parts: object expected"); + message.parts[i] = $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.fromObject(object.parts[i]); + } } + if (object.containEntities != null) + message.containEntities = Boolean(object.containEntities); return message; }; /** - * Creates a plain object from an AgentAssistantFeedback message. Also converts values to other types if specified. + * Creates a plain object from a MessageAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback} message AgentAssistantFeedback + * @param {google.cloud.dialogflow.v2beta1.MessageAnnotation} message MessageAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AgentAssistantFeedback.toObject = function toObject(message, options) { + MessageAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.answerRelevance = options.enums === String ? "ANSWER_RELEVANCE_UNSPECIFIED" : 0; - object.documentCorrectness = options.enums === String ? "DOCUMENT_CORRECTNESS_UNSPECIFIED" : 0; - object.documentEfficiency = options.enums === String ? "DOCUMENT_EFFICIENCY_UNSPECIFIED" : 0; - object.summarizationFeedback = null; + if (options.arrays || options.defaults) + object.parts = []; + if (options.defaults) + object.containEntities = false; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.toObject(message.parts[j], options); } - if (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) - object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] : message.answerRelevance; - if (message.documentCorrectness != null && message.hasOwnProperty("documentCorrectness")) - object.documentCorrectness = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] : message.documentCorrectness; - if (message.documentEfficiency != null && message.hasOwnProperty("documentEfficiency")) - object.documentEfficiency = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] : message.documentEfficiency; - if (message.summarizationFeedback != null && message.hasOwnProperty("summarizationFeedback")) - object.summarizationFeedback = $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.toObject(message.summarizationFeedback, options); + if (message.containEntities != null && message.hasOwnProperty("containEntities")) + object.containEntities = message.containEntities; return object; }; /** - * Converts this AgentAssistantFeedback to JSON. + * Converts this MessageAnnotation to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback + * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation * @instance * @returns {Object.} JSON object */ - AgentAssistantFeedback.prototype.toJSON = function toJSON() { + MessageAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return MessageAnnotation; + })(); + + v2beta1.ArticleAnswer = (function() { + /** - * AnswerRelevance enum. - * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance - * @enum {number} - * @property {number} ANSWER_RELEVANCE_UNSPECIFIED=0 ANSWER_RELEVANCE_UNSPECIFIED value - * @property {number} IRRELEVANT=1 IRRELEVANT value - * @property {number} RELEVANT=2 RELEVANT value + * Properties of an ArticleAnswer. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IArticleAnswer + * @property {string|null} [title] ArticleAnswer title + * @property {string|null} [uri] ArticleAnswer uri + * @property {Array.|null} [snippets] ArticleAnswer snippets + * @property {Object.|null} [metadata] ArticleAnswer metadata + * @property {string|null} [answerRecord] ArticleAnswer answerRecord */ - AgentAssistantFeedback.AnswerRelevance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANSWER_RELEVANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IRRELEVANT"] = 1; - values[valuesById[2] = "RELEVANT"] = 2; - return values; - })(); /** - * DocumentCorrectness enum. - * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness - * @enum {number} - * @property {number} DOCUMENT_CORRECTNESS_UNSPECIFIED=0 DOCUMENT_CORRECTNESS_UNSPECIFIED value - * @property {number} INCORRECT=1 INCORRECT value - * @property {number} CORRECT=2 CORRECT value + * Constructs a new ArticleAnswer. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an ArticleAnswer. + * @implements IArticleAnswer + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer=} [properties] Properties to set */ - AgentAssistantFeedback.DocumentCorrectness = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENT_CORRECTNESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCORRECT"] = 1; - values[valuesById[2] = "CORRECT"] = 2; - return values; - })(); + function ArticleAnswer(properties) { + this.snippets = []; + this.metadata = {}; + 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]]; + } /** - * DocumentEfficiency enum. - * @name google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency - * @enum {number} - * @property {number} DOCUMENT_EFFICIENCY_UNSPECIFIED=0 DOCUMENT_EFFICIENCY_UNSPECIFIED value - * @property {number} INEFFICIENT=1 INEFFICIENT value - * @property {number} EFFICIENT=2 EFFICIENT value + * ArticleAnswer title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @instance */ - AgentAssistantFeedback.DocumentEfficiency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENT_EFFICIENCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INEFFICIENT"] = 1; - values[valuesById[2] = "EFFICIENT"] = 2; - return values; - })(); - - AgentAssistantFeedback.SummarizationFeedback = (function() { - - /** - * Properties of a SummarizationFeedback. - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback - * @interface ISummarizationFeedback - * @property {google.protobuf.ITimestamp|null} [startTimestamp] SummarizationFeedback startTimestamp - * @property {google.protobuf.ITimestamp|null} [submitTimestamp] SummarizationFeedback submitTimestamp - * @property {string|null} [summaryText] SummarizationFeedback summaryText - */ - - /** - * Constructs a new SummarizationFeedback. - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback - * @classdesc Represents a SummarizationFeedback. - * @implements ISummarizationFeedback - * @constructor - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback=} [properties] Properties to set - */ - function SummarizationFeedback(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]]; - } + ArticleAnswer.prototype.title = ""; - /** - * SummarizationFeedback startTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} startTimestamp - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @instance - */ - SummarizationFeedback.prototype.startTimestamp = null; + /** + * ArticleAnswer uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @instance + */ + ArticleAnswer.prototype.uri = ""; - /** - * SummarizationFeedback submitTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} submitTimestamp - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @instance - */ - SummarizationFeedback.prototype.submitTimestamp = null; + /** + * ArticleAnswer snippets. + * @member {Array.} snippets + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @instance + */ + ArticleAnswer.prototype.snippets = $util.emptyArray; - /** - * SummarizationFeedback summaryText. - * @member {string} summaryText - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @instance - */ - SummarizationFeedback.prototype.summaryText = ""; + /** + * ArticleAnswer metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @instance + */ + ArticleAnswer.prototype.metadata = $util.emptyObject; - /** - * Creates a new SummarizationFeedback instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback instance - */ - SummarizationFeedback.create = function create(properties) { - return new SummarizationFeedback(properties); - }; + /** + * ArticleAnswer answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @instance + */ + ArticleAnswer.prototype.answerRecord = ""; - /** - * Encodes the specified SummarizationFeedback message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback} message SummarizationFeedback message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SummarizationFeedback.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimestamp != null && Object.hasOwnProperty.call(message, "startTimestamp")) - $root.google.protobuf.Timestamp.encode(message.startTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.submitTimestamp != null && Object.hasOwnProperty.call(message, "submitTimestamp")) - $root.google.protobuf.Timestamp.encode(message.submitTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.summaryText != null && Object.hasOwnProperty.call(message, "summaryText")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.summaryText); - return writer; - }; + /** + * Creates a new ArticleAnswer instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer instance + */ + ArticleAnswer.create = function create(properties) { + return new ArticleAnswer(properties); + }; - /** - * Encodes the specified SummarizationFeedback message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.ISummarizationFeedback} message SummarizationFeedback message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SummarizationFeedback.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ArticleAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer} message ArticleAnswer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArticleAnswer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.snippets != null && message.snippets.length) + for (var i = 0; i < message.snippets.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snippets[i]); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); + return writer; + }; - /** - * Decodes a SummarizationFeedback message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SummarizationFeedback.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.v2beta1.AgentAssistantFeedback.SummarizationFeedback(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.startTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.submitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.summaryText = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SummarizationFeedback message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SummarizationFeedback.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SummarizationFeedback message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SummarizationFeedback.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTimestamp); - if (error) - return "startTimestamp." + error; - } - if (message.submitTimestamp != null && message.hasOwnProperty("submitTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.submitTimestamp); - if (error) - return "submitTimestamp." + error; - } - if (message.summaryText != null && message.hasOwnProperty("summaryText")) - if (!$util.isString(message.summaryText)) - return "summaryText: string expected"; - return null; - }; - - /** - * Creates a SummarizationFeedback message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} SummarizationFeedback - */ - SummarizationFeedback.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback(); - if (object.startTimestamp != null) { - if (typeof object.startTimestamp !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.startTimestamp: object expected"); - message.startTimestamp = $root.google.protobuf.Timestamp.fromObject(object.startTimestamp); - } - if (object.submitTimestamp != null) { - if (typeof object.submitTimestamp !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback.submitTimestamp: object expected"); - message.submitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.submitTimestamp); - } - if (object.summaryText != null) - message.summaryText = String(object.summaryText); - return message; - }; - - /** - * Creates a plain object from a SummarizationFeedback message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @static - * @param {google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback} message SummarizationFeedback - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SummarizationFeedback.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTimestamp = null; - object.submitTimestamp = null; - object.summaryText = ""; - } - if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) - object.startTimestamp = $root.google.protobuf.Timestamp.toObject(message.startTimestamp, options); - if (message.submitTimestamp != null && message.hasOwnProperty("submitTimestamp")) - object.submitTimestamp = $root.google.protobuf.Timestamp.toObject(message.submitTimestamp, options); - if (message.summaryText != null && message.hasOwnProperty("summaryText")) - object.summaryText = message.summaryText; - return object; - }; - - /** - * Converts this SummarizationFeedback to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.SummarizationFeedback - * @instance - * @returns {Object.} JSON object - */ - SummarizationFeedback.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SummarizationFeedback; - })(); - - return AgentAssistantFeedback; - })(); - - v2beta1.GetAnswerRecordRequest = (function() { - - /** - * Properties of a GetAnswerRecordRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetAnswerRecordRequest - * @property {string|null} [name] GetAnswerRecordRequest name - */ - - /** - * Constructs a new GetAnswerRecordRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetAnswerRecordRequest. - * @implements IGetAnswerRecordRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest=} [properties] Properties to set - */ - function GetAnswerRecordRequest(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]]; - } - - /** - * GetAnswerRecordRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest - * @instance - */ - GetAnswerRecordRequest.prototype.name = ""; - - /** - * Creates a new GetAnswerRecordRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest instance - */ - GetAnswerRecordRequest.create = function create(properties) { - return new GetAnswerRecordRequest(properties); - }; - - /** - * Encodes the specified GetAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} message GetAnswerRecordRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAnswerRecordRequest.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 GetAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetAnswerRecordRequest} message GetAnswerRecordRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAnswerRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ArticleAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer} message ArticleAnswer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArticleAnswer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes a GetAnswerRecordRequest message from the specified reader or buffer. + * Decodes an ArticleAnswer message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnswerRecordRequest.decode = function decode(reader, length) { + ArticleAnswer.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.v2beta1.GetAnswerRecordRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ArticleAnswer(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.title = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + if (!(message.snippets && message.snippets.length)) + message.snippets = []; + message.snippets.push(reader.string()); + break; + case 5: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + case 6: + message.answerRecord = reader.string(); break; default: reader.skipType(tag & 7); @@ -84837,109 +83808,174 @@ }; /** - * Decodes a GetAnswerRecordRequest message from the specified reader or buffer, length delimited. + * Decodes an ArticleAnswer message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnswerRecordRequest.decodeDelimited = function decodeDelimited(reader) { + ArticleAnswer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAnswerRecordRequest message. + * Verifies an ArticleAnswer message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAnswerRecordRequest.verify = function verify(message) { + ArticleAnswer.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.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.snippets != null && message.hasOwnProperty("snippets")) { + if (!Array.isArray(message.snippets)) + return "snippets: array expected"; + for (var i = 0; i < message.snippets.length; ++i) + if (!$util.isString(message.snippets[i])) + return "snippets: string[] expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; return null; }; /** - * Creates a GetAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ArticleAnswer message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} GetAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer */ - GetAnswerRecordRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest) + ArticleAnswer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ArticleAnswer) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.ArticleAnswer(); + if (object.title != null) + message.title = String(object.title); + if (object.uri != null) + message.uri = String(object.uri); + if (object.snippets) { + if (!Array.isArray(object.snippets)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ArticleAnswer.snippets: array expected"); + message.snippets = []; + for (var i = 0; i < object.snippets.length; ++i) + message.snippets[i] = String(object.snippets[i]); + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ArticleAnswer.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); return message; }; /** - * Creates a plain object from a GetAnswerRecordRequest message. Also converts values to other types if specified. + * Creates a plain object from an ArticleAnswer message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest} message GetAnswerRecordRequest + * @param {google.cloud.dialogflow.v2beta1.ArticleAnswer} message ArticleAnswer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAnswerRecordRequest.toObject = function toObject(message, options) { + ArticleAnswer.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.arrays || options.defaults) + object.snippets = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.title = ""; + object.uri = ""; + object.answerRecord = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.snippets && message.snippets.length) { + object.snippets = []; + for (var j = 0; j < message.snippets.length; ++j) + object.snippets[j] = message.snippets[j]; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; return object; }; /** - * Converts this GetAnswerRecordRequest to JSON. + * Converts this ArticleAnswer to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer * @instance * @returns {Object.} JSON object */ - GetAnswerRecordRequest.prototype.toJSON = function toJSON() { + ArticleAnswer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAnswerRecordRequest; + return ArticleAnswer; })(); - v2beta1.ListAnswerRecordsRequest = (function() { + v2beta1.FaqAnswer = (function() { /** - * Properties of a ListAnswerRecordsRequest. + * Properties of a FaqAnswer. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListAnswerRecordsRequest - * @property {string|null} [parent] ListAnswerRecordsRequest parent - * @property {number|null} [pageSize] ListAnswerRecordsRequest pageSize - * @property {string|null} [pageToken] ListAnswerRecordsRequest pageToken + * @interface IFaqAnswer + * @property {string|null} [answer] FaqAnswer answer + * @property {number|null} [confidence] FaqAnswer confidence + * @property {string|null} [question] FaqAnswer question + * @property {string|null} [source] FaqAnswer source + * @property {Object.|null} [metadata] FaqAnswer metadata + * @property {string|null} [answerRecord] FaqAnswer answerRecord */ /** - * Constructs a new ListAnswerRecordsRequest. + * Constructs a new FaqAnswer. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListAnswerRecordsRequest. - * @implements IListAnswerRecordsRequest + * @classdesc Represents a FaqAnswer. + * @implements IFaqAnswer * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer=} [properties] Properties to set */ - function ListAnswerRecordsRequest(properties) { + function FaqAnswer(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84947,231 +83983,329 @@ } /** - * ListAnswerRecordsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * FaqAnswer answer. + * @member {string} answer + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @instance */ - ListAnswerRecordsRequest.prototype.parent = ""; + FaqAnswer.prototype.answer = ""; /** - * ListAnswerRecordsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * FaqAnswer confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @instance */ - ListAnswerRecordsRequest.prototype.pageSize = 0; + FaqAnswer.prototype.confidence = 0; /** - * ListAnswerRecordsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * FaqAnswer question. + * @member {string} question + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @instance */ - ListAnswerRecordsRequest.prototype.pageToken = ""; + FaqAnswer.prototype.question = ""; /** - * Creates a new ListAnswerRecordsRequest instance using the specified properties. + * FaqAnswer source. + * @member {string} source + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @instance + */ + FaqAnswer.prototype.source = ""; + + /** + * FaqAnswer metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @instance + */ + FaqAnswer.prototype.metadata = $util.emptyObject; + + /** + * FaqAnswer answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @instance + */ + FaqAnswer.prototype.answerRecord = ""; + + /** + * Creates a new FaqAnswer instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest instance + * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer instance */ - ListAnswerRecordsRequest.create = function create(properties) { - return new ListAnswerRecordsRequest(properties); + FaqAnswer.create = function create(properties) { + return new FaqAnswer(properties); }; /** - * Encodes the specified ListAnswerRecordsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. + * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} message ListAnswerRecordsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer} message FaqAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnswerRecordsRequest.encode = function encode(message, writer) { + FaqAnswer.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 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.answer != null && Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.source); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); return writer; }; /** - * Encodes the specified ListAnswerRecordsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest.verify|verify} messages. + * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsRequest} message ListAnswerRecordsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer} message FaqAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnswerRecordsRequest.encodeDelimited = function encodeDelimited(message, writer) { + FaqAnswer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer. + * Decodes a FaqAnswer message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest + * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnswerRecordsRequest.decode = function decode(reader, length) { + FaqAnswer.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.v2beta1.ListAnswerRecordsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.FaqAnswer(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.answer = reader.string(); + break; + case 2: + message.confidence = reader.float(); break; case 3: - message.pageSize = reader.int32(); + message.question = reader.string(); break; case 4: - message.pageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); + message.source = reader.string(); break; - } - } - return message; - }; - - /** - * Decodes a ListAnswerRecordsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAnswerRecordsRequest.decodeDelimited = function decodeDelimited(reader) { + case 5: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + case 6: + message.answerRecord = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FaqAnswer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAnswerRecordsRequest message. + * Verifies a FaqAnswer message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAnswerRecordsRequest.verify = function verify(message) { + FaqAnswer.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.answer != null && message.hasOwnProperty("answer")) + if (!$util.isString(message.answer)) + return "answer: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; return null; }; /** - * Creates a ListAnswerRecordsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FaqAnswer message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} ListAnswerRecordsRequest + * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer */ - ListAnswerRecordsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest) + FaqAnswer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.FaqAnswer) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest(); - 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.v2beta1.FaqAnswer(); + if (object.answer != null) + message.answer = String(object.answer); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.question != null) + message.question = String(object.question); + if (object.source != null) + message.source = String(object.source); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.FaqAnswer.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); return message; }; /** - * Creates a plain object from a ListAnswerRecordsRequest message. Also converts values to other types if specified. + * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest} message ListAnswerRecordsRequest + * @param {google.cloud.dialogflow.v2beta1.FaqAnswer} message FaqAnswer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAnswerRecordsRequest.toObject = function toObject(message, options) { + FaqAnswer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.answer = ""; + object.confidence = 0; + object.question = ""; + object.source = ""; + object.answerRecord = ""; } - 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.answer != null && message.hasOwnProperty("answer")) + object.answer = message.answer; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; return object; }; /** - * Converts this ListAnswerRecordsRequest to JSON. + * Converts this FaqAnswer to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsRequest + * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer * @instance * @returns {Object.} JSON object */ - ListAnswerRecordsRequest.prototype.toJSON = function toJSON() { + FaqAnswer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAnswerRecordsRequest; + return FaqAnswer; })(); - v2beta1.ListAnswerRecordsResponse = (function() { + v2beta1.SmartReplyAnswer = (function() { /** - * Properties of a ListAnswerRecordsResponse. + * Properties of a SmartReplyAnswer. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListAnswerRecordsResponse - * @property {Array.|null} [answerRecords] ListAnswerRecordsResponse answerRecords - * @property {string|null} [nextPageToken] ListAnswerRecordsResponse nextPageToken + * @interface ISmartReplyAnswer + * @property {string|null} [reply] SmartReplyAnswer reply + * @property {number|null} [confidence] SmartReplyAnswer confidence + * @property {string|null} [answerRecord] SmartReplyAnswer answerRecord */ /** - * Constructs a new ListAnswerRecordsResponse. + * Constructs a new SmartReplyAnswer. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListAnswerRecordsResponse. - * @implements IListAnswerRecordsResponse + * @classdesc Represents a SmartReplyAnswer. + * @implements ISmartReplyAnswer * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer=} [properties] Properties to set */ - function ListAnswerRecordsResponse(properties) { - this.answerRecords = []; + function SmartReplyAnswer(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85179,91 +84313,101 @@ } /** - * ListAnswerRecordsResponse answerRecords. - * @member {Array.} answerRecords - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * SmartReplyAnswer reply. + * @member {string} reply + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @instance */ - ListAnswerRecordsResponse.prototype.answerRecords = $util.emptyArray; + SmartReplyAnswer.prototype.reply = ""; /** - * ListAnswerRecordsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * SmartReplyAnswer confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @instance */ - ListAnswerRecordsResponse.prototype.nextPageToken = ""; + SmartReplyAnswer.prototype.confidence = 0; /** - * Creates a new ListAnswerRecordsResponse instance using the specified properties. + * SmartReplyAnswer answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @instance + */ + SmartReplyAnswer.prototype.answerRecord = ""; + + /** + * Creates a new SmartReplyAnswer instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse instance + * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer instance */ - ListAnswerRecordsResponse.create = function create(properties) { - return new ListAnswerRecordsResponse(properties); + SmartReplyAnswer.create = function create(properties) { + return new SmartReplyAnswer(properties); }; /** - * Encodes the specified ListAnswerRecordsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. + * Encodes the specified SmartReplyAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse} message ListAnswerRecordsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer} message SmartReplyAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnswerRecordsResponse.encode = function encode(message, writer) { + SmartReplyAnswer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answerRecords != null && message.answerRecords.length) - for (var i = 0; i < message.answerRecords.length; ++i) - $root.google.cloud.dialogflow.v2beta1.AnswerRecord.encode(message.answerRecords[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.reply != null && Object.hasOwnProperty.call(message, "reply")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reply); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.answerRecord); return writer; }; /** - * Encodes the specified ListAnswerRecordsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.verify|verify} messages. + * Encodes the specified SmartReplyAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.IListAnswerRecordsResponse} message ListAnswerRecordsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer} message SmartReplyAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnswerRecordsResponse.encodeDelimited = function encodeDelimited(message, writer) { + SmartReplyAnswer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer. + * Decodes a SmartReplyAnswer message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse + * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnswerRecordsResponse.decode = function decode(reader, length) { + SmartReplyAnswer.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.v2beta1.ListAnswerRecordsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.answerRecords && message.answerRecords.length)) - message.answerRecords = []; - message.answerRecords.push($root.google.cloud.dialogflow.v2beta1.AnswerRecord.decode(reader, reader.uint32())); + message.reply = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.confidence = reader.float(); + break; + case 3: + message.answerRecord = reader.string(); break; default: reader.skipType(tag & 7); @@ -85274,134 +84418,127 @@ }; /** - * Decodes a ListAnswerRecordsResponse message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyAnswer message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse + * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnswerRecordsResponse.decodeDelimited = function decodeDelimited(reader) { + SmartReplyAnswer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAnswerRecordsResponse message. + * Verifies a SmartReplyAnswer message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAnswerRecordsResponse.verify = function verify(message) { + SmartReplyAnswer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answerRecords != null && message.hasOwnProperty("answerRecords")) { - if (!Array.isArray(message.answerRecords)) - return "answerRecords: array expected"; - for (var i = 0; i < message.answerRecords.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.verify(message.answerRecords[i]); - if (error) - return "answerRecords." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.reply != null && message.hasOwnProperty("reply")) + if (!$util.isString(message.reply)) + return "reply: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; return null; }; /** - * Creates a ListAnswerRecordsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyAnswer message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} ListAnswerRecordsResponse + * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer */ - ListAnswerRecordsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse) + SmartReplyAnswer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse(); - if (object.answerRecords) { - if (!Array.isArray(object.answerRecords)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.answerRecords: array expected"); - message.answerRecords = []; - for (var i = 0; i < object.answerRecords.length; ++i) { - if (typeof object.answerRecords[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse.answerRecords: object expected"); - message.answerRecords[i] = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.fromObject(object.answerRecords[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer(); + if (object.reply != null) + message.reply = String(object.reply); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); return message; }; /** - * Creates a plain object from a ListAnswerRecordsResponse message. Also converts values to other types if specified. + * Creates a plain object from a SmartReplyAnswer message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @static - * @param {google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse} message ListAnswerRecordsResponse + * @param {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} message SmartReplyAnswer * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAnswerRecordsResponse.toObject = function toObject(message, options) { + SmartReplyAnswer.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.answerRecords = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.answerRecords && message.answerRecords.length) { - object.answerRecords = []; - for (var j = 0; j < message.answerRecords.length; ++j) - object.answerRecords[j] = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.toObject(message.answerRecords[j], options); + if (options.defaults) { + object.reply = ""; + object.confidence = 0; + object.answerRecord = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.reply != null && message.hasOwnProperty("reply")) + object.reply = message.reply; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; return object; }; /** - * Converts this ListAnswerRecordsResponse to JSON. + * Converts this SmartReplyAnswer to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListAnswerRecordsResponse + * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer * @instance * @returns {Object.} JSON object */ - ListAnswerRecordsResponse.prototype.toJSON = function toJSON() { + SmartReplyAnswer.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAnswerRecordsResponse; + return SmartReplyAnswer; })(); - v2beta1.UpdateAnswerRecordRequest = (function() { + v2beta1.SuggestionResult = (function() { /** - * Properties of an UpdateAnswerRecordRequest. + * Properties of a SuggestionResult. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateAnswerRecordRequest - * @property {google.cloud.dialogflow.v2beta1.IAnswerRecord|null} [answerRecord] UpdateAnswerRecordRequest answerRecord - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAnswerRecordRequest updateMask + * @interface ISuggestionResult + * @property {google.rpc.IStatus|null} [error] SuggestionResult error + * @property {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null} [suggestArticlesResponse] SuggestionResult suggestArticlesResponse + * @property {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null} [suggestFaqAnswersResponse] SuggestionResult suggestFaqAnswersResponse + * @property {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null} [suggestSmartRepliesResponse] SuggestionResult suggestSmartRepliesResponse */ /** - * Constructs a new UpdateAnswerRecordRequest. + * Constructs a new SuggestionResult. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateAnswerRecordRequest. - * @implements IUpdateAnswerRecordRequest + * @classdesc Represents a SuggestionResult. + * @implements ISuggestionResult * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult=} [properties] Properties to set */ - function UpdateAnswerRecordRequest(properties) { + function SuggestionResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85409,88 +84546,128 @@ } /** - * UpdateAnswerRecordRequest answerRecord. - * @member {google.cloud.dialogflow.v2beta1.IAnswerRecord|null|undefined} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * SuggestionResult error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @instance */ - UpdateAnswerRecordRequest.prototype.answerRecord = null; + SuggestionResult.prototype.error = null; /** - * UpdateAnswerRecordRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * SuggestionResult suggestArticlesResponse. + * @member {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null|undefined} suggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @instance */ - UpdateAnswerRecordRequest.prototype.updateMask = null; + SuggestionResult.prototype.suggestArticlesResponse = null; /** - * Creates a new UpdateAnswerRecordRequest instance using the specified properties. + * SuggestionResult suggestFaqAnswersResponse. + * @member {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null|undefined} suggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @instance + */ + SuggestionResult.prototype.suggestFaqAnswersResponse = null; + + /** + * SuggestionResult suggestSmartRepliesResponse. + * @member {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null|undefined} suggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @instance + */ + SuggestionResult.prototype.suggestSmartRepliesResponse = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SuggestionResult suggestionResponse. + * @member {"error"|"suggestArticlesResponse"|"suggestFaqAnswersResponse"|"suggestSmartRepliesResponse"|undefined} suggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @instance + */ + Object.defineProperty(SuggestionResult.prototype, "suggestionResponse", { + get: $util.oneOfGetter($oneOfFields = ["error", "suggestArticlesResponse", "suggestFaqAnswersResponse", "suggestSmartRepliesResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SuggestionResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult instance */ - UpdateAnswerRecordRequest.create = function create(properties) { - return new UpdateAnswerRecordRequest(properties); + SuggestionResult.create = function create(properties) { + return new SuggestionResult(properties); }; /** - * Encodes the specified UpdateAnswerRecordRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * Encodes the specified SuggestionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} message UpdateAnswerRecordRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult} message SuggestionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAnswerRecordRequest.encode = function encode(message, writer) { + SuggestionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - $root.google.cloud.dialogflow.v2beta1.AnswerRecord.encode(message.answerRecord, 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.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.suggestArticlesResponse != null && Object.hasOwnProperty.call(message, "suggestArticlesResponse")) + $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.encode(message.suggestArticlesResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.suggestFaqAnswersResponse != null && Object.hasOwnProperty.call(message, "suggestFaqAnswersResponse")) + $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.encode(message.suggestFaqAnswersResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.suggestSmartRepliesResponse != null && Object.hasOwnProperty.call(message, "suggestSmartRepliesResponse")) + $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.encode(message.suggestSmartRepliesResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateAnswerRecordRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.verify|verify} messages. + * Encodes the specified SuggestionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateAnswerRecordRequest} message UpdateAnswerRecordRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult} message SuggestionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAnswerRecordRequest.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer. + * Decodes a SuggestionResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAnswerRecordRequest.decode = function decode(reader, length) { + SuggestionResult.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.v2beta1.UpdateAnswerRecordRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestionResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.decode(reader, reader.uint32()); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.decode(reader, reader.uint32()); + break; + case 3: + message.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.decode(reader, reader.uint32()); + break; + case 4: + message.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -85501,495 +84678,693 @@ }; /** - * Decodes an UpdateAnswerRecordRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestionResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAnswerRecordRequest.decodeDelimited = function decodeDelimited(reader) { + SuggestionResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAnswerRecordRequest message. + * Verifies a SuggestionResult message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAnswerRecordRequest.verify = function verify(message) { + SuggestionResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) { - var error = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.verify(message.answerRecord); - if (error) - return "answerRecord." + error; + var properties = {}; + if (message.error != null && message.hasOwnProperty("error")) { + properties.suggestionResponse = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.suggestArticlesResponse != null && message.hasOwnProperty("suggestArticlesResponse")) { + if (properties.suggestionResponse === 1) + return "suggestionResponse: multiple values"; + properties.suggestionResponse = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify(message.suggestArticlesResponse); + if (error) + return "suggestArticlesResponse." + error; + } + } + if (message.suggestFaqAnswersResponse != null && message.hasOwnProperty("suggestFaqAnswersResponse")) { + if (properties.suggestionResponse === 1) + return "suggestionResponse: multiple values"; + properties.suggestionResponse = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify(message.suggestFaqAnswersResponse); + if (error) + return "suggestFaqAnswersResponse." + error; + } + } + if (message.suggestSmartRepliesResponse != null && message.hasOwnProperty("suggestSmartRepliesResponse")) { + if (properties.suggestionResponse === 1) + return "suggestionResponse: multiple values"; + properties.suggestionResponse = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify(message.suggestSmartRepliesResponse); + if (error) + return "suggestSmartRepliesResponse." + error; + } } return null; }; /** - * Creates an UpdateAnswerRecordRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} UpdateAnswerRecordRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult */ - UpdateAnswerRecordRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest) + SuggestionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestionResult) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest(); - if (object.answerRecord != null) { - if (typeof object.answerRecord !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.answerRecord: object expected"); - message.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.fromObject(object.answerRecord); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestionResult(); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.suggestArticlesResponse != null) { + if (typeof object.suggestArticlesResponse !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestArticlesResponse: object expected"); + message.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.fromObject(object.suggestArticlesResponse); + } + if (object.suggestFaqAnswersResponse != null) { + if (typeof object.suggestFaqAnswersResponse !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestFaqAnswersResponse: object expected"); + message.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.fromObject(object.suggestFaqAnswersResponse); + } + if (object.suggestSmartRepliesResponse != null) { + if (typeof object.suggestSmartRepliesResponse !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestSmartRepliesResponse: object expected"); + message.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.fromObject(object.suggestSmartRepliesResponse); } return message; }; /** - * Creates a plain object from an UpdateAnswerRecordRequest message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest} message UpdateAnswerRecordRequest + * @param {google.cloud.dialogflow.v2beta1.SuggestionResult} message SuggestionResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAnswerRecordRequest.toObject = function toObject(message, options) { + SuggestionResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.answerRecord = null; - object.updateMask = null; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.suggestionResponse = "error"; + } + if (message.suggestArticlesResponse != null && message.hasOwnProperty("suggestArticlesResponse")) { + object.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.toObject(message.suggestArticlesResponse, options); + if (options.oneofs) + object.suggestionResponse = "suggestArticlesResponse"; + } + if (message.suggestFaqAnswersResponse != null && message.hasOwnProperty("suggestFaqAnswersResponse")) { + object.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.toObject(message.suggestFaqAnswersResponse, options); + if (options.oneofs) + object.suggestionResponse = "suggestFaqAnswersResponse"; + } + if (message.suggestSmartRepliesResponse != null && message.hasOwnProperty("suggestSmartRepliesResponse")) { + object.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.toObject(message.suggestSmartRepliesResponse, options); + if (options.oneofs) + object.suggestionResponse = "suggestSmartRepliesResponse"; } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = $root.google.cloud.dialogflow.v2beta1.AnswerRecord.toObject(message.answerRecord, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateAnswerRecordRequest to JSON. + * Converts this SuggestionResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateAnswerRecordRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult * @instance * @returns {Object.} JSON object */ - UpdateAnswerRecordRequest.prototype.toJSON = function toJSON() { + SuggestionResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateAnswerRecordRequest; + return SuggestionResult; })(); - v2beta1.Participants = (function() { + v2beta1.SuggestArticlesRequest = (function() { /** - * Constructs a new Participants service. + * Properties of a SuggestArticlesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Participants - * @extends $protobuf.rpc.Service + * @interface ISuggestArticlesRequest + * @property {string|null} [parent] SuggestArticlesRequest parent + * @property {string|null} [latestMessage] SuggestArticlesRequest latestMessage + * @property {number|null} [contextSize] SuggestArticlesRequest contextSize + * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] SuggestArticlesRequest assistQueryParams + */ + + /** + * Constructs a new SuggestArticlesRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a SuggestArticlesRequest. + * @implements ISuggestArticlesRequest * @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.v2beta1.ISuggestArticlesRequest=} [properties] Properties to set */ - function Participants(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function SuggestArticlesRequest(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]]; } - (Participants.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Participants; - /** - * Creates new Participants service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @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 {Participants} RPC service. Useful where requests and/or responses are streamed. + * SuggestArticlesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @instance */ - Participants.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + SuggestArticlesRequest.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#createParticipant}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef CreateParticipantCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant + * SuggestArticlesRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @instance */ + SuggestArticlesRequest.prototype.latestMessage = ""; /** - * Calls CreateParticipant. - * @function createParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants + * SuggestArticlesRequest contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} request CreateParticipantRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.CreateParticipantCallback} callback Node-style callback called with the error, if any, and Participant - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Participants.prototype.createParticipant = function createParticipant(request, callback) { - return this.rpcCall(createParticipant, $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); - }, "name", { value: "CreateParticipant" }); + SuggestArticlesRequest.prototype.contextSize = 0; /** - * Calls CreateParticipant. - * @function createParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants + * SuggestArticlesRequest assistQueryParams. + * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} request CreateParticipantRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + SuggestArticlesRequest.prototype.assistQueryParams = null; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#getParticipant}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef GetParticipantCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant + * Creates a new SuggestArticlesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest instance */ + SuggestArticlesRequest.create = function create(properties) { + return new SuggestArticlesRequest(properties); + }; /** - * Calls GetParticipant. - * @function getParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} request GetParticipantRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.GetParticipantCallback} callback Node-style callback called with the error, if any, and Participant - * @returns {undefined} - * @variation 1 + * Encodes the specified SuggestArticlesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} message SuggestArticlesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Participants.prototype.getParticipant = function getParticipant(request, callback) { - return this.rpcCall(getParticipant, $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); - }, "name", { value: "GetParticipant" }); + SuggestArticlesRequest.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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) + $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; /** - * Calls GetParticipant. - * @function getParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} request GetParticipantRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified SuggestArticlesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} message SuggestArticlesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + SuggestArticlesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listParticipants}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef ListParticipantsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} [response] ListParticipantsResponse + * Decodes a SuggestArticlesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + SuggestArticlesRequest.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.v2beta1.SuggestArticlesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); + break; + case 4: + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListParticipants. - * @function listParticipants - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} request ListParticipantsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.ListParticipantsCallback} callback Node-style callback called with the error, if any, and ListParticipantsResponse - * @returns {undefined} - * @variation 1 + * Decodes a SuggestArticlesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Participants.prototype.listParticipants = function listParticipants(request, callback) { - return this.rpcCall(listParticipants, $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest, $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse, request, callback); - }, "name", { value: "ListParticipants" }); + SuggestArticlesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListParticipants. - * @function listParticipants - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} request ListParticipantsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a SuggestArticlesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + SuggestArticlesRequest.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.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { + var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); + if (error) + return "assistQueryParams." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#updateParticipant}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef UpdateParticipantCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Participant} [response] Participant + * Creates a SuggestArticlesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest */ + SuggestArticlesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; + if (object.assistQueryParams != null) { + if (typeof object.assistQueryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.assistQueryParams: object expected"); + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + } + return message; + }; /** - * Calls UpdateParticipant. - * @function updateParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} request UpdateParticipantRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.UpdateParticipantCallback} callback Node-style callback called with the error, if any, and Participant - * @returns {undefined} - * @variation 1 + * Creates a plain object from a SuggestArticlesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} message SuggestArticlesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Participants.prototype.updateParticipant = function updateParticipant(request, callback) { - return this.rpcCall(updateParticipant, $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest, $root.google.cloud.dialogflow.v2beta1.Participant, request, callback); - }, "name", { value: "UpdateParticipant" }); + SuggestArticlesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.latestMessage = ""; + object.contextSize = 0; + object.assistQueryParams = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) + object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); + return object; + }; /** - * Calls UpdateParticipant. - * @function updateParticipant - * @memberof google.cloud.dialogflow.v2beta1.Participants + * Converts this SuggestArticlesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} request UpdateParticipantRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + SuggestArticlesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SuggestArticlesRequest; + })(); + + v2beta1.SuggestArticlesResponse = (function() { /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#analyzeContent}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef AnalyzeContentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} [response] AnalyzeContentResponse + * Properties of a SuggestArticlesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ISuggestArticlesResponse + * @property {Array.|null} [articleAnswers] SuggestArticlesResponse articleAnswers + * @property {string|null} [latestMessage] SuggestArticlesResponse latestMessage + * @property {number|null} [contextSize] SuggestArticlesResponse contextSize */ /** - * Calls AnalyzeContent. - * @function analyzeContent - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} request AnalyzeContentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.AnalyzeContentCallback} callback Node-style callback called with the error, if any, and AnalyzeContentResponse - * @returns {undefined} - * @variation 1 + * Constructs a new SuggestArticlesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a SuggestArticlesResponse. + * @implements ISuggestArticlesResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse=} [properties] Properties to set */ - Object.defineProperty(Participants.prototype.analyzeContent = function analyzeContent(request, callback) { - return this.rpcCall(analyzeContent, $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest, $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse, request, callback); - }, "name", { value: "AnalyzeContent" }); + function SuggestArticlesResponse(properties) { + this.articleAnswers = []; + 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 AnalyzeContent. - * @function analyzeContent - * @memberof google.cloud.dialogflow.v2beta1.Participants + * SuggestArticlesResponse articleAnswers. + * @member {Array.} articleAnswers + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse * @instance - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} request AnalyzeContentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + SuggestArticlesResponse.prototype.articleAnswers = $util.emptyArray; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestArticles}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef SuggestArticlesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} [response] SuggestArticlesResponse + * SuggestArticlesResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @instance */ + SuggestArticlesResponse.prototype.latestMessage = ""; /** - * Calls SuggestArticles. - * @function suggestArticles - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} request SuggestArticlesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestArticlesCallback} callback Node-style callback called with the error, if any, and SuggestArticlesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Participants.prototype.suggestArticles = function suggestArticles(request, callback) { - return this.rpcCall(suggestArticles, $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest, $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse, request, callback); - }, "name", { value: "SuggestArticles" }); - - /** - * Calls SuggestArticles. - * @function suggestArticles - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} request SuggestArticlesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestFaqAnswers}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef SuggestFaqAnswersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} [response] SuggestFaqAnswersResponse - */ - - /** - * Calls SuggestFaqAnswers. - * @function suggestFaqAnswers - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} request SuggestFaqAnswersRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswersCallback} callback Node-style callback called with the error, if any, and SuggestFaqAnswersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Participants.prototype.suggestFaqAnswers = function suggestFaqAnswers(request, callback) { - return this.rpcCall(suggestFaqAnswers, $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest, $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse, request, callback); - }, "name", { value: "SuggestFaqAnswers" }); - - /** - * Calls SuggestFaqAnswers. - * @function suggestFaqAnswers - * @memberof google.cloud.dialogflow.v2beta1.Participants + * SuggestArticlesResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} request SuggestFaqAnswersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + SuggestArticlesResponse.prototype.contextSize = 0; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#suggestSmartReplies}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef SuggestSmartRepliesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} [response] SuggestSmartRepliesResponse + * Creates a new SuggestArticlesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse instance */ + SuggestArticlesResponse.create = function create(properties) { + return new SuggestArticlesResponse(properties); + }; /** - * Calls SuggestSmartReplies. - * @function suggestSmartReplies - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} request SuggestSmartRepliesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.SuggestSmartRepliesCallback} callback Node-style callback called with the error, if any, and SuggestSmartRepliesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified SuggestArticlesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse} message SuggestArticlesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Participants.prototype.suggestSmartReplies = function suggestSmartReplies(request, callback) { - return this.rpcCall(suggestSmartReplies, $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest, $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse, request, callback); - }, "name", { value: "SuggestSmartReplies" }); + SuggestArticlesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.articleAnswers != null && message.articleAnswers.length) + for (var i = 0; i < message.articleAnswers.length; ++i) + $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.encode(message.articleAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + return writer; + }; /** - * Calls SuggestSmartReplies. - * @function suggestSmartReplies - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} request SuggestSmartRepliesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified SuggestArticlesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse} message SuggestArticlesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + SuggestArticlesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#listSuggestions}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef ListSuggestionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} [response] ListSuggestionsResponse + * Decodes a SuggestArticlesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + SuggestArticlesResponse.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.v2beta1.SuggestArticlesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.articleAnswers && message.articleAnswers.length)) + message.articleAnswers = []; + message.articleAnswers.push($root.google.cloud.dialogflow.v2beta1.ArticleAnswer.decode(reader, reader.uint32())); + break; + case 2: + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListSuggestions. - * @function listSuggestions - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} request ListSuggestionsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.ListSuggestionsCallback} callback Node-style callback called with the error, if any, and ListSuggestionsResponse - * @returns {undefined} - * @variation 1 + * Decodes a SuggestArticlesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Participants.prototype.listSuggestions = function listSuggestions(request, callback) { - return this.rpcCall(listSuggestions, $root.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest, $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse, request, callback); - }, "name", { value: "ListSuggestions" }); + SuggestArticlesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListSuggestions. - * @function listSuggestions - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} request ListSuggestionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a SuggestArticlesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + SuggestArticlesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.articleAnswers != null && message.hasOwnProperty("articleAnswers")) { + if (!Array.isArray(message.articleAnswers)) + return "articleAnswers: array expected"; + for (var i = 0; i < message.articleAnswers.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.verify(message.articleAnswers[i]); + if (error) + return "articleAnswers." + error; + } + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Participants#compileSuggestion}. - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @typedef CompileSuggestionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} [response] CompileSuggestionResponse + * Creates a SuggestArticlesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse */ + SuggestArticlesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse(); + if (object.articleAnswers) { + if (!Array.isArray(object.articleAnswers)) + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.articleAnswers: array expected"); + message.articleAnswers = []; + for (var i = 0; i < object.articleAnswers.length; ++i) { + if (typeof object.articleAnswers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.articleAnswers: object expected"); + message.articleAnswers[i] = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.fromObject(object.articleAnswers[i]); + } + } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; + return message; + }; /** - * Calls CompileSuggestion. - * @function compileSuggestion - * @memberof google.cloud.dialogflow.v2beta1.Participants - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} request CompileSuggestionRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Participants.CompileSuggestionCallback} callback Node-style callback called with the error, if any, and CompileSuggestionResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from a SuggestArticlesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} message SuggestArticlesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Participants.prototype.compileSuggestion = function compileSuggestion(request, callback) { - return this.rpcCall(compileSuggestion, $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest, $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse, request, callback); - }, "name", { value: "CompileSuggestion" }); + SuggestArticlesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.articleAnswers = []; + if (options.defaults) { + object.latestMessage = ""; + object.contextSize = 0; + } + if (message.articleAnswers && message.articleAnswers.length) { + object.articleAnswers = []; + for (var j = 0; j < message.articleAnswers.length; ++j) + object.articleAnswers[j] = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.toObject(message.articleAnswers[j], options); + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; + return object; + }; /** - * Calls CompileSuggestion. - * @function compileSuggestion - * @memberof google.cloud.dialogflow.v2beta1.Participants + * Converts this SuggestArticlesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse * @instance - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} request CompileSuggestionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + SuggestArticlesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Participants; + return SuggestArticlesResponse; })(); - v2beta1.Participant = (function() { + v2beta1.SuggestFaqAnswersRequest = (function() { /** - * Properties of a Participant. + * Properties of a SuggestFaqAnswersRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IParticipant - * @property {string|null} [name] Participant name - * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [role] Participant role - * @property {string|null} [obfuscatedExternalUserId] Participant obfuscatedExternalUserId - * @property {Object.|null} [documentsMetadataFilters] Participant documentsMetadataFilters + * @interface ISuggestFaqAnswersRequest + * @property {string|null} [parent] SuggestFaqAnswersRequest parent + * @property {string|null} [latestMessage] SuggestFaqAnswersRequest latestMessage + * @property {number|null} [contextSize] SuggestFaqAnswersRequest contextSize + * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] SuggestFaqAnswersRequest assistQueryParams */ /** - * Constructs a new Participant. + * Constructs a new SuggestFaqAnswersRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Participant. - * @implements IParticipant + * @classdesc Represents a SuggestFaqAnswersRequest. + * @implements ISuggestFaqAnswersRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IParticipant=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest=} [properties] Properties to set */ - function Participant(properties) { - this.documentsMetadataFilters = {}; + function SuggestFaqAnswersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85997,134 +85372,114 @@ } /** - * Participant name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Participant + * SuggestFaqAnswersRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @instance */ - Participant.prototype.name = ""; + SuggestFaqAnswersRequest.prototype.parent = ""; /** - * Participant role. - * @member {google.cloud.dialogflow.v2beta1.Participant.Role} role - * @memberof google.cloud.dialogflow.v2beta1.Participant + * SuggestFaqAnswersRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @instance */ - Participant.prototype.role = 0; + SuggestFaqAnswersRequest.prototype.latestMessage = ""; /** - * Participant obfuscatedExternalUserId. - * @member {string} obfuscatedExternalUserId - * @memberof google.cloud.dialogflow.v2beta1.Participant + * SuggestFaqAnswersRequest contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @instance */ - Participant.prototype.obfuscatedExternalUserId = ""; + SuggestFaqAnswersRequest.prototype.contextSize = 0; /** - * Participant documentsMetadataFilters. - * @member {Object.} documentsMetadataFilters - * @memberof google.cloud.dialogflow.v2beta1.Participant + * SuggestFaqAnswersRequest assistQueryParams. + * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @instance */ - Participant.prototype.documentsMetadataFilters = $util.emptyObject; + SuggestFaqAnswersRequest.prototype.assistQueryParams = null; /** - * Creates a new Participant instance using the specified properties. + * Creates a new SuggestFaqAnswersRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IParticipant=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest instance */ - Participant.create = function create(properties) { - return new Participant(properties); + SuggestFaqAnswersRequest.create = function create(properties) { + return new SuggestFaqAnswersRequest(properties); }; /** - * Encodes the specified Participant message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. + * Encodes the specified SuggestFaqAnswersRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IParticipant} message Participant message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} message SuggestFaqAnswersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Participant.encode = function encode(message, writer) { + SuggestFaqAnswersRequest.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.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.role); - if (message.obfuscatedExternalUserId != null && Object.hasOwnProperty.call(message, "obfuscatedExternalUserId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.obfuscatedExternalUserId); - if (message.documentsMetadataFilters != null && Object.hasOwnProperty.call(message, "documentsMetadataFilters")) - for (var keys = Object.keys(message.documentsMetadataFilters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.documentsMetadataFilters[keys[i]]).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) + $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Participant message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Participant.verify|verify} messages. + * Encodes the specified SuggestFaqAnswersRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IParticipant} message Participant message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} message SuggestFaqAnswersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Participant.encodeDelimited = function encodeDelimited(message, writer) { + SuggestFaqAnswersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Participant message from the specified reader or buffer. + * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Participant.decode = function decode(reader, length) { + SuggestFaqAnswersRequest.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.v2beta1.Participant(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest(); 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.role = reader.int32(); + message.latestMessage = reader.string(); break; - case 7: - message.obfuscatedExternalUserId = reader.string(); + case 3: + message.contextSize = reader.int32(); break; - case 8: - if (message.documentsMetadataFilters === $util.emptyObject) - message.documentsMetadataFilters = {}; - 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.documentsMetadataFilters[key] = value; + case 4: + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -86135,196 +85490,140 @@ }; /** - * Decodes a Participant message from the specified reader or buffer, length delimited. + * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Participant.decodeDelimited = function decodeDelimited(reader) { + SuggestFaqAnswersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Participant message. + * Verifies a SuggestFaqAnswersRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Participant.verify = function verify(message) { + SuggestFaqAnswersRequest.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.role != null && message.hasOwnProperty("role")) - switch (message.role) { - default: - return "role: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) - if (!$util.isString(message.obfuscatedExternalUserId)) - return "obfuscatedExternalUserId: string expected"; - if (message.documentsMetadataFilters != null && message.hasOwnProperty("documentsMetadataFilters")) { - if (!$util.isObject(message.documentsMetadataFilters)) - return "documentsMetadataFilters: object expected"; - var key = Object.keys(message.documentsMetadataFilters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.documentsMetadataFilters[key[i]])) - return "documentsMetadataFilters: string{k:string} expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { + var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); + if (error) + return "assistQueryParams." + error; } return null; }; /** - * Creates a Participant message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestFaqAnswersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Participant} Participant + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest */ - Participant.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Participant) + SuggestFaqAnswersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Participant(); - if (object.name != null) - message.name = String(object.name); - switch (object.role) { - case "ROLE_UNSPECIFIED": - case 0: - message.role = 0; - break; - case "HUMAN_AGENT": - case 1: - message.role = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.role = 2; - break; - case "END_USER": - case 3: - message.role = 3; - break; - } - if (object.obfuscatedExternalUserId != null) - message.obfuscatedExternalUserId = String(object.obfuscatedExternalUserId); - if (object.documentsMetadataFilters) { - if (typeof object.documentsMetadataFilters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Participant.documentsMetadataFilters: object expected"); - message.documentsMetadataFilters = {}; - for (var keys = Object.keys(object.documentsMetadataFilters), i = 0; i < keys.length; ++i) - message.documentsMetadataFilters[keys[i]] = String(object.documentsMetadataFilters[keys[i]]); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; + if (object.assistQueryParams != null) { + if (typeof object.assistQueryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.assistQueryParams: object expected"); + message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); } return message; }; /** - * Creates a plain object from a Participant message. Also converts values to other types if specified. + * Creates a plain object from a SuggestFaqAnswersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @static - * @param {google.cloud.dialogflow.v2beta1.Participant} message Participant + * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} message SuggestFaqAnswersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Participant.toObject = function toObject(message, options) { + SuggestFaqAnswersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.documentsMetadataFilters = {}; if (options.defaults) { - object.name = ""; - object.role = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.obfuscatedExternalUserId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.role != null && message.hasOwnProperty("role")) - object.role = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.role] : message.role; - if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) - object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; - var keys2; - if (message.documentsMetadataFilters && (keys2 = Object.keys(message.documentsMetadataFilters)).length) { - object.documentsMetadataFilters = {}; - for (var j = 0; j < keys2.length; ++j) - object.documentsMetadataFilters[keys2[j]] = message.documentsMetadataFilters[keys2[j]]; + object.parent = ""; + object.latestMessage = ""; + object.contextSize = 0; + object.assistQueryParams = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; + if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) + object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); return object; }; /** - * Converts this Participant to JSON. + * Converts this SuggestFaqAnswersRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Participant + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest * @instance * @returns {Object.} JSON object */ - Participant.prototype.toJSON = function toJSON() { + SuggestFaqAnswersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Role enum. - * @name google.cloud.dialogflow.v2beta1.Participant.Role - * @enum {number} - * @property {number} ROLE_UNSPECIFIED=0 ROLE_UNSPECIFIED value - * @property {number} HUMAN_AGENT=1 HUMAN_AGENT value - * @property {number} AUTOMATED_AGENT=2 AUTOMATED_AGENT value - * @property {number} END_USER=3 END_USER value - */ - Participant.Role = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HUMAN_AGENT"] = 1; - values[valuesById[2] = "AUTOMATED_AGENT"] = 2; - values[valuesById[3] = "END_USER"] = 3; - return values; - })(); - - return Participant; + return SuggestFaqAnswersRequest; })(); - v2beta1.Message = (function() { + v2beta1.SuggestFaqAnswersResponse = (function() { /** - * Properties of a Message. + * Properties of a SuggestFaqAnswersResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IMessage - * @property {string|null} [name] Message name - * @property {string|null} [content] Message content - * @property {string|null} [languageCode] Message languageCode - * @property {string|null} [participant] Message participant - * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] Message participantRole - * @property {google.protobuf.ITimestamp|null} [createTime] Message createTime - * @property {google.protobuf.ITimestamp|null} [sendTime] Message sendTime - * @property {google.cloud.dialogflow.v2beta1.IMessageAnnotation|null} [messageAnnotation] Message messageAnnotation - * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null} [sentimentAnalysis] Message sentimentAnalysis + * @interface ISuggestFaqAnswersResponse + * @property {Array.|null} [faqAnswers] SuggestFaqAnswersResponse faqAnswers + * @property {string|null} [latestMessage] SuggestFaqAnswersResponse latestMessage + * @property {number|null} [contextSize] SuggestFaqAnswersResponse contextSize */ /** - * Constructs a new Message. + * Constructs a new SuggestFaqAnswersResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Message. - * @implements IMessage + * @classdesc Represents a SuggestFaqAnswersResponse. + * @implements ISuggestFaqAnswersResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IMessage=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse=} [properties] Properties to set */ - function Message(properties) { + function SuggestFaqAnswersResponse(properties) { + this.faqAnswers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86332,179 +85631,104 @@ } /** - * Message name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.name = ""; - - /** - * Message content. - * @member {string} content - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.content = ""; - - /** - * Message languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.languageCode = ""; - - /** - * Message participant. - * @member {string} participant - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.participant = ""; - - /** - * Message participantRole. - * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.participantRole = 0; - - /** - * Message createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2beta1.Message - * @instance - */ - Message.prototype.createTime = null; - - /** - * Message sendTime. - * @member {google.protobuf.ITimestamp|null|undefined} sendTime - * @memberof google.cloud.dialogflow.v2beta1.Message + * SuggestFaqAnswersResponse faqAnswers. + * @member {Array.} faqAnswers + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @instance */ - Message.prototype.sendTime = null; + SuggestFaqAnswersResponse.prototype.faqAnswers = $util.emptyArray; /** - * Message messageAnnotation. - * @member {google.cloud.dialogflow.v2beta1.IMessageAnnotation|null|undefined} messageAnnotation - * @memberof google.cloud.dialogflow.v2beta1.Message + * SuggestFaqAnswersResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @instance */ - Message.prototype.messageAnnotation = null; + SuggestFaqAnswersResponse.prototype.latestMessage = ""; /** - * Message sentimentAnalysis. - * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null|undefined} sentimentAnalysis - * @memberof google.cloud.dialogflow.v2beta1.Message + * SuggestFaqAnswersResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @instance */ - Message.prototype.sentimentAnalysis = null; + SuggestFaqAnswersResponse.prototype.contextSize = 0; /** - * Creates a new Message instance using the specified properties. + * Creates a new SuggestFaqAnswersResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Message} Message instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse instance */ - Message.create = function create(properties) { - return new Message(properties); + SuggestFaqAnswersResponse.create = function create(properties) { + return new SuggestFaqAnswersResponse(properties); }; /** - * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. + * Encodes the specified SuggestFaqAnswersResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IMessage} message Message message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse} message SuggestFaqAnswersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Message.encode = function encode(message, writer) { + SuggestFaqAnswersResponse.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.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.participant); - if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.participantRole); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.messageAnnotation != null && Object.hasOwnProperty.call(message, "messageAnnotation")) - $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.encode(message.messageAnnotation, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.sentimentAnalysis != null && Object.hasOwnProperty.call(message, "sentimentAnalysis")) - $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.encode(message.sentimentAnalysis, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sendTime != null && Object.hasOwnProperty.call(message, "sendTime")) - $root.google.protobuf.Timestamp.encode(message.sendTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.faqAnswers != null && message.faqAnswers.length) + for (var i = 0; i < message.faqAnswers.length; ++i) + $root.google.cloud.dialogflow.v2beta1.FaqAnswer.encode(message.faqAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); return writer; }; /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Message.verify|verify} messages. + * Encodes the specified SuggestFaqAnswersResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IMessage} message Message message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse} message SuggestFaqAnswersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Message.encodeDelimited = function encodeDelimited(message, writer) { + SuggestFaqAnswersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Message message from the specified reader or buffer. + * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Message} Message + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Message.decode = function decode(reader, length) { + SuggestFaqAnswersResponse.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.v2beta1.Message(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.faqAnswers && message.faqAnswers.length)) + message.faqAnswers = []; + message.faqAnswers.push($root.google.cloud.dialogflow.v2beta1.FaqAnswer.decode(reader, reader.uint32())); break; case 2: - message.content = reader.string(); + message.latestMessage = reader.string(); break; case 3: - message.languageCode = reader.string(); - break; - case 4: - message.participant = reader.string(); - break; - case 5: - message.participantRole = reader.int32(); - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.sendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.decode(reader, reader.uint32()); - break; - case 8: - message.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.decode(reader, reader.uint32()); + message.contextSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -86515,216 +85739,145 @@ }; /** - * Decodes a Message message from the specified reader or buffer, length delimited. + * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Message} Message + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Message.decodeDelimited = function decodeDelimited(reader) { + SuggestFaqAnswersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Message message. + * Verifies a SuggestFaqAnswersResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Message.verify = function verify(message) { + SuggestFaqAnswersResponse.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.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - switch (message.participantRole) { - default: - return "participantRole: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; + if (message.faqAnswers != null && message.hasOwnProperty("faqAnswers")) { + if (!Array.isArray(message.faqAnswers)) + return "faqAnswers: array expected"; + for (var i = 0; i < message.faqAnswers.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.verify(message.faqAnswers[i]); + if (error) + return "faqAnswers." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.sendTime != null && message.hasOwnProperty("sendTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.sendTime); - if (error) - return "sendTime." + error; - } - if (message.messageAnnotation != null && message.hasOwnProperty("messageAnnotation")) { - var error = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.verify(message.messageAnnotation); - if (error) - return "messageAnnotation." + error; - } - if (message.sentimentAnalysis != null && message.hasOwnProperty("sentimentAnalysis")) { - var error = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify(message.sentimentAnalysis); - if (error) - return "sentimentAnalysis." + error; } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates a Message message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestFaqAnswersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Message} Message + * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse */ - Message.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Message) + SuggestFaqAnswersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Message(); - if (object.name != null) - message.name = String(object.name); - if (object.content != null) - message.content = String(object.content); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.participant != null) - message.participant = String(object.participant); - switch (object.participantRole) { - case "ROLE_UNSPECIFIED": - case 0: - message.participantRole = 0; - break; - case "HUMAN_AGENT": - case 1: - message.participantRole = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.participantRole = 2; - break; - case "END_USER": - case 3: - message.participantRole = 3; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Message.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.sendTime != null) { - if (typeof object.sendTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Message.sendTime: object expected"); - message.sendTime = $root.google.protobuf.Timestamp.fromObject(object.sendTime); - } - if (object.messageAnnotation != null) { - if (typeof object.messageAnnotation !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Message.messageAnnotation: object expected"); - message.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.fromObject(object.messageAnnotation); - } - if (object.sentimentAnalysis != null) { - if (typeof object.sentimentAnalysis !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Message.sentimentAnalysis: object expected"); - message.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.fromObject(object.sentimentAnalysis); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse(); + if (object.faqAnswers) { + if (!Array.isArray(object.faqAnswers)) + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.faqAnswers: array expected"); + message.faqAnswers = []; + for (var i = 0; i < object.faqAnswers.length; ++i) { + if (typeof object.faqAnswers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.faqAnswers: object expected"); + message.faqAnswers[i] = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.fromObject(object.faqAnswers[i]); + } } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a Message message. Also converts values to other types if specified. + * Creates a plain object from a SuggestFaqAnswersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @static - * @param {google.cloud.dialogflow.v2beta1.Message} message Message + * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} message SuggestFaqAnswersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Message.toObject = function toObject(message, options) { + SuggestFaqAnswersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.faqAnswers = []; if (options.defaults) { - object.name = ""; - object.content = ""; - object.languageCode = ""; - object.participant = ""; - object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.createTime = null; - object.messageAnnotation = null; - object.sentimentAnalysis = null; - object.sendTime = null; + object.latestMessage = ""; + object.contextSize = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.messageAnnotation != null && message.hasOwnProperty("messageAnnotation")) - object.messageAnnotation = $root.google.cloud.dialogflow.v2beta1.MessageAnnotation.toObject(message.messageAnnotation, options); - if (message.sentimentAnalysis != null && message.hasOwnProperty("sentimentAnalysis")) - object.sentimentAnalysis = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.toObject(message.sentimentAnalysis, options); - if (message.sendTime != null && message.hasOwnProperty("sendTime")) - object.sendTime = $root.google.protobuf.Timestamp.toObject(message.sendTime, options); + if (message.faqAnswers && message.faqAnswers.length) { + object.faqAnswers = []; + for (var j = 0; j < message.faqAnswers.length; ++j) + object.faqAnswers[j] = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.toObject(message.faqAnswers[j], options); + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this Message to JSON. + * Converts this SuggestFaqAnswersResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Message + * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse * @instance * @returns {Object.} JSON object */ - Message.prototype.toJSON = function toJSON() { + SuggestFaqAnswersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Message; + return SuggestFaqAnswersResponse; })(); - v2beta1.CreateParticipantRequest = (function() { + v2beta1.SuggestSmartRepliesRequest = (function() { /** - * Properties of a CreateParticipantRequest. + * Properties of a SuggestSmartRepliesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateParticipantRequest - * @property {string|null} [parent] CreateParticipantRequest parent - * @property {google.cloud.dialogflow.v2beta1.IParticipant|null} [participant] CreateParticipantRequest participant + * @interface ISuggestSmartRepliesRequest + * @property {string|null} [parent] SuggestSmartRepliesRequest parent + * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [currentTextInput] SuggestSmartRepliesRequest currentTextInput + * @property {string|null} [latestMessage] SuggestSmartRepliesRequest latestMessage + * @property {number|null} [contextSize] SuggestSmartRepliesRequest contextSize */ /** - * Constructs a new CreateParticipantRequest. + * Constructs a new SuggestSmartRepliesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateParticipantRequest. - * @implements ICreateParticipantRequest + * @classdesc Represents a SuggestSmartRepliesRequest. + * @implements ISuggestSmartRepliesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest=} [properties] Properties to set */ - function CreateParticipantRequest(properties) { + function SuggestSmartRepliesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86732,88 +85885,114 @@ } /** - * CreateParticipantRequest parent. + * SuggestSmartRepliesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @instance */ - CreateParticipantRequest.prototype.parent = ""; + SuggestSmartRepliesRequest.prototype.parent = ""; /** - * CreateParticipantRequest participant. - * @member {google.cloud.dialogflow.v2beta1.IParticipant|null|undefined} participant - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * SuggestSmartRepliesRequest currentTextInput. + * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} currentTextInput + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @instance */ - CreateParticipantRequest.prototype.participant = null; + SuggestSmartRepliesRequest.prototype.currentTextInput = null; /** - * Creates a new CreateParticipantRequest instance using the specified properties. + * SuggestSmartRepliesRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @instance + */ + SuggestSmartRepliesRequest.prototype.latestMessage = ""; + + /** + * SuggestSmartRepliesRequest contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @instance + */ + SuggestSmartRepliesRequest.prototype.contextSize = 0; + + /** + * Creates a new SuggestSmartRepliesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest instance */ - CreateParticipantRequest.create = function create(properties) { - return new CreateParticipantRequest(properties); + SuggestSmartRepliesRequest.create = function create(properties) { + return new SuggestSmartRepliesRequest(properties); }; /** - * Encodes the specified CreateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. + * Encodes the specified SuggestSmartRepliesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} message CreateParticipantRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} message SuggestSmartRepliesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateParticipantRequest.encode = function encode(message, writer) { + SuggestSmartRepliesRequest.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.participant != null && Object.hasOwnProperty.call(message, "participant")) - $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participant, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + if (message.currentTextInput != null && Object.hasOwnProperty.call(message, "currentTextInput")) + $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.currentTextInput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateParticipantRequest.verify|verify} messages. + * Encodes the specified SuggestSmartRepliesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateParticipantRequest} message CreateParticipantRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} message SuggestSmartRepliesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { + SuggestSmartRepliesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateParticipantRequest message from the specified reader or buffer. + * Decodes a SuggestSmartRepliesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateParticipantRequest.decode = function decode(reader, length) { + SuggestSmartRepliesRequest.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.v2beta1.CreateParticipantRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.parent = reader.string(); break; + case 4: + message.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); + break; case 2: - message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32()); + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -86824,121 +86003,140 @@ }; /** - * Decodes a CreateParticipantRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestSmartRepliesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateParticipantRequest.decodeDelimited = function decodeDelimited(reader) { + SuggestSmartRepliesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateParticipantRequest message. + * Verifies a SuggestSmartRepliesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateParticipantRequest.verify = function verify(message) { + SuggestSmartRepliesRequest.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.participant != null && message.hasOwnProperty("participant")) { - var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participant); + if (message.currentTextInput != null && message.hasOwnProperty("currentTextInput")) { + var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.currentTextInput); if (error) - return "participant." + error; + return "currentTextInput." + error; } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates a CreateParticipantRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestSmartRepliesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} CreateParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest */ - CreateParticipantRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest) + SuggestSmartRepliesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateParticipantRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.participant != null) { - if (typeof object.participant !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateParticipantRequest.participant: object expected"); - message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participant); + if (object.currentTextInput != null) { + if (typeof object.currentTextInput !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.currentTextInput: object expected"); + message.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.currentTextInput); } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a CreateParticipantRequest message. Also converts values to other types if specified. + * Creates a plain object from a SuggestSmartRepliesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CreateParticipantRequest} message CreateParticipantRequest + * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} message SuggestSmartRepliesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateParticipantRequest.toObject = function toObject(message, options) { + SuggestSmartRepliesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.participant = null; + object.latestMessage = ""; + object.contextSize = 0; + object.currentTextInput = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participant, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; + if (message.currentTextInput != null && message.hasOwnProperty("currentTextInput")) + object.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.currentTextInput, options); return object; }; /** - * Converts this CreateParticipantRequest to JSON. + * Converts this SuggestSmartRepliesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest * @instance * @returns {Object.} JSON object */ - CreateParticipantRequest.prototype.toJSON = function toJSON() { + SuggestSmartRepliesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateParticipantRequest; + return SuggestSmartRepliesRequest; })(); - v2beta1.GetParticipantRequest = (function() { + v2beta1.SuggestSmartRepliesResponse = (function() { /** - * Properties of a GetParticipantRequest. + * Properties of a SuggestSmartRepliesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetParticipantRequest - * @property {string|null} [name] GetParticipantRequest name + * @interface ISuggestSmartRepliesResponse + * @property {Array.|null} [smartReplyAnswers] SuggestSmartRepliesResponse smartReplyAnswers + * @property {string|null} [latestMessage] SuggestSmartRepliesResponse latestMessage + * @property {number|null} [contextSize] SuggestSmartRepliesResponse contextSize */ /** - * Constructs a new GetParticipantRequest. + * Constructs a new SuggestSmartRepliesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetParticipantRequest. - * @implements IGetParticipantRequest + * @classdesc Represents a SuggestSmartRepliesResponse. + * @implements ISuggestSmartRepliesResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse=} [properties] Properties to set */ - function GetParticipantRequest(properties) { + function SuggestSmartRepliesResponse(properties) { + this.smartReplyAnswers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -86946,75 +86144,104 @@ } /** - * GetParticipantRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * SuggestSmartRepliesResponse smartReplyAnswers. + * @member {Array.} smartReplyAnswers + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @instance */ - GetParticipantRequest.prototype.name = ""; + SuggestSmartRepliesResponse.prototype.smartReplyAnswers = $util.emptyArray; /** - * Creates a new GetParticipantRequest instance using the specified properties. + * SuggestSmartRepliesResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @instance + */ + SuggestSmartRepliesResponse.prototype.latestMessage = ""; + + /** + * SuggestSmartRepliesResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @instance + */ + SuggestSmartRepliesResponse.prototype.contextSize = 0; + + /** + * Creates a new SuggestSmartRepliesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse instance */ - GetParticipantRequest.create = function create(properties) { - return new GetParticipantRequest(properties); + SuggestSmartRepliesResponse.create = function create(properties) { + return new SuggestSmartRepliesResponse(properties); }; /** - * Encodes the specified GetParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. + * Encodes the specified SuggestSmartRepliesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} message GetParticipantRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse} message SuggestSmartRepliesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetParticipantRequest.encode = function encode(message, writer) { + SuggestSmartRepliesResponse.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.smartReplyAnswers != null && message.smartReplyAnswers.length) + for (var i = 0; i < message.smartReplyAnswers.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.encode(message.smartReplyAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); return writer; }; /** - * Encodes the specified GetParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetParticipantRequest.verify|verify} messages. + * Encodes the specified SuggestSmartRepliesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IGetParticipantRequest} message GetParticipantRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse} message SuggestSmartRepliesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { + SuggestSmartRepliesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetParticipantRequest message from the specified reader or buffer. + * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetParticipantRequest.decode = function decode(reader, length) { + SuggestSmartRepliesResponse.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.v2beta1.GetParticipantRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.smartReplyAnswers && message.smartReplyAnswers.length)) + message.smartReplyAnswers = []; + message.smartReplyAnswers.push($root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.decode(reader, reader.uint32())); + break; + case 2: + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -87025,109 +86252,148 @@ }; /** - * Decodes a GetParticipantRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetParticipantRequest.decodeDelimited = function decodeDelimited(reader) { + SuggestSmartRepliesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetParticipantRequest message. + * Verifies a SuggestSmartRepliesResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetParticipantRequest.verify = function verify(message) { + SuggestSmartRepliesResponse.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.smartReplyAnswers != null && message.hasOwnProperty("smartReplyAnswers")) { + if (!Array.isArray(message.smartReplyAnswers)) + return "smartReplyAnswers: array expected"; + for (var i = 0; i < message.smartReplyAnswers.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify(message.smartReplyAnswers[i]); + if (error) + return "smartReplyAnswers." + error; + } + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates a GetParticipantRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestSmartRepliesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetParticipantRequest} GetParticipantRequest + * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse */ - GetParticipantRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest) + SuggestSmartRepliesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetParticipantRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse(); + if (object.smartReplyAnswers) { + if (!Array.isArray(object.smartReplyAnswers)) + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.smartReplyAnswers: array expected"); + message.smartReplyAnswers = []; + for (var i = 0; i < object.smartReplyAnswers.length; ++i) { + if (typeof object.smartReplyAnswers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.smartReplyAnswers: object expected"); + message.smartReplyAnswers[i] = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.fromObject(object.smartReplyAnswers[i]); + } + } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a GetParticipantRequest message. Also converts values to other types if specified. + * Creates a plain object from a SuggestSmartRepliesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.GetParticipantRequest} message GetParticipantRequest + * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} message SuggestSmartRepliesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetParticipantRequest.toObject = function toObject(message, options) { + SuggestSmartRepliesResponse.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.arrays || options.defaults) + object.smartReplyAnswers = []; + if (options.defaults) { + object.latestMessage = ""; + object.contextSize = 0; + } + if (message.smartReplyAnswers && message.smartReplyAnswers.length) { + object.smartReplyAnswers = []; + for (var j = 0; j < message.smartReplyAnswers.length; ++j) + object.smartReplyAnswers[j] = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.toObject(message.smartReplyAnswers[j], options); + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this GetParticipantRequest to JSON. + * Converts this SuggestSmartRepliesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetParticipantRequest + * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse * @instance * @returns {Object.} JSON object */ - GetParticipantRequest.prototype.toJSON = function toJSON() { + SuggestSmartRepliesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetParticipantRequest; + return SuggestSmartRepliesResponse; })(); - v2beta1.ListParticipantsRequest = (function() { + v2beta1.Suggestion = (function() { /** - * Properties of a ListParticipantsRequest. + * Properties of a Suggestion. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListParticipantsRequest - * @property {string|null} [parent] ListParticipantsRequest parent - * @property {number|null} [pageSize] ListParticipantsRequest pageSize - * @property {string|null} [pageToken] ListParticipantsRequest pageToken + * @interface ISuggestion + * @property {string|null} [name] Suggestion name + * @property {Array.|null} [articles] Suggestion articles + * @property {Array.|null} [faqAnswers] Suggestion faqAnswers + * @property {google.protobuf.ITimestamp|null} [createTime] Suggestion createTime + * @property {string|null} [latestMessage] Suggestion latestMessage */ /** - * Constructs a new ListParticipantsRequest. + * Constructs a new Suggestion. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListParticipantsRequest. - * @implements IListParticipantsRequest + * @classdesc Represents a Suggestion. + * @implements ISuggestion * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISuggestion=} [properties] Properties to set */ - function ListParticipantsRequest(properties) { + function Suggestion(properties) { + this.articles = []; + this.faqAnswers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -87135,101 +86401,133 @@ } /** - * ListParticipantsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * Suggestion name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @instance */ - ListParticipantsRequest.prototype.parent = ""; + Suggestion.prototype.name = ""; /** - * ListParticipantsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * Suggestion articles. + * @member {Array.} articles + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @instance */ - ListParticipantsRequest.prototype.pageSize = 0; + Suggestion.prototype.articles = $util.emptyArray; /** - * ListParticipantsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * Suggestion faqAnswers. + * @member {Array.} faqAnswers + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @instance */ - ListParticipantsRequest.prototype.pageToken = ""; + Suggestion.prototype.faqAnswers = $util.emptyArray; /** - * Creates a new ListParticipantsRequest instance using the specified properties. + * Suggestion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @instance + */ + Suggestion.prototype.createTime = null; + + /** + * Suggestion latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @instance + */ + Suggestion.prototype.latestMessage = ""; + + /** + * Creates a new Suggestion instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISuggestion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion instance */ - ListParticipantsRequest.create = function create(properties) { - return new ListParticipantsRequest(properties); + Suggestion.create = function create(properties) { + return new Suggestion(properties); }; /** - * Encodes the specified ListParticipantsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. + * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} message ListParticipantsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestion} message Suggestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListParticipantsRequest.encode = function encode(message, writer) { + Suggestion.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); + if (message.articles != null && message.articles.length) + for (var i = 0; i < message.articles.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.encode(message.articles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.faqAnswers != null && message.faqAnswers.length) + for (var i = 0; i < message.faqAnswers.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.encode(message.faqAnswers[i], 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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.latestMessage); return writer; }; /** - * Encodes the specified ListParticipantsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsRequest.verify|verify} messages. + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsRequest} message ListParticipantsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISuggestion} message Suggestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListParticipantsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Suggestion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListParticipantsRequest message from the specified reader or buffer. + * Decodes a Suggestion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest + * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListParticipantsRequest.decode = function decode(reader, length) { + Suggestion.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.v2beta1.ListParticipantsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Suggestion(); 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.pageSize = reader.int32(); + if (!(message.articles && message.articles.length)) + message.articles = []; + message.articles.push($root.google.cloud.dialogflow.v2beta1.Suggestion.Article.decode(reader, reader.uint32())); break; - case 3: - message.pageToken = reader.string(); + case 4: + if (!(message.faqAnswers && message.faqAnswers.length)) + message.faqAnswers = []; + message.faqAnswers.push($root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.decode(reader, reader.uint32())); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.latestMessage = reader.string(); break; default: reader.skipType(tag & 7); @@ -87240,665 +86538,962 @@ }; /** - * Decodes a ListParticipantsRequest message from the specified reader or buffer, length delimited. + * Decodes a Suggestion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest + * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListParticipantsRequest.decodeDelimited = function decodeDelimited(reader) { + Suggestion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListParticipantsRequest message. + * Verifies a Suggestion message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListParticipantsRequest.verify = function verify(message) { + Suggestion.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 ListParticipantsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} ListParticipantsRequest - */ - ListParticipantsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsRequest(); - 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 ListParticipantsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ListParticipantsRequest} message ListParticipantsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListParticipantsRequest.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 ListParticipantsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsRequest - * @instance - * @returns {Object.} JSON object - */ - ListParticipantsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListParticipantsRequest; - })(); - - v2beta1.ListParticipantsResponse = (function() { - - /** - * Properties of a ListParticipantsResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListParticipantsResponse - * @property {Array.|null} [participants] ListParticipantsResponse participants - * @property {string|null} [nextPageToken] ListParticipantsResponse nextPageToken - */ - - /** - * Constructs a new ListParticipantsResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListParticipantsResponse. - * @implements IListParticipantsResponse - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse=} [properties] Properties to set - */ - function ListParticipantsResponse(properties) { - this.participants = []; - 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]]; - } - - /** - * ListParticipantsResponse participants. - * @member {Array.} participants - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @instance - */ - ListParticipantsResponse.prototype.participants = $util.emptyArray; - - /** - * ListParticipantsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @instance - */ - ListParticipantsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListParticipantsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse instance - */ - ListParticipantsResponse.create = function create(properties) { - return new ListParticipantsResponse(properties); - }; - - /** - * Encodes the specified ListParticipantsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse} message ListParticipantsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListParticipantsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.participants != null && message.participants.length) - for (var i = 0; i < message.participants.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participants[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 ListParticipantsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListParticipantsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListParticipantsResponse} message ListParticipantsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListParticipantsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListParticipantsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListParticipantsResponse.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.v2beta1.ListParticipantsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.articles != null && message.hasOwnProperty("articles")) { + if (!Array.isArray(message.articles)) + return "articles: array expected"; + for (var i = 0; i < message.articles.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.verify(message.articles[i]); + if (error) + return "articles." + error; } } - return message; - }; - - /** - * Decodes a ListParticipantsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListParticipantsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListParticipantsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListParticipantsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.participants != null && message.hasOwnProperty("participants")) { - if (!Array.isArray(message.participants)) - return "participants: array expected"; - for (var i = 0; i < message.participants.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participants[i]); + if (message.faqAnswers != null && message.hasOwnProperty("faqAnswers")) { + if (!Array.isArray(message.faqAnswers)) + return "faqAnswers: array expected"; + for (var i = 0; i < message.faqAnswers.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify(message.faqAnswers[i]); if (error) - return "participants." + error; + return "faqAnswers." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; return null; }; /** - * Creates a ListParticipantsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} ListParticipantsResponse + * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion */ - ListParticipantsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse) + Suggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListParticipantsResponse(); - if (object.participants) { - if (!Array.isArray(object.participants)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListParticipantsResponse.participants: array expected"); - message.participants = []; - for (var i = 0; i < object.participants.length; ++i) { - if (typeof object.participants[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListParticipantsResponse.participants: object expected"); - message.participants[i] = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participants[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion(); + if (object.name != null) + message.name = String(object.name); + if (object.articles) { + if (!Array.isArray(object.articles)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.articles: array expected"); + message.articles = []; + for (var i = 0; i < object.articles.length; ++i) { + if (typeof object.articles[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.articles: object expected"); + message.articles[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.fromObject(object.articles[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.faqAnswers) { + if (!Array.isArray(object.faqAnswers)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.faqAnswers: array expected"); + message.faqAnswers = []; + for (var i = 0; i < object.faqAnswers.length; ++i) { + if (typeof object.faqAnswers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.faqAnswers: object expected"); + message.faqAnswers[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.fromObject(object.faqAnswers[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); return message; }; /** - * Creates a plain object from a ListParticipantsResponse message. Also converts values to other types if specified. + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @static - * @param {google.cloud.dialogflow.v2beta1.ListParticipantsResponse} message ListParticipantsResponse + * @param {google.cloud.dialogflow.v2beta1.Suggestion} message Suggestion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListParticipantsResponse.toObject = function toObject(message, options) { + Suggestion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.participants = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.participants && message.participants.length) { - object.participants = []; - for (var j = 0; j < message.participants.length; ++j) - object.participants[j] = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participants[j], options); + if (options.arrays || options.defaults) { + object.articles = []; + object.faqAnswers = []; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.latestMessage = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.articles && message.articles.length) { + object.articles = []; + for (var j = 0; j < message.articles.length; ++j) + object.articles[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.toObject(message.articles[j], options); + } + if (message.faqAnswers && message.faqAnswers.length) { + object.faqAnswers = []; + for (var j = 0; j < message.faqAnswers.length; ++j) + object.faqAnswers[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.toObject(message.faqAnswers[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; return object; }; /** - * Converts this ListParticipantsResponse to JSON. + * Converts this Suggestion to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListParticipantsResponse + * @memberof google.cloud.dialogflow.v2beta1.Suggestion * @instance * @returns {Object.} JSON object */ - ListParticipantsResponse.prototype.toJSON = function toJSON() { + Suggestion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListParticipantsResponse; - })(); + Suggestion.Article = (function() { - v2beta1.UpdateParticipantRequest = (function() { + /** + * Properties of an Article. + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @interface IArticle + * @property {string|null} [title] Article title + * @property {string|null} [uri] Article uri + * @property {Array.|null} [snippets] Article snippets + * @property {Object.|null} [metadata] Article metadata + * @property {string|null} [answerRecord] Article answerRecord + */ - /** - * Properties of an UpdateParticipantRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateParticipantRequest - * @property {google.cloud.dialogflow.v2beta1.IParticipant|null} [participant] UpdateParticipantRequest participant - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateParticipantRequest updateMask - */ + /** + * Constructs a new Article. + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @classdesc Represents an Article. + * @implements IArticle + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle=} [properties] Properties to set + */ + function Article(properties) { + this.snippets = []; + this.metadata = {}; + 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 UpdateParticipantRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateParticipantRequest. - * @implements IUpdateParticipantRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest=} [properties] Properties to set - */ - function UpdateParticipantRequest(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]]; - } + /** + * Article title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + */ + Article.prototype.title = ""; - /** - * UpdateParticipantRequest participant. - * @member {google.cloud.dialogflow.v2beta1.IParticipant|null|undefined} participant - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @instance - */ - UpdateParticipantRequest.prototype.participant = null; + /** + * Article uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + */ + Article.prototype.uri = ""; - /** - * UpdateParticipantRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @instance - */ - UpdateParticipantRequest.prototype.updateMask = null; + /** + * Article snippets. + * @member {Array.} snippets + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + */ + Article.prototype.snippets = $util.emptyArray; - /** - * Creates a new UpdateParticipantRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest instance - */ - UpdateParticipantRequest.create = function create(properties) { - return new UpdateParticipantRequest(properties); - }; + /** + * Article metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + */ + Article.prototype.metadata = $util.emptyObject; - /** - * Encodes the specified UpdateParticipantRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} message UpdateParticipantRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateParticipantRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - $root.google.cloud.dialogflow.v2beta1.Participant.encode(message.participant, 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; - }; + /** + * Article answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + */ + Article.prototype.answerRecord = ""; - /** - * Encodes the specified UpdateParticipantRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateParticipantRequest} message UpdateParticipantRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateParticipantRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Article instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article instance + */ + Article.create = function create(properties) { + return new Article(properties); + }; - /** - * Decodes an UpdateParticipantRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateParticipantRequest.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.v2beta1.UpdateParticipantRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified Article message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle} message Article message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Article.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.snippets != null && message.snippets.length) + for (var i = 0; i < message.snippets.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snippets[i]); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); + return writer; + }; + + /** + * Encodes the specified Article message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle} message Article message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Article.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Article message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Article.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.v2beta1.Suggestion.Article(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + case 3: + if (!(message.snippets && message.snippets.length)) + message.snippets = []; + message.snippets.push(reader.string()); + break; + case 5: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + case 6: + message.answerRecord = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes an UpdateParticipantRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateParticipantRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Article message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Article.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateParticipantRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateParticipantRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.participant != null && message.hasOwnProperty("participant")) { - var error = $root.google.cloud.dialogflow.v2beta1.Participant.verify(message.participant); - if (error) - return "participant." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + /** + * Verifies an Article message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Article.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.snippets != null && message.hasOwnProperty("snippets")) { + if (!Array.isArray(message.snippets)) + return "snippets: array expected"; + for (var i = 0; i < message.snippets.length; ++i) + if (!$util.isString(message.snippets[i])) + return "snippets: string[] expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; + return null; + }; - /** - * Creates an UpdateParticipantRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} UpdateParticipantRequest - */ - UpdateParticipantRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest) + /** + * Creates an Article message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article + */ + Article.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion.Article) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion.Article(); + if (object.title != null) + message.title = String(object.title); + if (object.uri != null) + message.uri = String(object.uri); + if (object.snippets) { + if (!Array.isArray(object.snippets)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.Article.snippets: array expected"); + message.snippets = []; + for (var i = 0; i < object.snippets.length; ++i) + message.snippets[i] = String(object.snippets[i]); + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.Article.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); + return message; + }; + + /** + * Creates a plain object from an Article message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.Article} message Article + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Article.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.snippets = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.title = ""; + object.uri = ""; + object.answerRecord = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.snippets && message.snippets.length) { + object.snippets = []; + for (var j = 0; j < message.snippets.length; ++j) + object.snippets[j] = message.snippets[j]; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateParticipantRequest(); - if (object.participant != null) { - if (typeof object.participant !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.participant: object expected"); - message.participant = $root.google.cloud.dialogflow.v2beta1.Participant.fromObject(object.participant); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateParticipantRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateParticipantRequest} message UpdateParticipantRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateParticipantRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.participant = null; - object.updateMask = null; - } - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = $root.google.cloud.dialogflow.v2beta1.Participant.toObject(message.participant, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this Article to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article + * @instance + * @returns {Object.} JSON object + */ + Article.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateParticipantRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateParticipantRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateParticipantRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Article; + })(); - return UpdateParticipantRequest; - })(); + Suggestion.FaqAnswer = (function() { - v2beta1.OutputAudio = (function() { + /** + * Properties of a FaqAnswer. + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @interface IFaqAnswer + * @property {string|null} [answer] FaqAnswer answer + * @property {number|null} [confidence] FaqAnswer confidence + * @property {string|null} [question] FaqAnswer question + * @property {string|null} [source] FaqAnswer source + * @property {Object.|null} [metadata] FaqAnswer metadata + * @property {string|null} [answerRecord] FaqAnswer answerRecord + */ - /** - * Properties of an OutputAudio. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IOutputAudio - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [config] OutputAudio config - * @property {Uint8Array|null} [audio] OutputAudio audio - */ + /** + * Constructs a new FaqAnswer. + * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @classdesc Represents a FaqAnswer. + * @implements IFaqAnswer + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer=} [properties] Properties to set + */ + function FaqAnswer(properties) { + this.metadata = {}; + 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 OutputAudio. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an OutputAudio. - * @implements IOutputAudio - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IOutputAudio=} [properties] Properties to set - */ - function OutputAudio(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]]; - } + /** + * FaqAnswer answer. + * @member {string} answer + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.answer = ""; - /** - * OutputAudio config. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} config - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @instance - */ - OutputAudio.prototype.config = null; + /** + * FaqAnswer confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.confidence = 0; - /** - * OutputAudio audio. - * @member {Uint8Array} audio - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @instance - */ - OutputAudio.prototype.audio = $util.newBuffer([]); + /** + * FaqAnswer question. + * @member {string} question + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.question = ""; - /** - * Creates a new OutputAudio instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio instance - */ - OutputAudio.create = function create(properties) { - return new OutputAudio(properties); - }; + /** + * FaqAnswer source. + * @member {string} source + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.source = ""; - /** - * Encodes the specified OutputAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudio} message OutputAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudio.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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; - }; + /** + * FaqAnswer metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.metadata = $util.emptyObject; - /** - * Encodes the specified OutputAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudio.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @static - * @param {google.cloud.dialogflow.v2beta1.IOutputAudio} message OutputAudio message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OutputAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FaqAnswer answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + */ + FaqAnswer.prototype.answerRecord = ""; - /** - * Decodes an OutputAudio message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OutputAudio.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.v2beta1.OutputAudio(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); - break; - case 2: - message.audio = reader.bytes(); + /** + * Creates a new FaqAnswer instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer instance + */ + FaqAnswer.create = function create(properties) { + return new FaqAnswer(properties); + }; + + /** + * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer} message FaqAnswer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FaqAnswer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.source); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); + return writer; + }; + + /** + * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer} message FaqAnswer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FaqAnswer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FaqAnswer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FaqAnswer.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.v2beta1.Suggestion.FaqAnswer(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.answer = reader.string(); + break; + case 2: + message.confidence = reader.float(); + break; + case 3: + message.question = reader.string(); + break; + case 4: + message.source = reader.string(); + break; + case 5: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + case 6: + message.answerRecord = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FaqAnswer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FaqAnswer message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FaqAnswer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.answer != null && message.hasOwnProperty("answer")) + if (!$util.isString(message.answer)) + return "answer: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; + return null; + }; + + /** + * Creates a FaqAnswer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer + */ + FaqAnswer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer(); + if (object.answer != null) + message.answer = String(object.answer); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.question != null) + message.question = String(object.question); + if (object.source != null) + message.source = String(object.source); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); + return message; + }; + + /** + * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @static + * @param {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} message FaqAnswer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FaqAnswer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.answer = ""; + object.confidence = 0; + object.question = ""; + object.source = ""; + object.answerRecord = ""; + } + if (message.answer != null && message.hasOwnProperty("answer")) + object.answer = message.answer; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; + return object; + }; + + /** + * Converts this FaqAnswer to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer + * @instance + * @returns {Object.} JSON object + */ + FaqAnswer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FaqAnswer; + })(); + + return Suggestion; + })(); + + v2beta1.ListSuggestionsRequest = (function() { + + /** + * Properties of a ListSuggestionsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListSuggestionsRequest + * @property {string|null} [parent] ListSuggestionsRequest parent + * @property {number|null} [pageSize] ListSuggestionsRequest pageSize + * @property {string|null} [pageToken] ListSuggestionsRequest pageToken + * @property {string|null} [filter] ListSuggestionsRequest filter + */ + + /** + * Constructs a new ListSuggestionsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListSuggestionsRequest. + * @implements IListSuggestionsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest=} [properties] Properties to set + */ + function ListSuggestionsRequest(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]]; + } + + /** + * ListSuggestionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @instance + */ + ListSuggestionsRequest.prototype.parent = ""; + + /** + * ListSuggestionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @instance + */ + ListSuggestionsRequest.prototype.pageSize = 0; + + /** + * ListSuggestionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @instance + */ + ListSuggestionsRequest.prototype.pageToken = ""; + + /** + * ListSuggestionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @instance + */ + ListSuggestionsRequest.prototype.filter = ""; + + /** + * Creates a new ListSuggestionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest instance + */ + ListSuggestionsRequest.create = function create(properties) { + return new ListSuggestionsRequest(properties); + }; + + /** + * Encodes the specified ListSuggestionsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} message ListSuggestionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSuggestionsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} message ListSuggestionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSuggestionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSuggestionsRequest.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.v2beta1.ListSuggestionsRequest(); + 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.filter = reader.string(); break; default: reader.skipType(tag & 7); @@ -87909,139 +87504,134 @@ }; /** - * Decodes an OutputAudio message from the specified reader or buffer, length delimited. + * Decodes a ListSuggestionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OutputAudio.decodeDelimited = function decodeDelimited(reader) { + ListSuggestionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OutputAudio message. + * Verifies a ListSuggestionsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OutputAudio.verify = function verify(message) { + ListSuggestionsRequest.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.v2beta1.OutputAudioConfig.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.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates an OutputAudio message from a plain object. Also converts values to their respective internal types. + * Creates a ListSuggestionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.OutputAudio} OutputAudio + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest */ - OutputAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.OutputAudio) + ListSuggestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.OutputAudio(); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.OutputAudio.config: object expected"); - message.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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.v2beta1.ListSuggestionsRequest(); + 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.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from an OutputAudio message. Also converts values to other types if specified. + * Creates a plain object from a ListSuggestionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.OutputAudio} message OutputAudio + * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} message ListSuggestionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputAudio.toObject = function toObject(message, options) { + ListSuggestionsRequest.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); - } + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.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 (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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this OutputAudio to JSON. + * Converts this ListSuggestionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.OutputAudio + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest * @instance * @returns {Object.} JSON object */ - OutputAudio.prototype.toJSON = function toJSON() { + ListSuggestionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OutputAudio; + return ListSuggestionsRequest; })(); - v2beta1.AutomatedAgentReply = (function() { + v2beta1.ListSuggestionsResponse = (function() { /** - * Properties of an AutomatedAgentReply. + * Properties of a ListSuggestionsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAutomatedAgentReply - * @property {google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null} [detectIntentResponse] AutomatedAgentReply detectIntentResponse - * @property {Array.|null} [responseMessages] AutomatedAgentReply responseMessages - * @property {string|null} [intent] AutomatedAgentReply intent - * @property {string|null} [event] AutomatedAgentReply event - * @property {number|null} [matchConfidence] AutomatedAgentReply matchConfidence - * @property {google.protobuf.IStruct|null} [parameters] AutomatedAgentReply parameters - * @property {google.protobuf.IStruct|null} [cxSessionParameters] AutomatedAgentReply cxSessionParameters - * @property {google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType|null} [automatedAgentReplyType] AutomatedAgentReply automatedAgentReplyType - * @property {boolean|null} [allowCancellation] AutomatedAgentReply allowCancellation + * @interface IListSuggestionsResponse + * @property {Array.|null} [suggestions] ListSuggestionsResponse suggestions + * @property {string|null} [nextPageToken] ListSuggestionsResponse nextPageToken */ /** - * Constructs a new AutomatedAgentReply. + * Constructs a new ListSuggestionsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AutomatedAgentReply. - * @implements IAutomatedAgentReply + * @classdesc Represents a ListSuggestionsResponse. + * @implements IListSuggestionsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse=} [properties] Properties to set */ - function AutomatedAgentReply(properties) { - this.responseMessages = []; + function ListSuggestionsResponse(properties) { + this.suggestions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88049,207 +87639,91 @@ } /** - * AutomatedAgentReply detectIntentResponse. - * @member {google.cloud.dialogflow.v2beta1.IDetectIntentResponse|null|undefined} detectIntentResponse - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.detectIntentResponse = null; - - /** - * AutomatedAgentReply responseMessages. - * @member {Array.} responseMessages - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.responseMessages = $util.emptyArray; - - /** - * AutomatedAgentReply intent. - * @member {string|null|undefined} intent - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.intent = null; - - /** - * AutomatedAgentReply event. - * @member {string|null|undefined} event - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.event = null; - - /** - * AutomatedAgentReply matchConfidence. - * @member {number} matchConfidence - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.matchConfidence = 0; - - /** - * AutomatedAgentReply parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.parameters = null; - - /** - * AutomatedAgentReply cxSessionParameters. - * @member {google.protobuf.IStruct|null|undefined} cxSessionParameters - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.cxSessionParameters = null; - - /** - * AutomatedAgentReply automatedAgentReplyType. - * @member {google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType} automatedAgentReplyType - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.automatedAgentReplyType = 0; - - /** - * AutomatedAgentReply allowCancellation. - * @member {boolean} allowCancellation - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply - * @instance - */ - AutomatedAgentReply.prototype.allowCancellation = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AutomatedAgentReply response. - * @member {"detectIntentResponse"|undefined} response - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * ListSuggestionsResponse suggestions. + * @member {Array.} suggestions + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @instance */ - Object.defineProperty(AutomatedAgentReply.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["detectIntentResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListSuggestionsResponse.prototype.suggestions = $util.emptyArray; /** - * AutomatedAgentReply match. - * @member {"intent"|"event"|undefined} match - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * ListSuggestionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @instance */ - Object.defineProperty(AutomatedAgentReply.prototype, "match", { - get: $util.oneOfGetter($oneOfFields = ["intent", "event"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListSuggestionsResponse.prototype.nextPageToken = ""; /** - * Creates a new AutomatedAgentReply instance using the specified properties. + * Creates a new ListSuggestionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply instance + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse instance */ - AutomatedAgentReply.create = function create(properties) { - return new AutomatedAgentReply(properties); + ListSuggestionsResponse.create = function create(properties) { + return new ListSuggestionsResponse(properties); }; /** - * Encodes the specified AutomatedAgentReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. + * Encodes the specified ListSuggestionsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply} message AutomatedAgentReply message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse} message ListSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentReply.encode = function encode(message, writer) { + ListSuggestionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) - $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.responseMessages != null && message.responseMessages.length) - for (var i = 0; i < message.responseMessages.length; ++i) - $root.google.cloud.dialogflow.v2beta1.ResponseMessage.encode(message.responseMessages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.intent); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.event); - if (message.cxSessionParameters != null && Object.hasOwnProperty.call(message, "cxSessionParameters")) - $root.google.protobuf.Struct.encode(message.cxSessionParameters, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.automatedAgentReplyType != null && Object.hasOwnProperty.call(message, "automatedAgentReplyType")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.automatedAgentReplyType); - if (message.allowCancellation != null && Object.hasOwnProperty.call(message, "allowCancellation")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.allowCancellation); - if (message.matchConfidence != null && Object.hasOwnProperty.call(message, "matchConfidence")) - writer.uint32(/* id 9, wireType 5 =*/77).float(message.matchConfidence); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Suggestion.encode(message.suggestions[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 AutomatedAgentReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify|verify} messages. + * Encodes the specified ListSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply} message AutomatedAgentReply message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse} message ListSuggestionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentReply.encodeDelimited = function encodeDelimited(message, writer) { + ListSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutomatedAgentReply message from the specified reader or buffer. + * Decodes a ListSuggestionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentReply.decode = function decode(reader, length) { + ListSuggestionsResponse.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.v2beta1.AutomatedAgentReply(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.responseMessages && message.responseMessages.length)) - message.responseMessages = []; - message.responseMessages.push($root.google.cloud.dialogflow.v2beta1.ResponseMessage.decode(reader, reader.uint32())); - break; - case 4: - message.intent = reader.string(); - break; - case 5: - message.event = reader.string(); - break; - case 9: - message.matchConfidence = reader.float(); - break; - case 10: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 6: - message.cxSessionParameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 7: - message.automatedAgentReplyType = reader.int32(); + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Suggestion.decode(reader, reader.uint32())); break; - case 8: - message.allowCancellation = reader.bool(); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -88260,255 +87734,135 @@ }; /** - * Decodes an AutomatedAgentReply message from the specified reader or buffer, length delimited. + * Decodes a ListSuggestionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentReply.decodeDelimited = function decodeDelimited(reader) { + ListSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutomatedAgentReply message. + * Verifies a ListSuggestionsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutomatedAgentReply.verify = function verify(message) { + ListSuggestionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - properties.response = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify(message.detectIntentResponse); - if (error) - return "detectIntentResponse." + 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.v2beta1.ResponseMessage.verify(message.responseMessages[i]); + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.verify(message.suggestions[i]); if (error) - return "responseMessages." + error; + return "suggestions." + error; } } - if (message.intent != null && message.hasOwnProperty("intent")) { - properties.match = 1; - if (!$util.isString(message.intent)) - return "intent: string expected"; - } - if (message.event != null && message.hasOwnProperty("event")) { - if (properties.match === 1) - return "match: multiple values"; - properties.match = 1; - if (!$util.isString(message.event)) - return "event: string expected"; - } - if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) - if (typeof message.matchConfidence !== "number") - return "matchConfidence: number expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - if (message.cxSessionParameters != null && message.hasOwnProperty("cxSessionParameters")) { - var error = $root.google.protobuf.Struct.verify(message.cxSessionParameters); - if (error) - return "cxSessionParameters." + error; - } - if (message.automatedAgentReplyType != null && message.hasOwnProperty("automatedAgentReplyType")) - switch (message.automatedAgentReplyType) { - default: - return "automatedAgentReplyType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) - if (typeof message.allowCancellation !== "boolean") - return "allowCancellation: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an AutomatedAgentReply message from a plain object. Also converts values to their respective internal types. + * Creates a ListSuggestionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} AutomatedAgentReply + * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse */ - AutomatedAgentReply.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply) + ListSuggestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply(); - if (object.detectIntentResponse != null) { - if (typeof object.detectIntentResponse !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.detectIntentResponse: object expected"); - message.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.fromObject(object.detectIntentResponse); - } - if (object.responseMessages) { - if (!Array.isArray(object.responseMessages)) - throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.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.v2beta1.AutomatedAgentReply.responseMessages: object expected"); - message.responseMessages[i] = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.fromObject(object.responseMessages[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.suggestions: object expected"); + message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.fromObject(object.suggestions[i]); } } - if (object.intent != null) - message.intent = String(object.intent); - if (object.event != null) - message.event = String(object.event); - if (object.matchConfidence != null) - message.matchConfidence = Number(object.matchConfidence); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.cxSessionParameters != null) { - if (typeof object.cxSessionParameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AutomatedAgentReply.cxSessionParameters: object expected"); - message.cxSessionParameters = $root.google.protobuf.Struct.fromObject(object.cxSessionParameters); - } - switch (object.automatedAgentReplyType) { - case "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": - case 0: - message.automatedAgentReplyType = 0; - break; - case "PARTIAL": - case 1: - message.automatedAgentReplyType = 1; - break; - case "FINAL": - case 2: - message.automatedAgentReplyType = 2; - break; - } - if (object.allowCancellation != null) - message.allowCancellation = Boolean(object.allowCancellation); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an AutomatedAgentReply message. Also converts values to other types if specified. + * Creates a plain object from a ListSuggestionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.AutomatedAgentReply} message AutomatedAgentReply + * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} message ListSuggestionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomatedAgentReply.toObject = function toObject(message, options) { + ListSuggestionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.responseMessages = []; - if (options.defaults) { - object.cxSessionParameters = null; - object.automatedAgentReplyType = options.enums === String ? "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED" : 0; - object.allowCancellation = false; - object.matchConfidence = 0; - object.parameters = null; - } - if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) { - object.detectIntentResponse = $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse.toObject(message.detectIntentResponse, options); - if (options.oneofs) - object.response = "detectIntentResponse"; - } - if (message.responseMessages && message.responseMessages.length) { - object.responseMessages = []; - for (var j = 0; j < message.responseMessages.length; ++j) - object.responseMessages[j] = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.toObject(message.responseMessages[j], options); - } - if (message.intent != null && message.hasOwnProperty("intent")) { - object.intent = message.intent; - if (options.oneofs) - object.match = "intent"; - } - if (message.event != null && message.hasOwnProperty("event")) { - object.event = message.event; - if (options.oneofs) - object.match = "event"; + object.suggestions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.toObject(message.suggestions[j], options); } - if (message.cxSessionParameters != null && message.hasOwnProperty("cxSessionParameters")) - object.cxSessionParameters = $root.google.protobuf.Struct.toObject(message.cxSessionParameters, options); - if (message.automatedAgentReplyType != null && message.hasOwnProperty("automatedAgentReplyType")) - object.automatedAgentReplyType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] : message.automatedAgentReplyType; - if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) - object.allowCancellation = message.allowCancellation; - if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) - object.matchConfidence = options.json && !isFinite(message.matchConfidence) ? String(message.matchConfidence) : message.matchConfidence; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this AutomatedAgentReply to JSON. + * Converts this ListSuggestionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentReply + * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse * @instance * @returns {Object.} JSON object */ - AutomatedAgentReply.prototype.toJSON = function toJSON() { + ListSuggestionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * AutomatedAgentReplyType enum. - * @name google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType - * @enum {number} - * @property {number} AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED=0 AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED value - * @property {number} PARTIAL=1 PARTIAL value - * @property {number} FINAL=2 FINAL value - */ - AutomatedAgentReply.AutomatedAgentReplyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PARTIAL"] = 1; - values[valuesById[2] = "FINAL"] = 2; - return values; - })(); - - return AutomatedAgentReply; + return ListSuggestionsResponse; })(); - v2beta1.SuggestionFeature = (function() { + v2beta1.CompileSuggestionRequest = (function() { /** - * Properties of a SuggestionFeature. + * Properties of a CompileSuggestionRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestionFeature - * @property {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null} [type] SuggestionFeature type + * @interface ICompileSuggestionRequest + * @property {string|null} [parent] CompileSuggestionRequest parent + * @property {string|null} [latestMessage] CompileSuggestionRequest latestMessage + * @property {number|null} [contextSize] CompileSuggestionRequest contextSize */ /** - * Constructs a new SuggestionFeature. + * Constructs a new CompileSuggestionRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestionFeature. - * @implements ISuggestionFeature + * @classdesc Represents a CompileSuggestionRequest. + * @implements ICompileSuggestionRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest=} [properties] Properties to set */ - function SuggestionFeature(properties) { + function CompileSuggestionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88516,75 +87870,101 @@ } /** - * SuggestionFeature type. - * @member {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} type - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * CompileSuggestionRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @instance */ - SuggestionFeature.prototype.type = 0; + CompileSuggestionRequest.prototype.parent = ""; /** - * Creates a new SuggestionFeature instance using the specified properties. + * CompileSuggestionRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @instance + */ + CompileSuggestionRequest.prototype.latestMessage = ""; + + /** + * CompileSuggestionRequest contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @instance + */ + CompileSuggestionRequest.prototype.contextSize = 0; + + /** + * Creates a new CompileSuggestionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature instance + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest instance */ - SuggestionFeature.create = function create(properties) { - return new SuggestionFeature(properties); + CompileSuggestionRequest.create = function create(properties) { + return new CompileSuggestionRequest(properties); }; /** - * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. + * Encodes the specified CompileSuggestionRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature} message SuggestionFeature message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} message CompileSuggestionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionFeature.encode = function encode(message, writer) { + CompileSuggestionRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); return writer; }; /** - * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionFeature.verify|verify} messages. + * Encodes the specified CompileSuggestionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionFeature} message SuggestionFeature message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} message CompileSuggestionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionFeature.encodeDelimited = function encodeDelimited(message, writer) { + CompileSuggestionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionFeature message from the specified reader or buffer. + * Decodes a CompileSuggestionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionFeature.decode = function decode(reader, length) { + CompileSuggestionRequest.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.v2beta1.SuggestionFeature(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.int32(); + message.parent = reader.string(); + break; + case 2: + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -88595,149 +87975,126 @@ }; /** - * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. + * Decodes a CompileSuggestionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionFeature.decodeDelimited = function decodeDelimited(reader) { + CompileSuggestionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionFeature message. + * Verifies a CompileSuggestionRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionFeature.verify = function verify(message) { + CompileSuggestionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: 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.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. + * Creates a CompileSuggestionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest */ - SuggestionFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestionFeature) + CompileSuggestionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestionFeature(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ARTICLE_SUGGESTION": - case 1: - message.type = 1; - break; - case "FAQ": - case 2: - message.type = 2; - break; - case "SMART_REPLY": - case 3: - message.type = 3; - break; - } + var message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. + * Creates a plain object from a CompileSuggestionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestionFeature} message SuggestionFeature + * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} message CompileSuggestionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionFeature.toObject = function toObject(message, options) { + CompileSuggestionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.type] : message.type; + if (options.defaults) { + object.parent = ""; + object.latestMessage = ""; + object.contextSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this SuggestionFeature to JSON. + * Converts this CompileSuggestionRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest * @instance * @returns {Object.} JSON object */ - SuggestionFeature.prototype.toJSON = function toJSON() { + CompileSuggestionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Type enum. - * @name google.cloud.dialogflow.v2beta1.SuggestionFeature.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ARTICLE_SUGGESTION=1 ARTICLE_SUGGESTION value - * @property {number} FAQ=2 FAQ value - * @property {number} SMART_REPLY=3 SMART_REPLY value - */ - SuggestionFeature.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ARTICLE_SUGGESTION"] = 1; - values[valuesById[2] = "FAQ"] = 2; - values[valuesById[3] = "SMART_REPLY"] = 3; - return values; - })(); - - return SuggestionFeature; + return CompileSuggestionRequest; })(); - v2beta1.AssistQueryParameters = (function() { + v2beta1.CompileSuggestionResponse = (function() { /** - * Properties of an AssistQueryParameters. + * Properties of a CompileSuggestionResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAssistQueryParameters - * @property {Object.|null} [documentsMetadataFilters] AssistQueryParameters documentsMetadataFilters + * @interface ICompileSuggestionResponse + * @property {google.cloud.dialogflow.v2beta1.ISuggestion|null} [suggestion] CompileSuggestionResponse suggestion + * @property {string|null} [latestMessage] CompileSuggestionResponse latestMessage + * @property {number|null} [contextSize] CompileSuggestionResponse contextSize */ /** - * Constructs a new AssistQueryParameters. + * Constructs a new CompileSuggestionResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AssistQueryParameters. - * @implements IAssistQueryParameters + * @classdesc Represents a CompileSuggestionResponse. + * @implements ICompileSuggestionResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse=} [properties] Properties to set */ - function AssistQueryParameters(properties) { - this.documentsMetadataFilters = {}; + function CompileSuggestionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88745,95 +88102,101 @@ } /** - * AssistQueryParameters documentsMetadataFilters. - * @member {Object.} documentsMetadataFilters - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * CompileSuggestionResponse suggestion. + * @member {google.cloud.dialogflow.v2beta1.ISuggestion|null|undefined} suggestion + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @instance */ - AssistQueryParameters.prototype.documentsMetadataFilters = $util.emptyObject; + CompileSuggestionResponse.prototype.suggestion = null; /** - * Creates a new AssistQueryParameters instance using the specified properties. + * CompileSuggestionResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @instance + */ + CompileSuggestionResponse.prototype.latestMessage = ""; + + /** + * CompileSuggestionResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @instance + */ + CompileSuggestionResponse.prototype.contextSize = 0; + + /** + * Creates a new CompileSuggestionResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters instance + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse instance */ - AssistQueryParameters.create = function create(properties) { - return new AssistQueryParameters(properties); + CompileSuggestionResponse.create = function create(properties) { + return new CompileSuggestionResponse(properties); }; /** - * Encodes the specified AssistQueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. + * Encodes the specified CompileSuggestionResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters} message AssistQueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse} message CompileSuggestionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssistQueryParameters.encode = function encode(message, writer) { + CompileSuggestionResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documentsMetadataFilters != null && Object.hasOwnProperty.call(message, "documentsMetadataFilters")) - for (var keys = Object.keys(message.documentsMetadataFilters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.documentsMetadataFilters[keys[i]]).ldelim(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + $root.google.cloud.dialogflow.v2beta1.Suggestion.encode(message.suggestion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); return writer; }; /** - * Encodes the specified AssistQueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify|verify} messages. + * Encodes the specified CompileSuggestionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IAssistQueryParameters} message AssistQueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse} message CompileSuggestionResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AssistQueryParameters.encodeDelimited = function encodeDelimited(message, writer) { + CompileSuggestionResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AssistQueryParameters message from the specified reader or buffer. + * Decodes a CompileSuggestionResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssistQueryParameters.decode = function decode(reader, length) { + CompileSuggestionResponse.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.v2beta1.AssistQueryParameters(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (message.documentsMetadataFilters === $util.emptyObject) - message.documentsMetadataFilters = {}; - 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.documentsMetadataFilters[key] = value; + message.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.decode(reader, reader.uint32()); + break; + case 2: + message.latestMessage = reader.string(); + break; + case 3: + message.contextSize = reader.int32(); break; default: reader.skipType(tag & 7); @@ -88844,128 +88207,133 @@ }; /** - * Decodes an AssistQueryParameters message from the specified reader or buffer, length delimited. + * Decodes a CompileSuggestionResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AssistQueryParameters.decodeDelimited = function decodeDelimited(reader) { + CompileSuggestionResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AssistQueryParameters message. + * Verifies a CompileSuggestionResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AssistQueryParameters.verify = function verify(message) { + CompileSuggestionResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.documentsMetadataFilters != null && message.hasOwnProperty("documentsMetadataFilters")) { - if (!$util.isObject(message.documentsMetadataFilters)) - return "documentsMetadataFilters: object expected"; - var key = Object.keys(message.documentsMetadataFilters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.documentsMetadataFilters[key[i]])) - return "documentsMetadataFilters: string{k:string} expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) { + var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.verify(message.suggestion); + if (error) + return "suggestion." + error; } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates an AssistQueryParameters message from a plain object. Also converts values to their respective internal types. + * Creates a CompileSuggestionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AssistQueryParameters} AssistQueryParameters + * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse */ - AssistQueryParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters) + CompileSuggestionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters(); - if (object.documentsMetadataFilters) { - if (typeof object.documentsMetadataFilters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AssistQueryParameters.documentsMetadataFilters: object expected"); - message.documentsMetadataFilters = {}; - for (var keys = Object.keys(object.documentsMetadataFilters), i = 0; i < keys.length; ++i) - message.documentsMetadataFilters[keys[i]] = String(object.documentsMetadataFilters[keys[i]]); + var message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse(); + if (object.suggestion != null) { + if (typeof object.suggestion !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.suggestion: object expected"); + message.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.fromObject(object.suggestion); } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from an AssistQueryParameters message. Also converts values to other types if specified. + * Creates a plain object from a CompileSuggestionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @static - * @param {google.cloud.dialogflow.v2beta1.AssistQueryParameters} message AssistQueryParameters + * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} message CompileSuggestionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AssistQueryParameters.toObject = function toObject(message, options) { + CompileSuggestionResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.documentsMetadataFilters = {}; - var keys2; - if (message.documentsMetadataFilters && (keys2 = Object.keys(message.documentsMetadataFilters)).length) { - object.documentsMetadataFilters = {}; - for (var j = 0; j < keys2.length; ++j) - object.documentsMetadataFilters[keys2[j]] = message.documentsMetadataFilters[keys2[j]]; + if (options.defaults) { + object.suggestion = null; + object.latestMessage = ""; + object.contextSize = 0; } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.toObject(message.suggestion, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this AssistQueryParameters to JSON. + * Converts this CompileSuggestionResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AssistQueryParameters + * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse * @instance * @returns {Object.} JSON object */ - AssistQueryParameters.prototype.toJSON = function toJSON() { + CompileSuggestionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AssistQueryParameters; + return CompileSuggestionResponse; })(); - v2beta1.AnalyzeContentRequest = (function() { + v2beta1.ResponseMessage = (function() { /** - * Properties of an AnalyzeContentRequest. + * Properties of a ResponseMessage. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAnalyzeContentRequest - * @property {string|null} [participant] AnalyzeContentRequest participant - * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [textInput] AnalyzeContentRequest textInput - * @property {google.cloud.dialogflow.v2beta1.IEventInput|null} [eventInput] AnalyzeContentRequest eventInput - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [replyAudioConfig] AnalyzeContentRequest replyAudioConfig - * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] AnalyzeContentRequest queryParams - * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] AnalyzeContentRequest assistQueryParams - * @property {google.protobuf.ITimestamp|null} [messageSendTime] AnalyzeContentRequest messageSendTime - * @property {string|null} [requestId] AnalyzeContentRequest requestId + * @interface IResponseMessage + * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null} [text] ResponseMessage text + * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload + * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff + * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction + * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall */ /** - * Constructs a new AnalyzeContentRequest. + * Constructs a new ResponseMessage. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnalyzeContentRequest. - * @implements IAnalyzeContentRequest + * @classdesc Represents a ResponseMessage. + * @implements IResponseMessage * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IResponseMessage=} [properties] Properties to set */ - function AnalyzeContentRequest(properties) { + function ResponseMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -88973,180 +88341,141 @@ } /** - * AnalyzeContentRequest participant. - * @member {string} participant - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest - * @instance - */ - AnalyzeContentRequest.prototype.participant = ""; - - /** - * AnalyzeContentRequest textInput. - * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} textInput - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest - * @instance - */ - AnalyzeContentRequest.prototype.textInput = null; - - /** - * AnalyzeContentRequest eventInput. - * @member {google.cloud.dialogflow.v2beta1.IEventInput|null|undefined} eventInput - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest - * @instance - */ - AnalyzeContentRequest.prototype.eventInput = null; - - /** - * AnalyzeContentRequest replyAudioConfig. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} replyAudioConfig - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage text. + * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null|undefined} text + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - AnalyzeContentRequest.prototype.replyAudioConfig = null; + ResponseMessage.prototype.text = null; /** - * AnalyzeContentRequest queryParams. - * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - AnalyzeContentRequest.prototype.queryParams = null; + ResponseMessage.prototype.payload = null; /** - * AnalyzeContentRequest assistQueryParams. - * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage liveAgentHandoff. + * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - AnalyzeContentRequest.prototype.assistQueryParams = null; + ResponseMessage.prototype.liveAgentHandoff = null; /** - * AnalyzeContentRequest messageSendTime. - * @member {google.protobuf.ITimestamp|null|undefined} messageSendTime - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage endInteraction. + * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - AnalyzeContentRequest.prototype.messageSendTime = null; + ResponseMessage.prototype.endInteraction = null; /** - * AnalyzeContentRequest requestId. - * @member {string} requestId - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage telephonyTransferCall. + * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - AnalyzeContentRequest.prototype.requestId = ""; + ResponseMessage.prototype.telephonyTransferCall = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AnalyzeContentRequest input. - * @member {"textInput"|"eventInput"|undefined} input - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * ResponseMessage message. + * @member {"text"|"payload"|"liveAgentHandoff"|"endInteraction"|"telephonyTransferCall"|undefined} message + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance */ - Object.defineProperty(AnalyzeContentRequest.prototype, "input", { - get: $util.oneOfGetter($oneOfFields = ["textInput", "eventInput"]), + Object.defineProperty(ResponseMessage.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "payload", "liveAgentHandoff", "endInteraction", "telephonyTransferCall"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AnalyzeContentRequest instance using the specified properties. + * Creates a new ResponseMessage instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IResponseMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage instance */ - AnalyzeContentRequest.create = function create(properties) { - return new AnalyzeContentRequest(properties); + ResponseMessage.create = function create(properties) { + return new ResponseMessage(properties); }; /** - * Encodes the specified AnalyzeContentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. + * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} message AnalyzeContentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IResponseMessage} message ResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeContentRequest.encode = function encode(message, writer) { + ResponseMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.participant != null && Object.hasOwnProperty.call(message, "participant")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.participant); - if (message.replyAudioConfig != null && Object.hasOwnProperty.call(message, "replyAudioConfig")) - $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.replyAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.textInput != null && Object.hasOwnProperty.call(message, "textInput")) - $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.textInput, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.eventInput != null && Object.hasOwnProperty.call(message, "eventInput")) - $root.google.cloud.dialogflow.v2beta1.EventInput.encode(message.eventInput, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.queryParams != null && Object.hasOwnProperty.call(message, "queryParams")) - $root.google.cloud.dialogflow.v2beta1.QueryParameters.encode(message.queryParams, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.messageSendTime != null && Object.hasOwnProperty.call(message, "messageSendTime")) - $root.google.protobuf.Timestamp.encode(message.messageSendTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.requestId); - if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) - $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.v2beta1.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.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) + $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnalyzeContentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.verify|verify} messages. + * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentRequest} message AnalyzeContentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IResponseMessage} message ResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalyzeContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalyzeContentRequest message from the specified reader or buffer. + * Decodes a ResponseMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeContentRequest.decode = function decode(reader, length) { + 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.v2beta1.AnalyzeContentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.participant = reader.string(); + message.text = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.decode(reader, reader.uint32()); break; - case 6: - message.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); + case 2: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; - case 8: - message.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.decode(reader, reader.uint32()); - break; - case 5: - message.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); - break; - case 9: - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); - break; - case 14: - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + case 3: + message.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); break; - case 10: - message.messageSendTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: + message.endInteraction = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); break; - case 11: - message.requestId = reader.string(); + case 6: + message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -89157,1017 +88486,1013 @@ }; /** - * Decodes an AnalyzeContentRequest message from the specified reader or buffer, length delimited. + * Decodes a ResponseMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalyzeContentRequest.decodeDelimited = function decodeDelimited(reader) { + ResponseMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalyzeContentRequest message. + * Verifies a ResponseMessage message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalyzeContentRequest.verify = function verify(message) { + ResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.participant != null && message.hasOwnProperty("participant")) - if (!$util.isString(message.participant)) - return "participant: string expected"; - if (message.textInput != null && message.hasOwnProperty("textInput")) { - properties.input = 1; + if (message.text != null && message.hasOwnProperty("text")) { + properties.message = 1; { - var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.textInput); + var error = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.verify(message.text); if (error) - return "textInput." + error; + return "text." + error; } } - if (message.eventInput != null && message.hasOwnProperty("eventInput")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; + if (message.payload != null && message.hasOwnProperty("payload")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; { - var error = $root.google.cloud.dialogflow.v2beta1.EventInput.verify(message.eventInput); + var error = $root.google.protobuf.Struct.verify(message.payload); if (error) - return "eventInput." + error; + return "payload." + error; } } - if (message.replyAudioConfig != null && message.hasOwnProperty("replyAudioConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.replyAudioConfig); - if (error) - return "replyAudioConfig." + error; - } - if (message.queryParams != null && message.hasOwnProperty("queryParams")) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + 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.v2beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + if (error) + return "liveAgentHandoff." + error; + } } - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { - var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); - if (error) - return "assistQueryParams." + 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.v2beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); + if (error) + return "endInteraction." + error; + } } - if (message.messageSendTime != null && message.hasOwnProperty("messageSendTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.messageSendTime); - if (error) - return "messageSendTime." + error; + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (error) + return "telephonyTransferCall." + error; + } } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an AnalyzeContentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResponseMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} AnalyzeContentRequest + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage */ - AnalyzeContentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest) + ResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentRequest(); - if (object.participant != null) - message.participant = String(object.participant); - if (object.textInput != null) { - if (typeof object.textInput !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.textInput: object expected"); - message.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.textInput); - } - if (object.eventInput != null) { - if (typeof object.eventInput !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.eventInput: object expected"); - message.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.fromObject(object.eventInput); + var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.text: object expected"); + message.text = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.fromObject(object.text); } - if (object.replyAudioConfig != null) { - if (typeof object.replyAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.replyAudioConfig: object expected"); - message.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.replyAudioConfig); + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); } - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); + if (object.liveAgentHandoff != null) { + if (typeof object.liveAgentHandoff !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.liveAgentHandoff: object expected"); + message.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); } - if (object.assistQueryParams != null) { - if (typeof object.assistQueryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.assistQueryParams: object expected"); - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + if (object.endInteraction != null) { + if (typeof object.endInteraction !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.endInteraction: object expected"); + message.endInteraction = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); } - if (object.messageSendTime != null) { - if (typeof object.messageSendTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.messageSendTime: object expected"); - message.messageSendTime = $root.google.protobuf.Timestamp.fromObject(object.messageSendTime); + if (object.telephonyTransferCall != null) { + if (typeof object.telephonyTransferCall !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.telephonyTransferCall: object expected"); + message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an AnalyzeContentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResponseMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @static - * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentRequest} message AnalyzeContentRequest + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage} message ResponseMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalyzeContentRequest.toObject = function toObject(message, options) { + ResponseMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.participant = ""; - object.replyAudioConfig = null; - object.queryParams = null; - object.messageSendTime = null; - object.requestId = ""; - object.assistQueryParams = null; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; } - if (message.participant != null && message.hasOwnProperty("participant")) - object.participant = message.participant; - if (message.replyAudioConfig != null && message.hasOwnProperty("replyAudioConfig")) - object.replyAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.replyAudioConfig, options); - if (message.textInput != null && message.hasOwnProperty("textInput")) { - object.textInput = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.textInput, options); + if (message.payload != null && message.hasOwnProperty("payload")) { + object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); if (options.oneofs) - object.input = "textInput"; + object.message = "payload"; } - if (message.eventInput != null && message.hasOwnProperty("eventInput")) { - object.eventInput = $root.google.cloud.dialogflow.v2beta1.EventInput.toObject(message.eventInput, options); + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { + object.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.toObject(message.liveAgentHandoff, options); if (options.oneofs) - object.input = "eventInput"; + object.message = "liveAgentHandoff"; + } + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) { + object.endInteraction = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); + if (options.oneofs) + object.message = "endInteraction"; + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + object.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); + if (options.oneofs) + object.message = "telephonyTransferCall"; } - if (message.queryParams != null && message.hasOwnProperty("queryParams")) - object.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.toObject(message.queryParams, options); - if (message.messageSendTime != null && message.hasOwnProperty("messageSendTime")) - object.messageSendTime = $root.google.protobuf.Timestamp.toObject(message.messageSendTime, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) - object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); return object; }; /** - * Converts this AnalyzeContentRequest to JSON. + * Converts this ResponseMessage to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentRequest + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage * @instance * @returns {Object.} JSON object */ - AnalyzeContentRequest.prototype.toJSON = function toJSON() { + ResponseMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnalyzeContentRequest; - })(); - - v2beta1.DtmfParameters = (function() { + ResponseMessage.Text = (function() { - /** - * Properties of a DtmfParameters. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDtmfParameters - * @property {boolean|null} [acceptsDtmfInput] DtmfParameters acceptsDtmfInput - */ + /** + * Properties of a Text. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @interface IText + * @property {Array.|null} [text] Text text + */ - /** - * Constructs a new DtmfParameters. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DtmfParameters. - * @implements IDtmfParameters - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters=} [properties] Properties to set - */ - function DtmfParameters(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 Text. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * DtmfParameters acceptsDtmfInput. - * @member {boolean} acceptsDtmfInput - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @instance - */ - DtmfParameters.prototype.acceptsDtmfInput = false; + /** + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; - /** - * Creates a new DtmfParameters instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters instance - */ - DtmfParameters.create = function create(properties) { - return new DtmfParameters(properties); - }; + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; - /** - * Encodes the specified DtmfParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters} message DtmfParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DtmfParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceptsDtmfInput != null && Object.hasOwnProperty.call(message, "acceptsDtmfInput")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsDtmfInput); - return writer; - }; + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.Text.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.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]); + return writer; + }; - /** - * Encodes the specified DtmfParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DtmfParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {google.cloud.dialogflow.v2beta1.IDtmfParameters} message DtmfParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DtmfParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.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 DtmfParameters message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DtmfParameters.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.v2beta1.DtmfParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acceptsDtmfInput = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Text message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes a DtmfParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DtmfParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a DtmfParameters message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DtmfParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.acceptsDtmfInput != null && message.hasOwnProperty("acceptsDtmfInput")) - if (typeof message.acceptsDtmfInput !== "boolean") - return "acceptsDtmfInput: boolean expected"; - return null; - }; + /** + * Decodes a Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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()); + }; - /** - * Creates a DtmfParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DtmfParameters} DtmfParameters - */ - DtmfParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DtmfParameters) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DtmfParameters(); - if (object.acceptsDtmfInput != null) - message.acceptsDtmfInput = Boolean(object.acceptsDtmfInput); - return message; - }; + /** + * Verifies a Text message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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"; + } + return null; + }; - /** - * Creates a plain object from a DtmfParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @static - * @param {google.cloud.dialogflow.v2beta1.DtmfParameters} message DtmfParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DtmfParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.acceptsDtmfInput = false; - if (message.acceptsDtmfInput != null && message.hasOwnProperty("acceptsDtmfInput")) - object.acceptsDtmfInput = message.acceptsDtmfInput; - return object; - }; - - /** - * Converts this DtmfParameters to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DtmfParameters - * @instance - * @returns {Object.} JSON object - */ - DtmfParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DtmfParameters; - })(); - - v2beta1.AnalyzeContentResponse = (function() { - - /** - * Properties of an AnalyzeContentResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAnalyzeContentResponse - * @property {string|null} [replyText] AnalyzeContentResponse replyText - * @property {google.cloud.dialogflow.v2beta1.IOutputAudio|null} [replyAudio] AnalyzeContentResponse replyAudio - * @property {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null} [automatedAgentReply] AnalyzeContentResponse automatedAgentReply - * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [message] AnalyzeContentResponse message - * @property {Array.|null} [humanAgentSuggestionResults] AnalyzeContentResponse humanAgentSuggestionResults - * @property {Array.|null} [endUserSuggestionResults] AnalyzeContentResponse endUserSuggestionResults - * @property {google.cloud.dialogflow.v2beta1.IDtmfParameters|null} [dtmfParameters] AnalyzeContentResponse dtmfParameters - */ - - /** - * Constructs a new AnalyzeContentResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnalyzeContentResponse. - * @implements IAnalyzeContentResponse - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse=} [properties] Properties to set - */ - function AnalyzeContentResponse(properties) { - this.humanAgentSuggestionResults = []; - this.endUserSuggestionResults = []; - 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 Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + return message; + }; - /** - * AnalyzeContentResponse replyText. - * @member {string} replyText - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.replyText = ""; + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.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 (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + return object; + }; - /** - * AnalyzeContentResponse replyAudio. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudio|null|undefined} replyAudio - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.replyAudio = null; + /** + * Converts this Text to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * AnalyzeContentResponse automatedAgentReply. - * @member {google.cloud.dialogflow.v2beta1.IAutomatedAgentReply|null|undefined} automatedAgentReply - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.automatedAgentReply = null; + return Text; + })(); - /** - * AnalyzeContentResponse message. - * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} message - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.message = null; + ResponseMessage.LiveAgentHandoff = (function() { - /** - * AnalyzeContentResponse humanAgentSuggestionResults. - * @member {Array.} humanAgentSuggestionResults - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.humanAgentSuggestionResults = $util.emptyArray; + /** + * Properties of a LiveAgentHandoff. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @interface ILiveAgentHandoff + * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata + */ - /** - * AnalyzeContentResponse endUserSuggestionResults. - * @member {Array.} endUserSuggestionResults - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.endUserSuggestionResults = $util.emptyArray; + /** + * Constructs a new LiveAgentHandoff. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @classdesc Represents a LiveAgentHandoff. + * @implements ILiveAgentHandoff + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * AnalyzeContentResponse dtmfParameters. - * @member {google.cloud.dialogflow.v2beta1.IDtmfParameters|null|undefined} dtmfParameters - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - */ - AnalyzeContentResponse.prototype.dtmfParameters = null; + /** + * LiveAgentHandoff metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @instance + */ + LiveAgentHandoff.prototype.metadata = null; - /** - * Creates a new AnalyzeContentResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse instance - */ - AnalyzeContentResponse.create = function create(properties) { - return new AnalyzeContentResponse(properties); - }; + /** + * Creates a new LiveAgentHandoff instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance + */ + LiveAgentHandoff.create = function create(properties) { + return new LiveAgentHandoff(properties); + }; - /** - * Encodes the specified AnalyzeContentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse} message AnalyzeContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyzeContentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.replyText != null && Object.hasOwnProperty.call(message, "replyText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.replyText); - if (message.replyAudio != null && Object.hasOwnProperty.call(message, "replyAudio")) - $root.google.cloud.dialogflow.v2beta1.OutputAudio.encode(message.replyAudio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.automatedAgentReply != null && Object.hasOwnProperty.call(message, "automatedAgentReply")) - $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.encode(message.automatedAgentReply, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.v2beta1.Message.encode(message.message, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.humanAgentSuggestionResults != null && message.humanAgentSuggestionResults.length) - for (var i = 0; i < message.humanAgentSuggestionResults.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SuggestionResult.encode(message.humanAgentSuggestionResults[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endUserSuggestionResults != null && message.endUserSuggestionResults.length) - for (var i = 0; i < message.endUserSuggestionResults.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SuggestionResult.encode(message.endUserSuggestionResults[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.dtmfParameters != null && Object.hasOwnProperty.call(message, "dtmfParameters")) - $root.google.cloud.dialogflow.v2beta1.DtmfParameters.encode(message.dtmfParameters, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.v2beta1.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 AnalyzeContentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnalyzeContentResponse} message AnalyzeContentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyzeContentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.v2beta1.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 an AnalyzeContentResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyzeContentResponse.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.v2beta1.AnalyzeContentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.replyText = reader.string(); - break; - case 2: - message.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.decode(reader, reader.uint32()); - break; - case 3: - message.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.decode(reader, reader.uint32()); - break; - case 5: - message.message = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.humanAgentSuggestionResults && message.humanAgentSuggestionResults.length)) - message.humanAgentSuggestionResults = []; - message.humanAgentSuggestionResults.push($root.google.cloud.dialogflow.v2beta1.SuggestionResult.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.endUserSuggestionResults && message.endUserSuggestionResults.length)) - message.endUserSuggestionResults = []; - message.endUserSuggestionResults.push($root.google.cloud.dialogflow.v2beta1.SuggestionResult.decode(reader, reader.uint32())); - break; - case 9: - message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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; - }; + return message; + }; - /** - * Decodes an AnalyzeContentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyzeContentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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 an AnalyzeContentResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnalyzeContentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.replyText != null && message.hasOwnProperty("replyText")) - if (!$util.isString(message.replyText)) - return "replyText: string expected"; - if (message.replyAudio != null && message.hasOwnProperty("replyAudio")) { - var error = $root.google.cloud.dialogflow.v2beta1.OutputAudio.verify(message.replyAudio); - if (error) - return "replyAudio." + error; - } - if (message.automatedAgentReply != null && message.hasOwnProperty("automatedAgentReply")) { - var error = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.verify(message.automatedAgentReply); - if (error) - return "automatedAgentReply." + error; - } - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.message); - if (error) - return "message." + error; - } - if (message.humanAgentSuggestionResults != null && message.hasOwnProperty("humanAgentSuggestionResults")) { - if (!Array.isArray(message.humanAgentSuggestionResults)) - return "humanAgentSuggestionResults: array expected"; - for (var i = 0; i < message.humanAgentSuggestionResults.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.verify(message.humanAgentSuggestionResults[i]); + /** + * Verifies a LiveAgentHandoff message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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 "humanAgentSuggestionResults." + error; + return "metadata." + error; } - } - if (message.endUserSuggestionResults != null && message.hasOwnProperty("endUserSuggestionResults")) { - if (!Array.isArray(message.endUserSuggestionResults)) - return "endUserSuggestionResults: array expected"; - for (var i = 0; i < message.endUserSuggestionResults.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.verify(message.endUserSuggestionResults[i]); - if (error) - return "endUserSuggestionResults." + 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.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff + */ + LiveAgentHandoff.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); } - } - if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) { - var error = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.verify(message.dtmfParameters); - if (error) - return "dtmfParameters." + error; - } - return null; - }; + return message; + }; - /** - * Creates an AnalyzeContentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} AnalyzeContentResponse - */ - AnalyzeContentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse) + /** + * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @static + * @param {google.cloud.dialogflow.v2beta1.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; - var message = new $root.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse(); - if (object.replyText != null) - message.replyText = String(object.replyText); - if (object.replyAudio != null) { - if (typeof object.replyAudio !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.replyAudio: object expected"); - message.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.fromObject(object.replyAudio); - } - if (object.automatedAgentReply != null) { - if (typeof object.automatedAgentReply !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.automatedAgentReply: object expected"); - message.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.fromObject(object.automatedAgentReply); - } - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.message: object expected"); - message.message = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.message); - } - if (object.humanAgentSuggestionResults) { - if (!Array.isArray(object.humanAgentSuggestionResults)) - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.humanAgentSuggestionResults: array expected"); - message.humanAgentSuggestionResults = []; - for (var i = 0; i < object.humanAgentSuggestionResults.length; ++i) { - if (typeof object.humanAgentSuggestionResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.humanAgentSuggestionResults: object expected"); - message.humanAgentSuggestionResults[i] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.fromObject(object.humanAgentSuggestionResults[i]); - } - } - if (object.endUserSuggestionResults) { - if (!Array.isArray(object.endUserSuggestionResults)) - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.endUserSuggestionResults: array expected"); - message.endUserSuggestionResults = []; - for (var i = 0; i < object.endUserSuggestionResults.length; ++i) { - if (typeof object.endUserSuggestionResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.endUserSuggestionResults: object expected"); - message.endUserSuggestionResults[i] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.fromObject(object.endUserSuggestionResults[i]); - } - } - if (object.dtmfParameters != null) { - if (typeof object.dtmfParameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.dtmfParameters: object expected"); - message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.fromObject(object.dtmfParameters); - } - return message; - }; + }; - /** - * Creates a plain object from an AnalyzeContentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.AnalyzeContentResponse} message AnalyzeContentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnalyzeContentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.humanAgentSuggestionResults = []; - object.endUserSuggestionResults = []; - } - if (options.defaults) { - object.replyText = ""; - object.replyAudio = null; - object.automatedAgentReply = null; - object.message = null; - object.dtmfParameters = null; - } - if (message.replyText != null && message.hasOwnProperty("replyText")) - object.replyText = message.replyText; - if (message.replyAudio != null && message.hasOwnProperty("replyAudio")) - object.replyAudio = $root.google.cloud.dialogflow.v2beta1.OutputAudio.toObject(message.replyAudio, options); - if (message.automatedAgentReply != null && message.hasOwnProperty("automatedAgentReply")) - object.automatedAgentReply = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.toObject(message.automatedAgentReply, options); - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.message, options); - if (message.humanAgentSuggestionResults && message.humanAgentSuggestionResults.length) { - object.humanAgentSuggestionResults = []; - for (var j = 0; j < message.humanAgentSuggestionResults.length; ++j) - object.humanAgentSuggestionResults[j] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.toObject(message.humanAgentSuggestionResults[j], options); - } - if (message.endUserSuggestionResults && message.endUserSuggestionResults.length) { - object.endUserSuggestionResults = []; - for (var j = 0; j < message.endUserSuggestionResults.length; ++j) - object.endUserSuggestionResults[j] = $root.google.cloud.dialogflow.v2beta1.SuggestionResult.toObject(message.endUserSuggestionResults[j], options); - } - if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) - object.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.toObject(message.dtmfParameters, options); - return object; - }; + /** + * Converts this LiveAgentHandoff to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff + * @instance + * @returns {Object.} JSON object + */ + LiveAgentHandoff.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this AnalyzeContentResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AnalyzeContentResponse - * @instance - * @returns {Object.} JSON object - */ - AnalyzeContentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return LiveAgentHandoff; + })(); - return AnalyzeContentResponse; - })(); + ResponseMessage.EndInteraction = (function() { - v2beta1.AnnotatedMessagePart = (function() { + /** + * Properties of an EndInteraction. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @interface IEndInteraction + */ - /** - * Properties of an AnnotatedMessagePart. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAnnotatedMessagePart - * @property {string|null} [text] AnnotatedMessagePart text - * @property {string|null} [entityType] AnnotatedMessagePart entityType - * @property {google.protobuf.IValue|null} [formattedValue] AnnotatedMessagePart formattedValue - */ + /** + * Constructs a new EndInteraction. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @classdesc Represents an EndInteraction. + * @implements IEndInteraction + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * Constructs a new AnnotatedMessagePart. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AnnotatedMessagePart. - * @implements IAnnotatedMessagePart - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart=} [properties] Properties to set - */ - function AnnotatedMessagePart(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.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction} EndInteraction instance + */ + EndInteraction.create = function create(properties) { + return new EndInteraction(properties); + }; - /** - * AnnotatedMessagePart text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @instance - */ - AnnotatedMessagePart.prototype.text = ""; + /** + * Encodes the specified EndInteraction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.v2beta1.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; + }; - /** - * AnnotatedMessagePart entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @instance - */ - AnnotatedMessagePart.prototype.entityType = ""; + /** + * Encodes the specified EndInteraction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.v2beta1.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(); + }; - /** - * AnnotatedMessagePart formattedValue. - * @member {google.protobuf.IValue|null|undefined} formattedValue - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @instance - */ - AnnotatedMessagePart.prototype.formattedValue = null; + /** + * Decodes an EndInteraction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.ResponseMessage.EndInteraction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new AnnotatedMessagePart instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart instance - */ - AnnotatedMessagePart.create = function create(properties) { - return new AnnotatedMessagePart(properties); - }; + /** + * Decodes an EndInteraction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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()); + }; - /** - * Encodes the specified AnnotatedMessagePart message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart} message AnnotatedMessagePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnnotatedMessagePart.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); - if (message.formattedValue != null && Object.hasOwnProperty.call(message, "formattedValue")) - $root.google.protobuf.Value.encode(message.formattedValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Verifies an EndInteraction message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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; + }; - /** - * Encodes the specified AnnotatedMessagePart message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {google.cloud.dialogflow.v2beta1.IAnnotatedMessagePart} message AnnotatedMessagePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnnotatedMessagePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an EndInteraction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction} EndInteraction + */ + EndInteraction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) + return object; + return new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction(); + }; - /** - * Decodes an AnnotatedMessagePart message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnnotatedMessagePart.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.v2beta1.AnnotatedMessagePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.entityType = reader.string(); - break; - case 3: - message.formattedValue = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction} message EndInteraction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndInteraction.toObject = function toObject() { + return {}; + }; - /** - * Decodes an AnnotatedMessagePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnnotatedMessagePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this EndInteraction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction + * @instance + * @returns {Object.} JSON object + */ + EndInteraction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies an AnnotatedMessagePart message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnnotatedMessagePart.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.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.formattedValue != null && message.hasOwnProperty("formattedValue")) { - var error = $root.google.protobuf.Value.verify(message.formattedValue); - if (error) - return "formattedValue." + error; - } - return null; - }; + return EndInteraction; + })(); - /** - * Creates an AnnotatedMessagePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} AnnotatedMessagePart - */ - AnnotatedMessagePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart(); - if (object.text != null) - message.text = String(object.text); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.formattedValue != null) { - if (typeof object.formattedValue !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.formattedValue: object expected"); - message.formattedValue = $root.google.protobuf.Value.fromObject(object.formattedValue); - } - return message; - }; + ResponseMessage.TelephonyTransferCall = (function() { - /** - * Creates a plain object from an AnnotatedMessagePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @static - * @param {google.cloud.dialogflow.v2beta1.AnnotatedMessagePart} message AnnotatedMessagePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnnotatedMessagePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.entityType = ""; - object.formattedValue = null; + /** + * Properties of a TelephonyTransferCall. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @interface ITelephonyTransferCall + * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber + * @property {string|null} [sipUri] TelephonyTransferCall sipUri + */ + + /** + * Constructs a new TelephonyTransferCall. + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @classdesc Represents a TelephonyTransferCall. + * @implements ITelephonyTransferCall + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set + */ + function TelephonyTransferCall(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]]; } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.formattedValue != null && message.hasOwnProperty("formattedValue")) - object.formattedValue = $root.google.protobuf.Value.toObject(message.formattedValue, options); - return object; - }; - /** - * Converts this AnnotatedMessagePart to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AnnotatedMessagePart - * @instance - * @returns {Object.} JSON object - */ - AnnotatedMessagePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * TelephonyTransferCall phoneNumber. + * @member {string|null|undefined} phoneNumber + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @instance + */ + TelephonyTransferCall.prototype.phoneNumber = null; - return AnnotatedMessagePart; - })(); + /** + * TelephonyTransferCall sipUri. + * @member {string|null|undefined} sipUri + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @instance + */ + TelephonyTransferCall.prototype.sipUri = null; - v2beta1.MessageAnnotation = (function() { + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Properties of a MessageAnnotation. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IMessageAnnotation - * @property {Array.|null} [parts] MessageAnnotation parts - * @property {boolean|null} [containEntities] MessageAnnotation containEntities + /** + * TelephonyTransferCall endpoint. + * @member {"phoneNumber"|"sipUri"|undefined} endpoint + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @instance + */ + Object.defineProperty(TelephonyTransferCall.prototype, "endpoint", { + get: $util.oneOfGetter($oneOfFields = ["phoneNumber", "sipUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TelephonyTransferCall instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall instance + */ + TelephonyTransferCall.create = function create(properties) { + return new TelephonyTransferCall(properties); + }; + + /** + * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); + if (message.sipUri != null && Object.hasOwnProperty.call(message, "sipUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sipUri); + return writer; + }; + + /** + * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.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.v2beta1.ResponseMessage.TelephonyTransferCall(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.phoneNumber = reader.string(); + break; + case 2: + message.sipUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TelephonyTransferCall message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelephonyTransferCall.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + properties.endpoint = 1; + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; + } + if (message.sipUri != null && message.hasOwnProperty("sipUri")) { + if (properties.endpoint === 1) + return "endpoint: multiple values"; + properties.endpoint = 1; + if (!$util.isString(message.sipUri)) + return "sipUri: string expected"; + } + return null; + }; + + /** + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall + */ + TelephonyTransferCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + if (object.sipUri != null) + message.sipUri = String(object.sipUri); + return message; + }; + + /** + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelephonyTransferCall.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + object.phoneNumber = message.phoneNumber; + if (options.oneofs) + object.endpoint = "phoneNumber"; + } + if (message.sipUri != null && message.hasOwnProperty("sipUri")) { + object.sipUri = message.sipUri; + if (options.oneofs) + object.endpoint = "sipUri"; + } + return object; + }; + + /** + * Converts this TelephonyTransferCall to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall + * @instance + * @returns {Object.} JSON object + */ + TelephonyTransferCall.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TelephonyTransferCall; + })(); + + return ResponseMessage; + })(); + + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + v2beta1.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; + })(); + + v2beta1.SpeechContext = (function() { + + /** + * Properties of a SpeechContext. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ISpeechContext + * @property {Array.|null} [phrases] SpeechContext phrases + * @property {number|null} [boost] SpeechContext boost */ /** - * Constructs a new MessageAnnotation. + * Constructs a new SpeechContext. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a MessageAnnotation. - * @implements IMessageAnnotation + * @classdesc Represents a SpeechContext. + * @implements ISpeechContext * @constructor - * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISpeechContext=} [properties] Properties to set */ - function MessageAnnotation(properties) { - this.parts = []; + function SpeechContext(properties) { + this.phrases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90175,91 +89500,91 @@ } /** - * MessageAnnotation parts. - * @member {Array.} parts - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * SpeechContext phrases. + * @member {Array.} phrases + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @instance */ - MessageAnnotation.prototype.parts = $util.emptyArray; + SpeechContext.prototype.phrases = $util.emptyArray; /** - * MessageAnnotation containEntities. - * @member {boolean} containEntities - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * SpeechContext boost. + * @member {number} boost + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @instance */ - MessageAnnotation.prototype.containEntities = false; + SpeechContext.prototype.boost = 0; /** - * Creates a new MessageAnnotation instance using the specified properties. + * Creates a new SpeechContext instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static - * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation instance + * @param {google.cloud.dialogflow.v2beta1.ISpeechContext=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext instance */ - MessageAnnotation.create = function create(properties) { - return new MessageAnnotation(properties); + SpeechContext.create = function create(properties) { + return new SpeechContext(properties); }; /** - * Encodes the specified MessageAnnotation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. + * Encodes the specified SpeechContext message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static - * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation} message MessageAnnotation message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechContext} message SpeechContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAnnotation.encode = function encode(message, writer) { + SpeechContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parts != null && message.parts.length) - for (var i = 0; i < message.parts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.encode(message.parts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.containEntities != null && Object.hasOwnProperty.call(message, "containEntities")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.containEntities); + if (message.phrases != null && message.phrases.length) + for (var i = 0; i < message.phrases.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.boost); return writer; }; /** - * Encodes the specified MessageAnnotation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.MessageAnnotation.verify|verify} messages. + * Encodes the specified SpeechContext message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechContext.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static - * @param {google.cloud.dialogflow.v2beta1.IMessageAnnotation} message MessageAnnotation message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechContext} message SpeechContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageAnnotation message from the specified reader or buffer. + * Decodes a SpeechContext message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation + * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAnnotation.decode = function decode(reader, length) { + SpeechContext.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.v2beta1.MessageAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SpeechContext(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.parts && message.parts.length)) - message.parts = []; - message.parts.push($root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.decode(reader, reader.uint32())); + if (!(message.phrases && message.phrases.length)) + message.phrases = []; + message.phrases.push(reader.string()); break; case 2: - message.containEntities = reader.bool(); + message.boost = reader.float(); break; default: reader.skipType(tag & 7); @@ -90270,139 +89595,149 @@ }; /** - * Decodes a MessageAnnotation message from the specified reader or buffer, length delimited. + * Decodes a SpeechContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation + * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageAnnotation.decodeDelimited = function decodeDelimited(reader) { + SpeechContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageAnnotation message. + * Verifies a SpeechContext message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageAnnotation.verify = function verify(message) { + SpeechContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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.v2beta1.AnnotatedMessagePart.verify(message.parts[i]); - if (error) - return "parts." + error; - } + if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (!Array.isArray(message.phrases)) + return "phrases: array expected"; + for (var i = 0; i < message.phrases.length; ++i) + if (!$util.isString(message.phrases[i])) + return "phrases: string[] expected"; } - if (message.containEntities != null && message.hasOwnProperty("containEntities")) - if (typeof message.containEntities !== "boolean") - return "containEntities: boolean expected"; + if (message.boost != null && message.hasOwnProperty("boost")) + if (typeof message.boost !== "number") + return "boost: number expected"; return null; }; /** - * Creates a MessageAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.MessageAnnotation} MessageAnnotation + * @returns {google.cloud.dialogflow.v2beta1.SpeechContext} SpeechContext */ - MessageAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.MessageAnnotation) + SpeechContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechContext) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.MessageAnnotation(); - if (object.parts) { - if (!Array.isArray(object.parts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.MessageAnnotation.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.v2beta1.MessageAnnotation.parts: object expected"); - message.parts[i] = $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.fromObject(object.parts[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.SpeechContext(); + if (object.phrases) { + if (!Array.isArray(object.phrases)) + throw TypeError(".google.cloud.dialogflow.v2beta1.SpeechContext.phrases: array expected"); + message.phrases = []; + for (var i = 0; i < object.phrases.length; ++i) + message.phrases[i] = String(object.phrases[i]); } - if (object.containEntities != null) - message.containEntities = Boolean(object.containEntities); + if (object.boost != null) + message.boost = Number(object.boost); return message; }; /** - * Creates a plain object from a MessageAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a SpeechContext message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @static - * @param {google.cloud.dialogflow.v2beta1.MessageAnnotation} message MessageAnnotation + * @param {google.cloud.dialogflow.v2beta1.SpeechContext} message SpeechContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageAnnotation.toObject = function toObject(message, options) { + SpeechContext.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.parts = []; + object.phrases = []; if (options.defaults) - object.containEntities = false; - if (message.parts && message.parts.length) { - object.parts = []; - for (var j = 0; j < message.parts.length; ++j) - object.parts[j] = $root.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart.toObject(message.parts[j], options); + object.boost = 0; + if (message.phrases && message.phrases.length) { + object.phrases = []; + for (var j = 0; j < message.phrases.length; ++j) + object.phrases[j] = message.phrases[j]; } - if (message.containEntities != null && message.hasOwnProperty("containEntities")) - object.containEntities = message.containEntities; + if (message.boost != null && message.hasOwnProperty("boost")) + object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; /** - * Converts this MessageAnnotation to JSON. + * Converts this SpeechContext to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.MessageAnnotation + * @memberof google.cloud.dialogflow.v2beta1.SpeechContext * @instance * @returns {Object.} JSON object */ - MessageAnnotation.prototype.toJSON = function toJSON() { + SpeechContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageAnnotation; + return SpeechContext; })(); - v2beta1.ArticleAnswer = (function() { + /** + * SpeechModelVariant enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + v2beta1.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; + })(); + + v2beta1.SpeechWordInfo = (function() { /** - * Properties of an ArticleAnswer. + * Properties of a SpeechWordInfo. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IArticleAnswer - * @property {string|null} [title] ArticleAnswer title - * @property {string|null} [uri] ArticleAnswer uri - * @property {Array.|null} [snippets] ArticleAnswer snippets - * @property {Object.|null} [metadata] ArticleAnswer metadata - * @property {string|null} [answerRecord] ArticleAnswer answerRecord + * @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 ArticleAnswer. + * Constructs a new SpeechWordInfo. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an ArticleAnswer. - * @implements IArticleAnswer + * @classdesc Represents a SpeechWordInfo. + * @implements ISpeechWordInfo * @constructor - * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo=} [properties] Properties to set */ - function ArticleAnswer(properties) { - this.snippets = []; - this.metadata = {}; + function SpeechWordInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90410,150 +89745,114 @@ } /** - * ArticleAnswer title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer - * @instance - */ - ArticleAnswer.prototype.title = ""; - - /** - * ArticleAnswer uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * SpeechWordInfo word. + * @member {string} word + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @instance */ - ArticleAnswer.prototype.uri = ""; + SpeechWordInfo.prototype.word = ""; /** - * ArticleAnswer snippets. - * @member {Array.} snippets - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * SpeechWordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @instance */ - ArticleAnswer.prototype.snippets = $util.emptyArray; + SpeechWordInfo.prototype.startOffset = null; /** - * ArticleAnswer metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * SpeechWordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @instance */ - ArticleAnswer.prototype.metadata = $util.emptyObject; + SpeechWordInfo.prototype.endOffset = null; /** - * ArticleAnswer answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * SpeechWordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @instance */ - ArticleAnswer.prototype.answerRecord = ""; + SpeechWordInfo.prototype.confidence = 0; /** - * Creates a new ArticleAnswer instance using the specified properties. + * Creates a new SpeechWordInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer instance + * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo instance */ - ArticleAnswer.create = function create(properties) { - return new ArticleAnswer(properties); + SpeechWordInfo.create = function create(properties) { + return new SpeechWordInfo(properties); }; /** - * Encodes the specified ArticleAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * Encodes the specified SpeechWordInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer} message ArticleAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleAnswer.encode = function encode(message, writer) { + SpeechWordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.snippets != null && message.snippets.length) - for (var i = 0; i < message.snippets.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snippets[i]); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); + 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 ArticleAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ArticleAnswer.verify|verify} messages. + * Encodes the specified SpeechWordInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechWordInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.v2beta1.IArticleAnswer} message ArticleAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechWordInfo} message SpeechWordInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleAnswer.encodeDelimited = function encodeDelimited(message, writer) { + SpeechWordInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArticleAnswer message from the specified reader or buffer. + * Decodes a SpeechWordInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ArticleAnswer} ArticleAnswer + * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleAnswer.decode = function decode(reader, length) { + 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.v2beta1.ArticleAnswer(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.word = reader.string(); + break; case 1: - message.title = reader.string(); + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 2: - message.uri = reader.string(); - break; - case 3: - if (!(message.snippets && message.snippets.length)) - message.snippets = []; - message.snippets.push(reader.string()); - break; - case 5: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; - case 6: - message.answerRecord = reader.string(); + case 4: + message.confidence = reader.float(); break; default: reader.skipType(tag & 7); @@ -90564,174 +89863,153 @@ }; /** - * Decodes an ArticleAnswer message from the specified reader or buffer, length delimited. + * Decodes a SpeechWordInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer + * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleAnswer.decodeDelimited = function decodeDelimited(reader) { + SpeechWordInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArticleAnswer message. + * Verifies a SpeechWordInfo message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArticleAnswer.verify = function verify(message) { + SpeechWordInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.snippets != null && message.hasOwnProperty("snippets")) { - if (!Array.isArray(message.snippets)) - return "snippets: array expected"; - for (var i = 0; i < message.snippets.length; ++i) - if (!$util.isString(message.snippets[i])) - return "snippets: string[] 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.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates an ArticleAnswer message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechWordInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ArticleAnswer} ArticleAnswer + * @returns {google.cloud.dialogflow.v2beta1.SpeechWordInfo} SpeechWordInfo */ - ArticleAnswer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ArticleAnswer) + SpeechWordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ArticleAnswer(); - if (object.title != null) - message.title = String(object.title); - if (object.uri != null) - message.uri = String(object.uri); - if (object.snippets) { - if (!Array.isArray(object.snippets)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ArticleAnswer.snippets: array expected"); - message.snippets = []; - for (var i = 0; i < object.snippets.length; ++i) - message.snippets[i] = String(object.snippets[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo(); + if (object.word != null) + message.word = String(object.word); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SpeechWordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ArticleAnswer.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SpeechWordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); } - if (object.answerRecord != null) - message.answerRecord = String(object.answerRecord); + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from an ArticleAnswer message. Also converts values to other types if specified. + * Creates a plain object from a SpeechWordInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @static - * @param {google.cloud.dialogflow.v2beta1.ArticleAnswer} message ArticleAnswer + * @param {google.cloud.dialogflow.v2beta1.SpeechWordInfo} message SpeechWordInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArticleAnswer.toObject = function toObject(message, options) { + SpeechWordInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.snippets = []; - if (options.objects || options.defaults) - object.metadata = {}; if (options.defaults) { - object.title = ""; - object.uri = ""; - object.answerRecord = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.snippets && message.snippets.length) { - object.snippets = []; - for (var j = 0; j < message.snippets.length; ++j) - object.snippets[j] = message.snippets[j]; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; + 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 ArticleAnswer to JSON. + * Converts this SpeechWordInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ArticleAnswer + * @memberof google.cloud.dialogflow.v2beta1.SpeechWordInfo * @instance * @returns {Object.} JSON object */ - ArticleAnswer.prototype.toJSON = function toJSON() { + SpeechWordInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ArticleAnswer; + return SpeechWordInfo; })(); - v2beta1.FaqAnswer = (function() { + v2beta1.InputAudioConfig = (function() { /** - * Properties of a FaqAnswer. + * Properties of an InputAudioConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IFaqAnswer - * @property {string|null} [answer] FaqAnswer answer - * @property {number|null} [confidence] FaqAnswer confidence - * @property {string|null} [question] FaqAnswer question - * @property {string|null} [source] FaqAnswer source - * @property {Object.|null} [metadata] FaqAnswer metadata - * @property {string|null} [answerRecord] FaqAnswer answerRecord + * @interface IInputAudioConfig + * @property {google.cloud.dialogflow.v2beta1.AudioEncoding|null} [audioEncoding] InputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] InputAudioConfig sampleRateHertz + * @property {string|null} [languageCode] InputAudioConfig languageCode + * @property {boolean|null} [enableWordInfo] InputAudioConfig enableWordInfo + * @property {Array.|null} [phraseHints] InputAudioConfig phraseHints + * @property {Array.|null} [speechContexts] InputAudioConfig speechContexts + * @property {string|null} [model] InputAudioConfig model + * @property {google.cloud.dialogflow.v2beta1.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant + * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance + * @property {boolean|null} [disableNoSpeechRecognizedEvent] InputAudioConfig disableNoSpeechRecognizedEvent */ /** - * Constructs a new FaqAnswer. + * Constructs a new InputAudioConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a FaqAnswer. - * @implements IFaqAnswer + * @classdesc Represents an InputAudioConfig. + * @implements IInputAudioConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig=} [properties] Properties to set */ - function FaqAnswer(properties) { - this.metadata = {}; + function InputAudioConfig(properties) { + this.phraseHints = []; + this.speechContexts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -90739,160 +90017,198 @@ } /** - * FaqAnswer answer. - * @member {string} answer - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.v2beta1.AudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.answer = ""; + InputAudioConfig.prototype.audioEncoding = 0; /** - * FaqAnswer confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.confidence = 0; + InputAudioConfig.prototype.sampleRateHertz = 0; /** - * FaqAnswer question. - * @member {string} question - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.question = ""; + InputAudioConfig.prototype.languageCode = ""; /** - * FaqAnswer source. - * @member {string} source - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig enableWordInfo. + * @member {boolean} enableWordInfo + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.source = ""; + InputAudioConfig.prototype.enableWordInfo = false; /** - * FaqAnswer metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig phraseHints. + * @member {Array.} phraseHints + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.metadata = $util.emptyObject; + InputAudioConfig.prototype.phraseHints = $util.emptyArray; /** - * FaqAnswer answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * InputAudioConfig speechContexts. + * @member {Array.} speechContexts + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance */ - FaqAnswer.prototype.answerRecord = ""; + InputAudioConfig.prototype.speechContexts = $util.emptyArray; /** - * Creates a new FaqAnswer instance using the specified properties. + * InputAudioConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.model = ""; + + /** + * InputAudioConfig modelVariant. + * @member {google.cloud.dialogflow.v2beta1.SpeechModelVariant} modelVariant + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.modelVariant = 0; + + /** + * InputAudioConfig singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.singleUtterance = false; + + /** + * InputAudioConfig disableNoSpeechRecognizedEvent. + * @member {boolean} disableNoSpeechRecognizedEvent + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.disableNoSpeechRecognizedEvent = false; + + /** + * Creates a new InputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer instance + * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig instance */ - FaqAnswer.create = function create(properties) { - return new FaqAnswer(properties); + InputAudioConfig.create = function create(properties) { + return new InputAudioConfig(properties); }; /** - * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. + * Encodes the specified InputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer} message FaqAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FaqAnswer.encode = function encode(message, writer) { + InputAudioConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.source); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); + 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); + 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.speechContexts != null && message.speechContexts.length) + for (var i = 0; i < message.speechContexts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.enableWordInfo != null && Object.hasOwnProperty.call(message, "enableWordInfo")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); + if (message.disableNoSpeechRecognizedEvent != null && Object.hasOwnProperty.call(message, "disableNoSpeechRecognizedEvent")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.disableNoSpeechRecognizedEvent); return writer; }; /** - * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.FaqAnswer.verify|verify} messages. + * Encodes the specified InputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.InputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IFaqAnswer} message FaqAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IInputAudioConfig} message InputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FaqAnswer.encodeDelimited = function encodeDelimited(message, writer) { + InputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FaqAnswer message from the specified reader or buffer. + * Decodes an InputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.FaqAnswer} FaqAnswer + * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FaqAnswer.decode = function decode(reader, length) { + 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.v2beta1.FaqAnswer(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.InputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.answer = reader.string(); + message.audioEncoding = reader.int32(); break; case 2: - message.confidence = reader.float(); + message.sampleRateHertz = reader.int32(); break; case 3: - message.question = reader.string(); + message.languageCode = reader.string(); + break; + case 13: + message.enableWordInfo = reader.bool(); break; case 4: - message.source = reader.string(); + if (!(message.phraseHints && message.phraseHints.length)) + message.phraseHints = []; + message.phraseHints.push(reader.string()); break; - case 5: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; + case 11: + if (!(message.speechContexts && message.speechContexts.length)) + message.speechContexts = []; + message.speechContexts.push($root.google.cloud.dialogflow.v2beta1.SpeechContext.decode(reader, reader.uint32())); break; - case 6: - message.answerRecord = reader.string(); + case 7: + message.model = reader.string(); + break; + case 10: + message.modelVariant = reader.int32(); + break; + case 8: + message.singleUtterance = reader.bool(); + break; + case 14: + message.disableNoSpeechRecognizedEvent = reader.bool(); break; default: reader.skipType(tag & 7); @@ -90903,165 +90219,296 @@ }; /** - * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. + * Decodes an InputAudioConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer + * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FaqAnswer.decodeDelimited = function decodeDelimited(reader) { + InputAudioConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FaqAnswer message. + * Verifies an InputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FaqAnswer.verify = function verify(message) { + InputAudioConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answer != null && message.hasOwnProperty("answer")) - if (!$util.isString(message.answer)) - return "answer: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string expected"; - return null; - }; - - /** - * Creates a FaqAnswer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.FaqAnswer} FaqAnswer - */ - FaqAnswer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.FaqAnswer) + 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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string 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.speechContexts != null && message.hasOwnProperty("speechContexts")) { + if (!Array.isArray(message.speechContexts)) + return "speechContexts: array expected"; + for (var i = 0; i < message.speechContexts.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SpeechContext.verify(message.speechContexts[i]); + if (error) + return "speechContexts." + 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"; + if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) + if (typeof message.disableNoSpeechRecognizedEvent !== "boolean") + return "disableNoSpeechRecognizedEvent: 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.v2beta1.InputAudioConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.InputAudioConfig} InputAudioConfig + */ + InputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.InputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.FaqAnswer(); - if (object.answer != null) - message.answer = String(object.answer); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.question != null) - message.question = String(object.question); - if (object.source != null) - message.source = String(object.source); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.FaqAnswer.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + var message = new $root.google.cloud.dialogflow.v2beta1.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.answerRecord != null) - message.answerRecord = String(object.answerRecord); + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.enableWordInfo != null) + message.enableWordInfo = Boolean(object.enableWordInfo); + if (object.phraseHints) { + if (!Array.isArray(object.phraseHints)) + throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.phraseHints: array expected"); + message.phraseHints = []; + for (var i = 0; i < object.phraseHints.length; ++i) + message.phraseHints[i] = String(object.phraseHints[i]); + } + if (object.speechContexts) { + if (!Array.isArray(object.speechContexts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.speechContexts: array expected"); + message.speechContexts = []; + for (var i = 0; i < object.speechContexts.length; ++i) { + if (typeof object.speechContexts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.speechContexts: object expected"); + message.speechContexts[i] = $root.google.cloud.dialogflow.v2beta1.SpeechContext.fromObject(object.speechContexts[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); + if (object.disableNoSpeechRecognizedEvent != null) + message.disableNoSpeechRecognizedEvent = Boolean(object.disableNoSpeechRecognizedEvent); return message; }; /** - * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. + * Creates a plain object from an InputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.FaqAnswer} message FaqAnswer + * @param {google.cloud.dialogflow.v2beta1.InputAudioConfig} message InputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FaqAnswer.toObject = function toObject(message, options) { + InputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; + if (options.arrays || options.defaults) { + object.phraseHints = []; + object.speechContexts = []; + } if (options.defaults) { - object.answer = ""; - object.confidence = 0; - object.question = ""; - object.source = ""; - object.answerRecord = ""; + object.audioEncoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.languageCode = ""; + object.model = ""; + object.singleUtterance = false; + object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + object.enableWordInfo = false; + object.disableNoSpeechRecognizedEvent = false; } - if (message.answer != null && message.hasOwnProperty("answer")) - object.answer = message.answer; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + 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.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; + 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.v2beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; + if (message.speechContexts && message.speechContexts.length) { + object.speechContexts = []; + for (var j = 0; j < message.speechContexts.length; ++j) + object.speechContexts[j] = $root.google.cloud.dialogflow.v2beta1.SpeechContext.toObject(message.speechContexts[j], options); + } + if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) + object.enableWordInfo = message.enableWordInfo; + if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) + object.disableNoSpeechRecognizedEvent = message.disableNoSpeechRecognizedEvent; return object; }; /** - * Converts this FaqAnswer to JSON. + * Converts this InputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.FaqAnswer + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig * @instance * @returns {Object.} JSON object */ - FaqAnswer.prototype.toJSON = function toJSON() { + InputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FaqAnswer; + return InputAudioConfig; })(); - v2beta1.SmartReplyAnswer = (function() { + /** + * SsmlVoiceGender enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + v2beta1.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; + })(); + + v2beta1.VoiceSelectionParams = (function() { /** - * Properties of a SmartReplyAnswer. + * Properties of a VoiceSelectionParams. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISmartReplyAnswer - * @property {string|null} [reply] SmartReplyAnswer reply - * @property {number|null} [confidence] SmartReplyAnswer confidence - * @property {string|null} [answerRecord] SmartReplyAnswer answerRecord + * @interface IVoiceSelectionParams + * @property {string|null} [name] VoiceSelectionParams name + * @property {google.cloud.dialogflow.v2beta1.SsmlVoiceGender|null} [ssmlGender] VoiceSelectionParams ssmlGender */ /** - * Constructs a new SmartReplyAnswer. + * Constructs a new VoiceSelectionParams. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SmartReplyAnswer. - * @implements ISmartReplyAnswer + * @classdesc Represents a VoiceSelectionParams. + * @implements IVoiceSelectionParams * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams=} [properties] Properties to set */ - function SmartReplyAnswer(properties) { + function VoiceSelectionParams(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91069,101 +90516,88 @@ } /** - * SmartReplyAnswer reply. - * @member {string} reply - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer - * @instance - */ - SmartReplyAnswer.prototype.reply = ""; - - /** - * SmartReplyAnswer confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * VoiceSelectionParams name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @instance */ - SmartReplyAnswer.prototype.confidence = 0; + VoiceSelectionParams.prototype.name = ""; /** - * SmartReplyAnswer answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * VoiceSelectionParams ssmlGender. + * @member {google.cloud.dialogflow.v2beta1.SsmlVoiceGender} ssmlGender + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @instance */ - SmartReplyAnswer.prototype.answerRecord = ""; + VoiceSelectionParams.prototype.ssmlGender = 0; /** - * Creates a new SmartReplyAnswer instance using the specified properties. + * Creates a new VoiceSelectionParams instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer instance + * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams instance */ - SmartReplyAnswer.create = function create(properties) { - return new SmartReplyAnswer(properties); + VoiceSelectionParams.create = function create(properties) { + return new VoiceSelectionParams(properties); }; /** - * Encodes the specified SmartReplyAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer} message SmartReplyAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyAnswer.encode = function encode(message, writer) { + VoiceSelectionParams.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.reply); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.answerRecord); + 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 SmartReplyAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify|verify} messages. + * Encodes the specified VoiceSelectionParams message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.v2beta1.ISmartReplyAnswer} message SmartReplyAnswer message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams} message VoiceSelectionParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyAnswer.encodeDelimited = function encodeDelimited(message, writer) { + VoiceSelectionParams.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartReplyAnswer message from the specified reader or buffer. + * Decodes a VoiceSelectionParams message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SmartReplyAnswer} SmartReplyAnswer + * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyAnswer.decode = function decode(reader, length) { + 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.v2beta1.SmartReplyAnswer(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.reply = reader.string(); + message.name = reader.string(); break; case 2: - message.confidence = reader.float(); - break; - case 3: - message.answerRecord = reader.string(); + message.ssmlGender = reader.int32(); break; default: reader.skipType(tag & 7); @@ -91174,127 +90608,144 @@ }; /** - * Decodes a SmartReplyAnswer message from the specified reader or buffer, length delimited. + * Decodes a VoiceSelectionParams message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer + * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyAnswer.decodeDelimited = function decodeDelimited(reader) { + VoiceSelectionParams.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SmartReplyAnswer message. + * Verifies a VoiceSelectionParams message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SmartReplyAnswer.verify = function verify(message) { + VoiceSelectionParams.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reply != null && message.hasOwnProperty("reply")) - if (!$util.isString(message.reply)) - return "reply: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string 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 SmartReplyAnswer 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. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} SmartReplyAnswer + * @returns {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} VoiceSelectionParams */ - SmartReplyAnswer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer) + VoiceSelectionParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer(); - if (object.reply != null) - message.reply = String(object.reply); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.answerRecord != null) - message.answerRecord = String(object.answerRecord); + var message = new $root.google.cloud.dialogflow.v2beta1.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; }; /** - * Creates a plain object from a SmartReplyAnswer message. Also converts values to other types if specified. + * Creates a plain object from a VoiceSelectionParams message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @static - * @param {google.cloud.dialogflow.v2beta1.SmartReplyAnswer} message SmartReplyAnswer + * @param {google.cloud.dialogflow.v2beta1.VoiceSelectionParams} message VoiceSelectionParams * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SmartReplyAnswer.toObject = function toObject(message, options) { + VoiceSelectionParams.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.reply = ""; - object.confidence = 0; - object.answerRecord = ""; + object.name = ""; + object.ssmlGender = options.enums === String ? "SSML_VOICE_GENDER_UNSPECIFIED" : 0; } - if (message.reply != null && message.hasOwnProperty("reply")) - object.reply = message.reply; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; + 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.v2beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; /** - * Converts this SmartReplyAnswer to JSON. + * Converts this VoiceSelectionParams to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SmartReplyAnswer + * @memberof google.cloud.dialogflow.v2beta1.VoiceSelectionParams * @instance * @returns {Object.} JSON object */ - SmartReplyAnswer.prototype.toJSON = function toJSON() { + VoiceSelectionParams.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SmartReplyAnswer; + return VoiceSelectionParams; })(); - v2beta1.SuggestionResult = (function() { + v2beta1.SynthesizeSpeechConfig = (function() { /** - * Properties of a SuggestionResult. + * Properties of a SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestionResult - * @property {google.rpc.IStatus|null} [error] SuggestionResult error - * @property {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null} [suggestArticlesResponse] SuggestionResult suggestArticlesResponse - * @property {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null} [suggestFaqAnswersResponse] SuggestionResult suggestFaqAnswersResponse - * @property {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null} [suggestSmartRepliesResponse] SuggestionResult suggestSmartRepliesResponse + * @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.v2beta1.IVoiceSelectionParams|null} [voice] SynthesizeSpeechConfig voice */ /** - * Constructs a new SuggestionResult. + * Constructs a new SynthesizeSpeechConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestionResult. - * @implements ISuggestionResult + * @classdesc Represents a SynthesizeSpeechConfig. + * @implements ISynthesizeSpeechConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig=} [properties] Properties to set */ - function SuggestionResult(properties) { + function SynthesizeSpeechConfig(properties) { + this.effectsProfileId = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91302,128 +90753,130 @@ } /** - * SuggestionResult error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * SynthesizeSpeechConfig speakingRate. + * @member {number} speakingRate + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance */ - SuggestionResult.prototype.error = null; + SynthesizeSpeechConfig.prototype.speakingRate = 0; /** - * SuggestionResult suggestArticlesResponse. - * @member {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse|null|undefined} suggestArticlesResponse - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * SynthesizeSpeechConfig pitch. + * @member {number} pitch + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance */ - SuggestionResult.prototype.suggestArticlesResponse = null; + SynthesizeSpeechConfig.prototype.pitch = 0; /** - * SuggestionResult suggestFaqAnswersResponse. - * @member {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse|null|undefined} suggestFaqAnswersResponse - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * SynthesizeSpeechConfig volumeGainDb. + * @member {number} volumeGainDb + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance */ - SuggestionResult.prototype.suggestFaqAnswersResponse = null; + SynthesizeSpeechConfig.prototype.volumeGainDb = 0; /** - * SuggestionResult suggestSmartRepliesResponse. - * @member {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse|null|undefined} suggestSmartRepliesResponse - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * SynthesizeSpeechConfig effectsProfileId. + * @member {Array.} effectsProfileId + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance */ - SuggestionResult.prototype.suggestSmartRepliesResponse = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SynthesizeSpeechConfig.prototype.effectsProfileId = $util.emptyArray; /** - * SuggestionResult suggestionResponse. - * @member {"error"|"suggestArticlesResponse"|"suggestFaqAnswersResponse"|"suggestSmartRepliesResponse"|undefined} suggestionResponse - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * SynthesizeSpeechConfig voice. + * @member {google.cloud.dialogflow.v2beta1.IVoiceSelectionParams|null|undefined} voice + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance */ - Object.defineProperty(SuggestionResult.prototype, "suggestionResponse", { - get: $util.oneOfGetter($oneOfFields = ["error", "suggestArticlesResponse", "suggestFaqAnswersResponse", "suggestSmartRepliesResponse"]), - set: $util.oneOfSetter($oneOfFields) - }); + SynthesizeSpeechConfig.prototype.voice = null; /** - * Creates a new SuggestionResult instance using the specified properties. + * Creates a new SynthesizeSpeechConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult instance + * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig instance */ - SuggestionResult.create = function create(properties) { - return new SuggestionResult(properties); + SynthesizeSpeechConfig.create = function create(properties) { + return new SynthesizeSpeechConfig(properties); }; /** - * Encodes the specified SuggestionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult} message SuggestionResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionResult.encode = function encode(message, writer) { + SynthesizeSpeechConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.suggestArticlesResponse != null && Object.hasOwnProperty.call(message, "suggestArticlesResponse")) - $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.encode(message.suggestArticlesResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.suggestFaqAnswersResponse != null && Object.hasOwnProperty.call(message, "suggestFaqAnswersResponse")) - $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.encode(message.suggestFaqAnswersResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.suggestSmartRepliesResponse != null && Object.hasOwnProperty.call(message, "suggestSmartRepliesResponse")) - $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.encode(message.suggestSmartRepliesResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + 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.v2beta1.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; }; /** - * Encodes the specified SuggestionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestionResult.verify|verify} messages. + * Encodes the specified SynthesizeSpeechConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestionResult} message SuggestionResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig} message SynthesizeSpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionResult.encodeDelimited = function encodeDelimited(message, writer) { + SynthesizeSpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionResult message from the specified reader or buffer. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SuggestionResult} SuggestionResult + * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionResult.decode = function decode(reader, length) { + 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.v2beta1.SuggestionResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.speakingRate = reader.double(); break; case 2: - message.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.decode(reader, reader.uint32()); + message.pitch = reader.double(); break; case 3: - message.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.decode(reader, reader.uint32()); + message.volumeGainDb = reader.double(); + break; + case 5: + if (!(message.effectsProfileId && message.effectsProfileId.length)) + message.effectsProfileId = []; + message.effectsProfileId.push(reader.string()); break; case 4: - message.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.decode(reader, reader.uint32()); + message.voice = $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -91434,180 +90887,182 @@ }; /** - * Decodes a SuggestionResult message from the specified reader or buffer, length delimited. + * Decodes a SynthesizeSpeechConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult + * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionResult.decodeDelimited = function decodeDelimited(reader) { + SynthesizeSpeechConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionResult message. + * Verifies a SynthesizeSpeechConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionResult.verify = function verify(message) { + SynthesizeSpeechConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.error != null && message.hasOwnProperty("error")) { - properties.suggestionResponse = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - if (message.suggestArticlesResponse != null && message.hasOwnProperty("suggestArticlesResponse")) { - if (properties.suggestionResponse === 1) - return "suggestionResponse: multiple values"; - properties.suggestionResponse = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify(message.suggestArticlesResponse); - if (error) - return "suggestArticlesResponse." + error; - } - } - if (message.suggestFaqAnswersResponse != null && message.hasOwnProperty("suggestFaqAnswersResponse")) { - if (properties.suggestionResponse === 1) - return "suggestionResponse: multiple values"; - properties.suggestionResponse = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify(message.suggestFaqAnswersResponse); - if (error) - return "suggestFaqAnswersResponse." + error; - } + 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.suggestSmartRepliesResponse != null && message.hasOwnProperty("suggestSmartRepliesResponse")) { - if (properties.suggestionResponse === 1) - return "suggestionResponse: multiple values"; - properties.suggestionResponse = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify(message.suggestSmartRepliesResponse); - if (error) - return "suggestSmartRepliesResponse." + error; - } + if (message.voice != null && message.hasOwnProperty("voice")) { + var error = $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams.verify(message.voice); + if (error) + return "voice." + error; } return null; }; /** - * Creates a SuggestionResult 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. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestionResult} SuggestionResult + * @returns {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} SynthesizeSpeechConfig */ - SuggestionResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestionResult) + SynthesizeSpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestionResult(); - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.suggestArticlesResponse != null) { - if (typeof object.suggestArticlesResponse !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestArticlesResponse: object expected"); - message.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.fromObject(object.suggestArticlesResponse); - } - if (object.suggestFaqAnswersResponse != null) { - if (typeof object.suggestFaqAnswersResponse !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestFaqAnswersResponse: object expected"); - message.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.fromObject(object.suggestFaqAnswersResponse); + var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.SynthesizeSpeechConfig.effectsProfileId: array expected"); + message.effectsProfileId = []; + for (var i = 0; i < object.effectsProfileId.length; ++i) + message.effectsProfileId[i] = String(object.effectsProfileId[i]); } - if (object.suggestSmartRepliesResponse != null) { - if (typeof object.suggestSmartRepliesResponse !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestionResult.suggestSmartRepliesResponse: object expected"); - message.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.fromObject(object.suggestSmartRepliesResponse); + if (object.voice != null) { + if (typeof object.voice !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.voice: object expected"); + message.voice = $root.google.cloud.dialogflow.v2beta1.VoiceSelectionParams.fromObject(object.voice); } return message; }; /** - * Creates a plain object from a SuggestionResult message. Also converts values to other types if specified. + * Creates a plain object from a SynthesizeSpeechConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestionResult} message SuggestionResult + * @param {google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig} message SynthesizeSpeechConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionResult.toObject = function toObject(message, options) { + SynthesizeSpeechConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.suggestionResponse = "error"; - } - if (message.suggestArticlesResponse != null && message.hasOwnProperty("suggestArticlesResponse")) { - object.suggestArticlesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.toObject(message.suggestArticlesResponse, options); - if (options.oneofs) - object.suggestionResponse = "suggestArticlesResponse"; - } - if (message.suggestFaqAnswersResponse != null && message.hasOwnProperty("suggestFaqAnswersResponse")) { - object.suggestFaqAnswersResponse = $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.toObject(message.suggestFaqAnswersResponse, options); - if (options.oneofs) - object.suggestionResponse = "suggestFaqAnswersResponse"; + if (options.arrays || options.defaults) + object.effectsProfileId = []; + if (options.defaults) { + object.speakingRate = 0; + object.pitch = 0; + object.volumeGainDb = 0; + object.voice = null; } - if (message.suggestSmartRepliesResponse != null && message.hasOwnProperty("suggestSmartRepliesResponse")) { - object.suggestSmartRepliesResponse = $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.toObject(message.suggestSmartRepliesResponse, options); - if (options.oneofs) - object.suggestionResponse = "suggestSmartRepliesResponse"; + 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.v2beta1.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; }; /** - * Converts this SuggestionResult to JSON. + * Converts this SynthesizeSpeechConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestionResult + * @memberof google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig * @instance * @returns {Object.} JSON object */ - SuggestionResult.prototype.toJSON = function toJSON() { + SynthesizeSpeechConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestionResult; + return SynthesizeSpeechConfig; })(); - v2beta1.SuggestArticlesRequest = (function() { + /** + * OutputAudioEncoding enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + v2beta1.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; + })(); + + v2beta1.OutputAudioConfig = (function() { /** - * Properties of a SuggestArticlesRequest. + * Properties of an OutputAudioConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestArticlesRequest - * @property {string|null} [parent] SuggestArticlesRequest parent - * @property {string|null} [latestMessage] SuggestArticlesRequest latestMessage - * @property {number|null} [contextSize] SuggestArticlesRequest contextSize - * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] SuggestArticlesRequest assistQueryParams + * @interface IOutputAudioConfig + * @property {google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null} [audioEncoding] OutputAudioConfig audioEncoding + * @property {number|null} [sampleRateHertz] OutputAudioConfig sampleRateHertz + * @property {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null} [synthesizeSpeechConfig] OutputAudioConfig synthesizeSpeechConfig */ /** - * Constructs a new SuggestArticlesRequest. + * Constructs a new OutputAudioConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestArticlesRequest. - * @implements ISuggestArticlesRequest + * @classdesc Represents an OutputAudioConfig. + * @implements IOutputAudioConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig=} [properties] Properties to set */ - function SuggestArticlesRequest(properties) { + function OutputAudioConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91615,114 +91070,101 @@ } /** - * SuggestArticlesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest - * @instance - */ - SuggestArticlesRequest.prototype.parent = ""; - - /** - * SuggestArticlesRequest latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * OutputAudioConfig audioEncoding. + * @member {google.cloud.dialogflow.v2beta1.OutputAudioEncoding} audioEncoding + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @instance */ - SuggestArticlesRequest.prototype.latestMessage = ""; + OutputAudioConfig.prototype.audioEncoding = 0; /** - * SuggestArticlesRequest contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * OutputAudioConfig sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @instance */ - SuggestArticlesRequest.prototype.contextSize = 0; + OutputAudioConfig.prototype.sampleRateHertz = 0; /** - * SuggestArticlesRequest assistQueryParams. - * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * OutputAudioConfig synthesizeSpeechConfig. + * @member {google.cloud.dialogflow.v2beta1.ISynthesizeSpeechConfig|null|undefined} synthesizeSpeechConfig + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @instance */ - SuggestArticlesRequest.prototype.assistQueryParams = null; + OutputAudioConfig.prototype.synthesizeSpeechConfig = null; /** - * Creates a new SuggestArticlesRequest instance using the specified properties. + * Creates a new OutputAudioConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig instance */ - SuggestArticlesRequest.create = function create(properties) { - return new SuggestArticlesRequest(properties); + OutputAudioConfig.create = function create(properties) { + return new OutputAudioConfig(properties); }; /** - * Encodes the specified SuggestArticlesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} message SuggestArticlesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestArticlesRequest.encode = function encode(message, writer) { + OutputAudioConfig.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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); - if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) - $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + 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.v2beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SuggestArticlesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.verify|verify} messages. + * Encodes the specified OutputAudioConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesRequest} message SuggestArticlesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IOutputAudioConfig} message OutputAudioConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestArticlesRequest.encodeDelimited = function encodeDelimited(message, writer) { + OutputAudioConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestArticlesRequest message from the specified reader or buffer. + * Decodes an OutputAudioConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest + * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestArticlesRequest.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.v2beta1.SuggestArticlesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.audioEncoding = reader.int32(); break; case 2: - message.latestMessage = reader.string(); + message.sampleRateHertz = reader.int32(); break; case 3: - message.contextSize = reader.int32(); - break; - case 4: - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -91733,140 +91175,207 @@ }; /** - * Decodes a SuggestArticlesRequest 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.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest + * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestArticlesRequest.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 SuggestArticlesRequest message. + * Verifies an OutputAudioConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestArticlesRequest.verify = function verify(message) { + OutputAudioConfig.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.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { - var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); + 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.v2beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfig); if (error) - return "assistQueryParams." + error; + return "synthesizeSpeechConfig." + error; } return null; }; /** - * Creates a SuggestArticlesRequest 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.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} SuggestArticlesRequest + * @returns {google.cloud.dialogflow.v2beta1.OutputAudioConfig} OutputAudioConfig */ - SuggestArticlesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest) + OutputAudioConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestArticlesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; - if (object.assistQueryParams != null) { - if (typeof object.assistQueryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.assistQueryParams: object expected"); - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.OutputAudioConfig.synthesizeSpeechConfig: object expected"); + message.synthesizeSpeechConfig = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfig); } return message; }; /** - * Creates a plain object from a SuggestArticlesRequest message. Also converts values to other types if specified. + * Creates a plain object from an OutputAudioConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesRequest} message SuggestArticlesRequest + * @param {google.cloud.dialogflow.v2beta1.OutputAudioConfig} message OutputAudioConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestArticlesRequest.toObject = function toObject(message, options) { + OutputAudioConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.latestMessage = ""; - object.contextSize = 0; - object.assistQueryParams = null; + object.audioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + object.synthesizeSpeechConfig = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) - object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); + if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.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.v2beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfig, options); return object; }; /** - * Converts this SuggestArticlesRequest to JSON. + * Converts this OutputAudioConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesRequest + * @memberof google.cloud.dialogflow.v2beta1.OutputAudioConfig * @instance * @returns {Object.} JSON object */ - SuggestArticlesRequest.prototype.toJSON = function toJSON() { + OutputAudioConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestArticlesRequest; + return OutputAudioConfig; })(); - v2beta1.SuggestArticlesResponse = (function() { + /** + * TelephonyDtmf enum. + * @name google.cloud.dialogflow.v2beta1.TelephonyDtmf + * @enum {number} + * @property {number} TELEPHONY_DTMF_UNSPECIFIED=0 TELEPHONY_DTMF_UNSPECIFIED value + * @property {number} DTMF_ONE=1 DTMF_ONE value + * @property {number} DTMF_TWO=2 DTMF_TWO value + * @property {number} DTMF_THREE=3 DTMF_THREE value + * @property {number} DTMF_FOUR=4 DTMF_FOUR value + * @property {number} DTMF_FIVE=5 DTMF_FIVE value + * @property {number} DTMF_SIX=6 DTMF_SIX value + * @property {number} DTMF_SEVEN=7 DTMF_SEVEN value + * @property {number} DTMF_EIGHT=8 DTMF_EIGHT value + * @property {number} DTMF_NINE=9 DTMF_NINE value + * @property {number} DTMF_ZERO=10 DTMF_ZERO value + * @property {number} DTMF_A=11 DTMF_A value + * @property {number} DTMF_B=12 DTMF_B value + * @property {number} DTMF_C=13 DTMF_C value + * @property {number} DTMF_D=14 DTMF_D value + * @property {number} DTMF_STAR=15 DTMF_STAR value + * @property {number} DTMF_POUND=16 DTMF_POUND value + */ + v2beta1.TelephonyDtmf = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TELEPHONY_DTMF_UNSPECIFIED"] = 0; + values[valuesById[1] = "DTMF_ONE"] = 1; + values[valuesById[2] = "DTMF_TWO"] = 2; + values[valuesById[3] = "DTMF_THREE"] = 3; + values[valuesById[4] = "DTMF_FOUR"] = 4; + values[valuesById[5] = "DTMF_FIVE"] = 5; + values[valuesById[6] = "DTMF_SIX"] = 6; + values[valuesById[7] = "DTMF_SEVEN"] = 7; + values[valuesById[8] = "DTMF_EIGHT"] = 8; + values[valuesById[9] = "DTMF_NINE"] = 9; + values[valuesById[10] = "DTMF_ZERO"] = 10; + values[valuesById[11] = "DTMF_A"] = 11; + values[valuesById[12] = "DTMF_B"] = 12; + values[valuesById[13] = "DTMF_C"] = 13; + values[valuesById[14] = "DTMF_D"] = 14; + values[valuesById[15] = "DTMF_STAR"] = 15; + values[valuesById[16] = "DTMF_POUND"] = 16; + return values; + })(); + + v2beta1.TelephonyDtmfEvents = (function() { /** - * Properties of a SuggestArticlesResponse. + * Properties of a TelephonyDtmfEvents. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestArticlesResponse - * @property {Array.|null} [articleAnswers] SuggestArticlesResponse articleAnswers - * @property {string|null} [latestMessage] SuggestArticlesResponse latestMessage - * @property {number|null} [contextSize] SuggestArticlesResponse contextSize + * @interface ITelephonyDtmfEvents + * @property {Array.|null} [dtmfEvents] TelephonyDtmfEvents dtmfEvents */ /** - * Constructs a new SuggestArticlesResponse. + * Constructs a new TelephonyDtmfEvents. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestArticlesResponse. - * @implements ISuggestArticlesResponse + * @classdesc Represents a TelephonyDtmfEvents. + * @implements ITelephonyDtmfEvents * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents=} [properties] Properties to set */ - function SuggestArticlesResponse(properties) { - this.articleAnswers = []; + function TelephonyDtmfEvents(properties) { + this.dtmfEvents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -91874,104 +91383,86 @@ } /** - * SuggestArticlesResponse articleAnswers. - * @member {Array.} articleAnswers - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse - * @instance - */ - SuggestArticlesResponse.prototype.articleAnswers = $util.emptyArray; - - /** - * SuggestArticlesResponse latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse - * @instance - */ - SuggestArticlesResponse.prototype.latestMessage = ""; - - /** - * SuggestArticlesResponse contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * TelephonyDtmfEvents dtmfEvents. + * @member {Array.} dtmfEvents + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @instance */ - SuggestArticlesResponse.prototype.contextSize = 0; + TelephonyDtmfEvents.prototype.dtmfEvents = $util.emptyArray; /** - * Creates a new SuggestArticlesResponse instance using the specified properties. + * Creates a new TelephonyDtmfEvents instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse instance + * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents instance */ - SuggestArticlesResponse.create = function create(properties) { - return new SuggestArticlesResponse(properties); + TelephonyDtmfEvents.create = function create(properties) { + return new TelephonyDtmfEvents(properties); }; /** - * Encodes the specified SuggestArticlesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * Encodes the specified TelephonyDtmfEvents message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse} message SuggestArticlesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents} message TelephonyDtmfEvents message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestArticlesResponse.encode = function encode(message, writer) { + TelephonyDtmfEvents.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.articleAnswers != null && message.articleAnswers.length) - for (var i = 0; i < message.articleAnswers.length; ++i) - $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.encode(message.articleAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + if (message.dtmfEvents != null && message.dtmfEvents.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.dtmfEvents.length; ++i) + writer.int32(message.dtmfEvents[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified SuggestArticlesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.verify|verify} messages. + * Encodes the specified TelephonyDtmfEvents message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestArticlesResponse} message SuggestArticlesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents} message TelephonyDtmfEvents message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestArticlesResponse.encodeDelimited = function encodeDelimited(message, writer) { + TelephonyDtmfEvents.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestArticlesResponse message from the specified reader or buffer. + * Decodes a TelephonyDtmfEvents message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse + * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestArticlesResponse.decode = function decode(reader, length) { + TelephonyDtmfEvents.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.v2beta1.SuggestArticlesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.articleAnswers && message.articleAnswers.length)) - message.articleAnswers = []; - message.articleAnswers.push($root.google.cloud.dialogflow.v2beta1.ArticleAnswer.decode(reader, reader.uint32())); - break; - case 2: - message.latestMessage = reader.string(); - break; - case 3: - message.contextSize = reader.int32(); + if (!(message.dtmfEvents && message.dtmfEvents.length)) + message.dtmfEvents = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.dtmfEvents.push(reader.int32()); + } else + message.dtmfEvents.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -91982,145 +91473,209 @@ }; /** - * Decodes a SuggestArticlesResponse message from the specified reader or buffer, length delimited. + * Decodes a TelephonyDtmfEvents message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse + * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestArticlesResponse.decodeDelimited = function decodeDelimited(reader) { + TelephonyDtmfEvents.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestArticlesResponse message. + * Verifies a TelephonyDtmfEvents message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestArticlesResponse.verify = function verify(message) { + TelephonyDtmfEvents.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.articleAnswers != null && message.hasOwnProperty("articleAnswers")) { - if (!Array.isArray(message.articleAnswers)) - return "articleAnswers: array expected"; - for (var i = 0; i < message.articleAnswers.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.verify(message.articleAnswers[i]); - if (error) - return "articleAnswers." + error; - } + if (message.dtmfEvents != null && message.hasOwnProperty("dtmfEvents")) { + if (!Array.isArray(message.dtmfEvents)) + return "dtmfEvents: array expected"; + for (var i = 0; i < message.dtmfEvents.length; ++i) + switch (message.dtmfEvents[i]) { + default: + return "dtmfEvents: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + break; + } } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; return null; }; /** - * Creates a SuggestArticlesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a TelephonyDtmfEvents message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} SuggestArticlesResponse + * @returns {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} TelephonyDtmfEvents */ - SuggestArticlesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse) + TelephonyDtmfEvents.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse(); - if (object.articleAnswers) { - if (!Array.isArray(object.articleAnswers)) - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.articleAnswers: array expected"); - message.articleAnswers = []; - for (var i = 0; i < object.articleAnswers.length; ++i) { - if (typeof object.articleAnswers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.articleAnswers: object expected"); - message.articleAnswers[i] = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.fromObject(object.articleAnswers[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents(); + if (object.dtmfEvents) { + if (!Array.isArray(object.dtmfEvents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.dtmfEvents: array expected"); + message.dtmfEvents = []; + for (var i = 0; i < object.dtmfEvents.length; ++i) + switch (object.dtmfEvents[i]) { + default: + case "TELEPHONY_DTMF_UNSPECIFIED": + case 0: + message.dtmfEvents[i] = 0; + break; + case "DTMF_ONE": + case 1: + message.dtmfEvents[i] = 1; + break; + case "DTMF_TWO": + case 2: + message.dtmfEvents[i] = 2; + break; + case "DTMF_THREE": + case 3: + message.dtmfEvents[i] = 3; + break; + case "DTMF_FOUR": + case 4: + message.dtmfEvents[i] = 4; + break; + case "DTMF_FIVE": + case 5: + message.dtmfEvents[i] = 5; + break; + case "DTMF_SIX": + case 6: + message.dtmfEvents[i] = 6; + break; + case "DTMF_SEVEN": + case 7: + message.dtmfEvents[i] = 7; + break; + case "DTMF_EIGHT": + case 8: + message.dtmfEvents[i] = 8; + break; + case "DTMF_NINE": + case 9: + message.dtmfEvents[i] = 9; + break; + case "DTMF_ZERO": + case 10: + message.dtmfEvents[i] = 10; + break; + case "DTMF_A": + case 11: + message.dtmfEvents[i] = 11; + break; + case "DTMF_B": + case 12: + message.dtmfEvents[i] = 12; + break; + case "DTMF_C": + case 13: + message.dtmfEvents[i] = 13; + break; + case "DTMF_D": + case 14: + message.dtmfEvents[i] = 14; + break; + case "DTMF_STAR": + case 15: + message.dtmfEvents[i] = 15; + break; + case "DTMF_POUND": + case 16: + message.dtmfEvents[i] = 16; + break; + } } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a SuggestArticlesResponse message. Also converts values to other types if specified. + * Creates a plain object from a TelephonyDtmfEvents message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestArticlesResponse} message SuggestArticlesResponse + * @param {google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents} message TelephonyDtmfEvents * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestArticlesResponse.toObject = function toObject(message, options) { + TelephonyDtmfEvents.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.articleAnswers = []; - if (options.defaults) { - object.latestMessage = ""; - object.contextSize = 0; - } - if (message.articleAnswers && message.articleAnswers.length) { - object.articleAnswers = []; - for (var j = 0; j < message.articleAnswers.length; ++j) - object.articleAnswers[j] = $root.google.cloud.dialogflow.v2beta1.ArticleAnswer.toObject(message.articleAnswers[j], options); + object.dtmfEvents = []; + if (message.dtmfEvents && message.dtmfEvents.length) { + object.dtmfEvents = []; + for (var j = 0; j < message.dtmfEvents.length; ++j) + object.dtmfEvents[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.TelephonyDtmf[message.dtmfEvents[j]] : message.dtmfEvents[j]; } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; return object; }; /** - * Converts this SuggestArticlesResponse to JSON. + * Converts this TelephonyDtmfEvents to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestArticlesResponse + * @memberof google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents * @instance * @returns {Object.} JSON object */ - SuggestArticlesResponse.prototype.toJSON = function toJSON() { + TelephonyDtmfEvents.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestArticlesResponse; + return TelephonyDtmfEvents; })(); - v2beta1.SuggestFaqAnswersRequest = (function() { + v2beta1.SpeechToTextConfig = (function() { /** - * Properties of a SuggestFaqAnswersRequest. + * Properties of a SpeechToTextConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestFaqAnswersRequest - * @property {string|null} [parent] SuggestFaqAnswersRequest parent - * @property {string|null} [latestMessage] SuggestFaqAnswersRequest latestMessage - * @property {number|null} [contextSize] SuggestFaqAnswersRequest contextSize - * @property {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null} [assistQueryParams] SuggestFaqAnswersRequest assistQueryParams + * @interface ISpeechToTextConfig + * @property {google.cloud.dialogflow.v2beta1.SpeechModelVariant|null} [speechModelVariant] SpeechToTextConfig speechModelVariant */ /** - * Constructs a new SuggestFaqAnswersRequest. + * Constructs a new SpeechToTextConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestFaqAnswersRequest. - * @implements ISuggestFaqAnswersRequest + * @classdesc Represents a SpeechToTextConfig. + * @implements ISpeechToTextConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig=} [properties] Properties to set */ - function SuggestFaqAnswersRequest(properties) { + function SpeechToTextConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92128,114 +91683,75 @@ } /** - * SuggestFaqAnswersRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest - * @instance - */ - SuggestFaqAnswersRequest.prototype.parent = ""; - - /** - * SuggestFaqAnswersRequest latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest - * @instance - */ - SuggestFaqAnswersRequest.prototype.latestMessage = ""; - - /** - * SuggestFaqAnswersRequest contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest - * @instance - */ - SuggestFaqAnswersRequest.prototype.contextSize = 0; - - /** - * SuggestFaqAnswersRequest assistQueryParams. - * @member {google.cloud.dialogflow.v2beta1.IAssistQueryParameters|null|undefined} assistQueryParams - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * SpeechToTextConfig speechModelVariant. + * @member {google.cloud.dialogflow.v2beta1.SpeechModelVariant} speechModelVariant + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @instance */ - SuggestFaqAnswersRequest.prototype.assistQueryParams = null; + SpeechToTextConfig.prototype.speechModelVariant = 0; /** - * Creates a new SuggestFaqAnswersRequest instance using the specified properties. + * Creates a new SpeechToTextConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig instance */ - SuggestFaqAnswersRequest.create = function create(properties) { - return new SuggestFaqAnswersRequest(properties); + SpeechToTextConfig.create = function create(properties) { + return new SpeechToTextConfig(properties); }; /** - * Encodes the specified SuggestFaqAnswersRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. + * Encodes the specified SpeechToTextConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} message SuggestFaqAnswersRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig} message SpeechToTextConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestFaqAnswersRequest.encode = function encode(message, writer) { + SpeechToTextConfig.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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); - if (message.assistQueryParams != null && Object.hasOwnProperty.call(message, "assistQueryParams")) - $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.encode(message.assistQueryParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.speechModelVariant != null && Object.hasOwnProperty.call(message, "speechModelVariant")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.speechModelVariant); return writer; }; /** - * Encodes the specified SuggestFaqAnswersRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.verify|verify} messages. + * Encodes the specified SpeechToTextConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersRequest} message SuggestFaqAnswersRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig} message SpeechToTextConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestFaqAnswersRequest.encodeDelimited = function encodeDelimited(message, writer) { + SpeechToTextConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer. + * Decodes a SpeechToTextConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest + * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestFaqAnswersRequest.decode = function decode(reader, length) { + SpeechToTextConfig.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.v2beta1.SuggestFaqAnswersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.latestMessage = reader.string(); - break; - case 3: - message.contextSize = reader.int32(); - break; - case 4: - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.decode(reader, reader.uint32()); + message.speechModelVariant = reader.int32(); break; default: reader.skipType(tag & 7); @@ -92246,140 +91762,236 @@ }; /** - * Decodes a SuggestFaqAnswersRequest message from the specified reader or buffer, length delimited. + * Decodes a SpeechToTextConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest + * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestFaqAnswersRequest.decodeDelimited = function decodeDelimited(reader) { + SpeechToTextConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestFaqAnswersRequest message. + * Verifies a SpeechToTextConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestFaqAnswersRequest.verify = function verify(message) { + SpeechToTextConfig.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.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) { - var error = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.verify(message.assistQueryParams); - if (error) - return "assistQueryParams." + error; - } + if (message.speechModelVariant != null && message.hasOwnProperty("speechModelVariant")) + switch (message.speechModelVariant) { + default: + return "speechModelVariant: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a SuggestFaqAnswersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechToTextConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} SuggestFaqAnswersRequest + * @returns {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} SpeechToTextConfig */ - SuggestFaqAnswersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest) + SpeechToTextConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; - if (object.assistQueryParams != null) { - if (typeof object.assistQueryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.assistQueryParams: object expected"); - message.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.fromObject(object.assistQueryParams); + var message = new $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig(); + switch (object.speechModelVariant) { + case "SPEECH_MODEL_VARIANT_UNSPECIFIED": + case 0: + message.speechModelVariant = 0; + break; + case "USE_BEST_AVAILABLE": + case 1: + message.speechModelVariant = 1; + break; + case "USE_STANDARD": + case 2: + message.speechModelVariant = 2; + break; + case "USE_ENHANCED": + case 3: + message.speechModelVariant = 3; + break; } return message; }; /** - * Creates a plain object from a SuggestFaqAnswersRequest message. Also converts values to other types if specified. + * Creates a plain object from a SpeechToTextConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest} message SuggestFaqAnswersRequest + * @param {google.cloud.dialogflow.v2beta1.SpeechToTextConfig} message SpeechToTextConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestFaqAnswersRequest.toObject = function toObject(message, options) { + SpeechToTextConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.latestMessage = ""; - object.contextSize = 0; - object.assistQueryParams = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; - if (message.assistQueryParams != null && message.hasOwnProperty("assistQueryParams")) - object.assistQueryParams = $root.google.cloud.dialogflow.v2beta1.AssistQueryParameters.toObject(message.assistQueryParams, options); + if (options.defaults) + object.speechModelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; + if (message.speechModelVariant != null && message.hasOwnProperty("speechModelVariant")) + object.speechModelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SpeechModelVariant[message.speechModelVariant] : message.speechModelVariant; return object; }; /** - * Converts this SuggestFaqAnswersRequest to JSON. + * Converts this SpeechToTextConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest + * @memberof google.cloud.dialogflow.v2beta1.SpeechToTextConfig * @instance * @returns {Object.} JSON object */ - SuggestFaqAnswersRequest.prototype.toJSON = function toJSON() { + SpeechToTextConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestFaqAnswersRequest; + return SpeechToTextConfig; })(); - v2beta1.SuggestFaqAnswersResponse = (function() { + v2beta1.Sessions = (function() { /** - * Properties of a SuggestFaqAnswersResponse. + * Constructs a new Sessions service. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestFaqAnswersResponse - * @property {Array.|null} [faqAnswers] SuggestFaqAnswersResponse faqAnswers - * @property {string|null} [latestMessage] SuggestFaqAnswersResponse latestMessage - * @property {number|null} [contextSize] SuggestFaqAnswersResponse contextSize + * @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); + } + + (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; /** - * Constructs a new SuggestFaqAnswersResponse. + * Creates new Sessions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Sessions#detectIntent}. + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @typedef DetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.DetectIntentResponse} [response] DetectIntentResponse + */ + + /** + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DetectIntentRequest, $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse, request, callback); + }, "name", { value: "DetectIntent" }); + + /** + * Calls DetectIntent. + * @function detectIntent + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} request DetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#streamingDetectIntent}. + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @typedef StreamingDetectIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse + */ + + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse, request, callback); + }, "name", { value: "StreamingDetectIntent" }); + + /** + * Calls StreamingDetectIntent. + * @function streamingDetectIntent + * @memberof google.cloud.dialogflow.v2beta1.Sessions + * @instance + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Sessions; + })(); + + v2beta1.DetectIntentRequest = (function() { + + /** + * Properties of a DetectIntentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestFaqAnswersResponse. - * @implements ISuggestFaqAnswersResponse + * @interface IDetectIntentRequest + * @property {string|null} [session] DetectIntentRequest session + * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams + * @property {google.cloud.dialogflow.v2beta1.IQueryInput|null} [queryInput] DetectIntentRequest queryInput + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig + * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] DetectIntentRequest outputAudioConfigMask + * @property {Uint8Array|null} [inputAudio] DetectIntentRequest inputAudio + */ + + /** + * Constructs a new DetectIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a DetectIntentRequest. + * @implements IDetectIntentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest=} [properties] Properties to set */ - function SuggestFaqAnswersResponse(properties) { - this.faqAnswers = []; + function DetectIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92387,104 +91999,140 @@ } /** - * SuggestFaqAnswersResponse faqAnswers. - * @member {Array.} faqAnswers - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * DetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @instance */ - SuggestFaqAnswersResponse.prototype.faqAnswers = $util.emptyArray; + DetectIntentRequest.prototype.session = ""; /** - * SuggestFaqAnswersResponse latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * DetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @instance */ - SuggestFaqAnswersResponse.prototype.latestMessage = ""; + DetectIntentRequest.prototype.queryParams = null; /** - * SuggestFaqAnswersResponse contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * DetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.v2beta1.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @instance */ - SuggestFaqAnswersResponse.prototype.contextSize = 0; + DetectIntentRequest.prototype.queryInput = null; /** - * Creates a new SuggestFaqAnswersResponse instance using the specified properties. + * DetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.outputAudioConfig = null; + + /** + * DetectIntentRequest outputAudioConfigMask. + * @member {google.protobuf.IFieldMask|null|undefined} outputAudioConfigMask + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.outputAudioConfigMask = null; + + /** + * DetectIntentRequest inputAudio. + * @member {Uint8Array} inputAudio + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @instance + */ + DetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); + + /** + * Creates a new DetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse instance + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest instance */ - SuggestFaqAnswersResponse.create = function create(properties) { - return new SuggestFaqAnswersResponse(properties); + DetectIntentRequest.create = function create(properties) { + return new DetectIntentRequest(properties); }; /** - * Encodes the specified SuggestFaqAnswersResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. + * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse} message SuggestFaqAnswersResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestFaqAnswersResponse.encode = function encode(message, writer) { + DetectIntentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.faqAnswers != null && message.faqAnswers.length) - for (var i = 0; i < message.faqAnswers.length; ++i) - $root.google.cloud.dialogflow.v2beta1.FaqAnswer.encode(message.faqAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + 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.v2beta1.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.v2beta1.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.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inputAudio != null && Object.hasOwnProperty.call(message, "inputAudio")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.inputAudio); + if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) + $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified SuggestFaqAnswersResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.verify|verify} messages. + * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestFaqAnswersResponse} message SuggestFaqAnswersResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestFaqAnswersResponse.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestFaqAnswersResponse message from the specified reader or buffer. + * Decodes a DetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestFaqAnswersResponse.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.v2beta1.SuggestFaqAnswersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.faqAnswers && message.faqAnswers.length)) - message.faqAnswers = []; - message.faqAnswers.push($root.google.cloud.dialogflow.v2beta1.FaqAnswer.decode(reader, reader.uint32())); + message.session = reader.string(); break; case 2: - message.latestMessage = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); break; case 3: - message.contextSize = reader.int32(); + message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.decode(reader, reader.uint32()); + break; + case 4: + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + break; + case 7: + message.outputAudioConfigMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 5: + message.inputAudio = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -92495,145 +92143,183 @@ }; /** - * Decodes a SuggestFaqAnswersResponse 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.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestFaqAnswersResponse.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 SuggestFaqAnswersResponse message. + * Verifies a DetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestFaqAnswersResponse.verify = function verify(message) { + DetectIntentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.faqAnswers != null && message.hasOwnProperty("faqAnswers")) { - if (!Array.isArray(message.faqAnswers)) - return "faqAnswers: array expected"; - for (var i = 0; i < message.faqAnswers.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.verify(message.faqAnswers[i]); - if (error) - return "faqAnswers." + 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.v2beta1.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; + } + if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.outputAudioConfigMask); + if (error) + return "outputAudioConfigMask." + error; + } + if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) + if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) + return "inputAudio: buffer expected"; return null; }; /** - * Creates a SuggestFaqAnswersResponse 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.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} SuggestFaqAnswersResponse + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest */ - SuggestFaqAnswersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse) + DetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DetectIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse(); - if (object.faqAnswers) { - if (!Array.isArray(object.faqAnswers)) - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.faqAnswers: array expected"); - message.faqAnswers = []; - for (var i = 0; i < object.faqAnswers.length; ++i) { - if (typeof object.faqAnswers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.faqAnswers: object expected"); - message.faqAnswers[i] = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.fromObject(object.faqAnswers[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.fromObject(object.queryInput); + } + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); + } + if (object.outputAudioConfigMask != null) { + if (typeof object.outputAudioConfigMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.outputAudioConfigMask: object expected"); + message.outputAudioConfigMask = $root.google.protobuf.FieldMask.fromObject(object.outputAudioConfigMask); + } + if (object.inputAudio != null) + if (typeof object.inputAudio === "string") + $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); + else if (object.inputAudio.length) + message.inputAudio = object.inputAudio; return message; }; /** - * Creates a plain object from a SuggestFaqAnswersResponse 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.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse} message SuggestFaqAnswersResponse + * @param {google.cloud.dialogflow.v2beta1.DetectIntentRequest} message DetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestFaqAnswersResponse.toObject = function toObject(message, options) { + DetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.faqAnswers = []; if (options.defaults) { - object.latestMessage = ""; - object.contextSize = 0; - } - if (message.faqAnswers && message.faqAnswers.length) { - object.faqAnswers = []; - for (var j = 0; j < message.faqAnswers.length; ++j) - object.faqAnswers[j] = $root.google.cloud.dialogflow.v2beta1.FaqAnswer.toObject(message.faqAnswers[j], options); + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.outputAudioConfig = null; + if (options.bytes === String) + object.inputAudio = ""; + else { + object.inputAudio = []; + if (options.bytes !== Array) + object.inputAudio = $util.newBuffer(object.inputAudio); + } + object.outputAudioConfigMask = null; } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.toObject(message.queryInput, options); + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) + object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; + if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) + object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); return object; }; /** - * Converts this SuggestFaqAnswersResponse to JSON. + * Converts this DetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest * @instance * @returns {Object.} JSON object */ - SuggestFaqAnswersResponse.prototype.toJSON = function toJSON() { + DetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestFaqAnswersResponse; + return DetectIntentRequest; })(); - v2beta1.SuggestSmartRepliesRequest = (function() { + v2beta1.DetectIntentResponse = (function() { /** - * Properties of a SuggestSmartRepliesRequest. + * Properties of a DetectIntentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestSmartRepliesRequest - * @property {string|null} [parent] SuggestSmartRepliesRequest parent - * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [currentTextInput] SuggestSmartRepliesRequest currentTextInput - * @property {string|null} [latestMessage] SuggestSmartRepliesRequest latestMessage - * @property {number|null} [contextSize] SuggestSmartRepliesRequest contextSize + * @interface IDetectIntentResponse + * @property {string|null} [responseId] DetectIntentResponse responseId + * @property {google.cloud.dialogflow.v2beta1.IQueryResult|null} [queryResult] DetectIntentResponse queryResult + * @property {Array.|null} [alternativeQueryResults] DetectIntentResponse alternativeQueryResults + * @property {google.rpc.IStatus|null} [webhookStatus] DetectIntentResponse webhookStatus + * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig */ /** - * Constructs a new SuggestSmartRepliesRequest. + * Constructs a new DetectIntentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestSmartRepliesRequest. - * @implements ISuggestSmartRepliesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest=} [properties] Properties to set + * @classdesc Represents a DetectIntentResponse. + * @implements IDetectIntentResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse=} [properties] Properties to set */ - function SuggestSmartRepliesRequest(properties) { + function DetectIntentResponse(properties) { + this.alternativeQueryResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92641,114 +92327,143 @@ } /** - * SuggestSmartRepliesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * DetectIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @instance */ - SuggestSmartRepliesRequest.prototype.parent = ""; + DetectIntentResponse.prototype.responseId = ""; /** - * SuggestSmartRepliesRequest currentTextInput. - * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} currentTextInput - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * DetectIntentResponse queryResult. + * @member {google.cloud.dialogflow.v2beta1.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @instance */ - SuggestSmartRepliesRequest.prototype.currentTextInput = null; + DetectIntentResponse.prototype.queryResult = null; /** - * SuggestSmartRepliesRequest latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * DetectIntentResponse alternativeQueryResults. + * @member {Array.} alternativeQueryResults + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @instance */ - SuggestSmartRepliesRequest.prototype.latestMessage = ""; + DetectIntentResponse.prototype.alternativeQueryResults = $util.emptyArray; /** - * SuggestSmartRepliesRequest contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * DetectIntentResponse webhookStatus. + * @member {google.rpc.IStatus|null|undefined} webhookStatus + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @instance */ - SuggestSmartRepliesRequest.prototype.contextSize = 0; + DetectIntentResponse.prototype.webhookStatus = null; /** - * Creates a new SuggestSmartRepliesRequest instance using the specified properties. + * DetectIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @instance + */ + DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); + + /** + * DetectIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @instance + */ + DetectIntentResponse.prototype.outputAudioConfig = null; + + /** + * Creates a new DetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse instance */ - SuggestSmartRepliesRequest.create = function create(properties) { - return new SuggestSmartRepliesRequest(properties); + DetectIntentResponse.create = function create(properties) { + return new DetectIntentResponse(properties); }; /** - * Encodes the specified SuggestSmartRepliesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. + * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} message SuggestSmartRepliesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestSmartRepliesRequest.encode = function encode(message, writer) { + DetectIntentResponse.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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); - if (message.currentTextInput != null && Object.hasOwnProperty.call(message, "currentTextInput")) - $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.currentTextInput, writer.uint32(/* id 4, wireType 2 =*/34).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.v2beta1.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webhookStatus != null && Object.hasOwnProperty.call(message, "webhookStatus")) + $root.google.rpc.Status.encode(message.webhookStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); + if (message.alternativeQueryResults != null && message.alternativeQueryResults.length) + for (var i = 0; i < message.alternativeQueryResults.length; ++i) + $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.alternativeQueryResults[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified SuggestSmartRepliesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.verify|verify} messages. + * Encodes the specified DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesRequest} message SuggestSmartRepliesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestSmartRepliesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestSmartRepliesRequest message from the specified reader or buffer. + * Decodes a DetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestSmartRepliesRequest.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.v2beta1.SuggestSmartRepliesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 4: - message.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); + message.responseId = reader.string(); break; case 2: - message.latestMessage = reader.string(); + message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.alternativeQueryResults && message.alternativeQueryResults.length)) + message.alternativeQueryResults = []; + message.alternativeQueryResults.push($root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32())); break; case 3: - message.contextSize = reader.int32(); + message.webhookStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 4: + message.outputAudio = reader.bytes(); + break; + case 6: + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -92759,140 +92474,204 @@ }; /** - * Decodes a SuggestSmartRepliesRequest 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.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestSmartRepliesRequest.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 SuggestSmartRepliesRequest message. + * Verifies a DetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestSmartRepliesRequest.verify = function verify(message) { + DetectIntentResponse.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.currentTextInput != null && message.hasOwnProperty("currentTextInput")) { - var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.currentTextInput); + 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.v2beta1.QueryResult.verify(message.queryResult); if (error) - return "currentTextInput." + error; + return "queryResult." + error; + } + if (message.alternativeQueryResults != null && message.hasOwnProperty("alternativeQueryResults")) { + if (!Array.isArray(message.alternativeQueryResults)) + return "alternativeQueryResults: array expected"; + for (var i = 0; i < message.alternativeQueryResults.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.alternativeQueryResults[i]); + if (error) + return "alternativeQueryResults." + error; + } + } + if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) { + var error = $root.google.rpc.Status.verify(message.webhookStatus); + if (error) + return "webhookStatus." + 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.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; return null; }; /** - * Creates a SuggestSmartRepliesRequest 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.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} SuggestSmartRepliesRequest + * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse */ - SuggestSmartRepliesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest) + DetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.currentTextInput != null) { - if (typeof object.currentTextInput !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.currentTextInput: object expected"); - message.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.currentTextInput); + var message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.queryResult); + } + if (object.alternativeQueryResults) { + if (!Array.isArray(object.alternativeQueryResults)) + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.alternativeQueryResults: array expected"); + message.alternativeQueryResults = []; + for (var i = 0; i < object.alternativeQueryResults.length; ++i) { + if (typeof object.alternativeQueryResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.alternativeQueryResults: object expected"); + message.alternativeQueryResults[i] = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.alternativeQueryResults[i]); + } + } + if (object.webhookStatus != null) { + if (typeof object.webhookStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.webhookStatus: object expected"); + message.webhookStatus = $root.google.rpc.Status.fromObject(object.webhookStatus); + } + 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.v2beta1.DetectIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a SuggestSmartRepliesRequest 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.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest} message SuggestSmartRepliesRequest + * @param {google.cloud.dialogflow.v2beta1.DetectIntentResponse} message DetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestSmartRepliesRequest.toObject = function toObject(message, options) { + DetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.alternativeQueryResults = []; if (options.defaults) { - object.parent = ""; - object.latestMessage = ""; - object.contextSize = 0; - object.currentTextInput = null; + object.responseId = ""; + object.queryResult = null; + object.webhookStatus = 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.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; - if (message.currentTextInput != null && message.hasOwnProperty("currentTextInput")) - object.currentTextInput = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.currentTextInput, 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.v2beta1.QueryResult.toObject(message.queryResult, options); + if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) + object.webhookStatus = $root.google.rpc.Status.toObject(message.webhookStatus, 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.alternativeQueryResults && message.alternativeQueryResults.length) { + object.alternativeQueryResults = []; + for (var j = 0; j < message.alternativeQueryResults.length; ++j) + object.alternativeQueryResults[j] = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.alternativeQueryResults[j], options); + } + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); return object; }; /** - * Converts this SuggestSmartRepliesRequest to JSON. + * Converts this DetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest + * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse * @instance * @returns {Object.} JSON object */ - SuggestSmartRepliesRequest.prototype.toJSON = function toJSON() { + DetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestSmartRepliesRequest; + return DetectIntentResponse; })(); - v2beta1.SuggestSmartRepliesResponse = (function() { + v2beta1.QueryParameters = (function() { /** - * Properties of a SuggestSmartRepliesResponse. + * Properties of a QueryParameters. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestSmartRepliesResponse - * @property {Array.|null} [smartReplyAnswers] SuggestSmartRepliesResponse smartReplyAnswers - * @property {string|null} [latestMessage] SuggestSmartRepliesResponse latestMessage - * @property {number|null} [contextSize] SuggestSmartRepliesResponse contextSize + * @interface IQueryParameters + * @property {string|null} [timeZone] QueryParameters timeZone + * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation + * @property {Array.|null} [contexts] QueryParameters contexts + * @property {boolean|null} [resetContexts] QueryParameters resetContexts + * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes + * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload + * @property {Array.|null} [knowledgeBaseNames] QueryParameters knowledgeBaseNames + * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null} [sentimentAnalysisRequestConfig] QueryParameters sentimentAnalysisRequestConfig + * @property {Array.|null} [subAgents] QueryParameters subAgents + * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders */ /** - * Constructs a new SuggestSmartRepliesResponse. + * Constructs a new QueryParameters. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SuggestSmartRepliesResponse. - * @implements ISuggestSmartRepliesResponse + * @classdesc Represents a QueryParameters. + * @implements IQueryParameters * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IQueryParameters=} [properties] Properties to set */ - function SuggestSmartRepliesResponse(properties) { - this.smartReplyAnswers = []; + function QueryParameters(properties) { + this.contexts = []; + this.sessionEntityTypes = []; + this.knowledgeBaseNames = []; + this.subAgents = []; + this.webhookHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -92900,256 +92679,506 @@ } /** - * SuggestSmartRepliesResponse smartReplyAnswers. - * @member {Array.} smartReplyAnswers - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * QueryParameters timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @instance */ - SuggestSmartRepliesResponse.prototype.smartReplyAnswers = $util.emptyArray; + QueryParameters.prototype.timeZone = ""; /** - * SuggestSmartRepliesResponse latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * QueryParameters geoLocation. + * @member {google.type.ILatLng|null|undefined} geoLocation + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @instance */ - SuggestSmartRepliesResponse.prototype.latestMessage = ""; + QueryParameters.prototype.geoLocation = null; /** - * SuggestSmartRepliesResponse contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * QueryParameters contexts. + * @member {Array.} contexts + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @instance */ - SuggestSmartRepliesResponse.prototype.contextSize = 0; + QueryParameters.prototype.contexts = $util.emptyArray; /** - * Creates a new SuggestSmartRepliesResponse instance using the specified properties. + * QueryParameters resetContexts. + * @member {boolean} resetContexts + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.resetContexts = false; + + /** + * QueryParameters sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; + + /** + * QueryParameters payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.payload = null; + + /** + * QueryParameters knowledgeBaseNames. + * @member {Array.} knowledgeBaseNames + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.knowledgeBaseNames = $util.emptyArray; + + /** + * QueryParameters sentimentAnalysisRequestConfig. + * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null|undefined} sentimentAnalysisRequestConfig + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.sentimentAnalysisRequestConfig = null; + + /** + * QueryParameters subAgents. + * @member {Array.} subAgents + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.subAgents = $util.emptyArray; + + /** + * QueryParameters webhookHeaders. + * @member {Object.} webhookHeaders + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @instance + */ + QueryParameters.prototype.webhookHeaders = $util.emptyObject; + + /** + * Creates a new QueryParameters instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse instance + * @param {google.cloud.dialogflow.v2beta1.IQueryParameters=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters instance */ - SuggestSmartRepliesResponse.create = function create(properties) { - return new SuggestSmartRepliesResponse(properties); + QueryParameters.create = function create(properties) { + return new QueryParameters(properties); }; /** - * Encodes the specified SuggestSmartRepliesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. + * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse} message SuggestSmartRepliesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestSmartRepliesResponse.encode = function encode(message, writer) { + QueryParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.smartReplyAnswers != null && message.smartReplyAnswers.length) - for (var i = 0; i < message.smartReplyAnswers.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.encode(message.smartReplyAnswers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + 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.contexts != null && message.contexts.length) + for (var i = 0; i < message.contexts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.contexts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resetContexts != null && Object.hasOwnProperty.call(message, "resetContexts")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.resetContexts); + if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) + for (var i = 0; i < message.sessionEntityTypes.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sentimentAnalysisRequestConfig != null && Object.hasOwnProperty.call(message, "sentimentAnalysisRequestConfig")) + $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.encode(message.sentimentAnalysisRequestConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.knowledgeBaseNames != null && message.knowledgeBaseNames.length) + for (var i = 0; i < message.knowledgeBaseNames.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.knowledgeBaseNames[i]); + if (message.subAgents != null && message.subAgents.length) + for (var i = 0; i < message.subAgents.length; ++i) + $root.google.cloud.dialogflow.v2beta1.SubAgent.encode(message.subAgents[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + 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 14, wireType 2 =*/114).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 SuggestSmartRepliesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.verify|verify} messages. + * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestSmartRepliesResponse} message SuggestSmartRepliesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryParameters} message QueryParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestSmartRepliesResponse.encodeDelimited = function encodeDelimited(message, writer) { + QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer. + * Decodes a QueryParameters message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse + * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestSmartRepliesResponse.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.v2beta1.SuggestSmartRepliesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.QueryParameters(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.smartReplyAnswers && message.smartReplyAnswers.length)) - message.smartReplyAnswers = []; - message.smartReplyAnswers.push($root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.decode(reader, reader.uint32())); + message.timeZone = reader.string(); break; case 2: - message.latestMessage = reader.string(); + message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); break; case 3: - message.contextSize = reader.int32(); + if (!(message.contexts && message.contexts.length)) + message.contexts = []; + message.contexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); break; - default: - reader.skipType(tag & 7); + case 4: + message.resetContexts = reader.bool(); break; - } - } - return message; - }; - - /** - * Decodes a SuggestSmartRepliesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestSmartRepliesResponse.decodeDelimited = function decodeDelimited(reader) { + case 5: + if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) + message.sessionEntityTypes = []; + message.sessionEntityTypes.push($root.google.cloud.dialogflow.v2beta1.SessionEntityType.decode(reader, reader.uint32())); + break; + case 6: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 12: + if (!(message.knowledgeBaseNames && message.knowledgeBaseNames.length)) + message.knowledgeBaseNames = []; + message.knowledgeBaseNames.push(reader.string()); + break; + case 10: + message.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.decode(reader, reader.uint32()); + break; + case 13: + if (!(message.subAgents && message.subAgents.length)) + message.subAgents = []; + message.subAgents.push($root.google.cloud.dialogflow.v2beta1.SubAgent.decode(reader, reader.uint32())); + break; + case 14: + 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); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters + * @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) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestSmartRepliesResponse message. + * Verifies a QueryParameters message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestSmartRepliesResponse.verify = function verify(message) { + QueryParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.smartReplyAnswers != null && message.hasOwnProperty("smartReplyAnswers")) { - if (!Array.isArray(message.smartReplyAnswers)) - return "smartReplyAnswers: array expected"; - for (var i = 0; i < message.smartReplyAnswers.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.verify(message.smartReplyAnswers[i]); + 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.contexts != null && message.hasOwnProperty("contexts")) { + if (!Array.isArray(message.contexts)) + return "contexts: array expected"; + for (var i = 0; i < message.contexts.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.contexts[i]); if (error) - return "smartReplyAnswers." + error; + return "contexts." + error; } } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; + if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) + if (typeof message.resetContexts !== "boolean") + return "resetContexts: boolean 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.v2beta1.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.knowledgeBaseNames != null && message.hasOwnProperty("knowledgeBaseNames")) { + if (!Array.isArray(message.knowledgeBaseNames)) + return "knowledgeBaseNames: array expected"; + for (var i = 0; i < message.knowledgeBaseNames.length; ++i) + if (!$util.isString(message.knowledgeBaseNames[i])) + return "knowledgeBaseNames: string[] expected"; + } + if (message.sentimentAnalysisRequestConfig != null && message.hasOwnProperty("sentimentAnalysisRequestConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify(message.sentimentAnalysisRequestConfig); + if (error) + return "sentimentAnalysisRequestConfig." + error; + } + if (message.subAgents != null && message.hasOwnProperty("subAgents")) { + if (!Array.isArray(message.subAgents)) + return "subAgents: array expected"; + for (var i = 0; i < message.subAgents.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SubAgent.verify(message.subAgents[i]); + if (error) + return "subAgents." + error; + } + } + 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 SuggestSmartRepliesResponse 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.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} SuggestSmartRepliesResponse + * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters */ - SuggestSmartRepliesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse) + QueryParameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryParameters) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse(); - if (object.smartReplyAnswers) { - if (!Array.isArray(object.smartReplyAnswers)) - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.smartReplyAnswers: array expected"); - message.smartReplyAnswers = []; - for (var i = 0; i < object.smartReplyAnswers.length; ++i) { - if (typeof object.smartReplyAnswers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.smartReplyAnswers: object expected"); - message.smartReplyAnswers[i] = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.fromObject(object.smartReplyAnswers[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.QueryParameters(); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.geoLocation != null) { + if (typeof object.geoLocation !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.geoLocation: object expected"); + message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); + } + if (object.contexts) { + if (!Array.isArray(object.contexts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.contexts: array expected"); + message.contexts = []; + for (var i = 0; i < object.contexts.length; ++i) { + if (typeof object.contexts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.contexts: object expected"); + message.contexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.contexts[i]); } } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; + if (object.resetContexts != null) + message.resetContexts = Boolean(object.resetContexts); + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.QueryParameters.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityTypes[i]); + } + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.knowledgeBaseNames) { + if (!Array.isArray(object.knowledgeBaseNames)) + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.knowledgeBaseNames: array expected"); + message.knowledgeBaseNames = []; + for (var i = 0; i < object.knowledgeBaseNames.length; ++i) + message.knowledgeBaseNames[i] = String(object.knowledgeBaseNames[i]); + } + if (object.sentimentAnalysisRequestConfig != null) { + if (typeof object.sentimentAnalysisRequestConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.sentimentAnalysisRequestConfig: object expected"); + message.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.fromObject(object.sentimentAnalysisRequestConfig); + } + if (object.subAgents) { + if (!Array.isArray(object.subAgents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.subAgents: array expected"); + message.subAgents = []; + for (var i = 0; i < object.subAgents.length; ++i) { + if (typeof object.subAgents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.subAgents: object expected"); + message.subAgents[i] = $root.google.cloud.dialogflow.v2beta1.SubAgent.fromObject(object.subAgents[i]); + } + } + if (object.webhookHeaders) { + if (typeof object.webhookHeaders !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.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 SuggestSmartRepliesResponse 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.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @static - * @param {google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse} message SuggestSmartRepliesResponse + * @param {google.cloud.dialogflow.v2beta1.QueryParameters} message QueryParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestSmartRepliesResponse.toObject = function toObject(message, options) { + QueryParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.smartReplyAnswers = []; + if (options.arrays || options.defaults) { + object.contexts = []; + object.sessionEntityTypes = []; + object.knowledgeBaseNames = []; + object.subAgents = []; + } + if (options.objects || options.defaults) + object.webhookHeaders = {}; if (options.defaults) { - object.latestMessage = ""; - object.contextSize = 0; + object.timeZone = ""; + object.geoLocation = null; + object.resetContexts = false; + object.payload = null; + object.sentimentAnalysisRequestConfig = null; } - if (message.smartReplyAnswers && message.smartReplyAnswers.length) { - object.smartReplyAnswers = []; - for (var j = 0; j < message.smartReplyAnswers.length; ++j) - object.smartReplyAnswers[j] = $root.google.cloud.dialogflow.v2beta1.SmartReplyAnswer.toObject(message.smartReplyAnswers[j], options); + 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.contexts && message.contexts.length) { + object.contexts = []; + for (var j = 0; j < message.contexts.length; ++j) + object.contexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.contexts[j], options); + } + if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) + object.resetContexts = message.resetContexts; + if (message.sessionEntityTypes && message.sessionEntityTypes.length) { + object.sessionEntityTypes = []; + for (var j = 0; j < message.sessionEntityTypes.length; ++j) + object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.v2beta1.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.sentimentAnalysisRequestConfig != null && message.hasOwnProperty("sentimentAnalysisRequestConfig")) + object.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.toObject(message.sentimentAnalysisRequestConfig, options); + if (message.knowledgeBaseNames && message.knowledgeBaseNames.length) { + object.knowledgeBaseNames = []; + for (var j = 0; j < message.knowledgeBaseNames.length; ++j) + object.knowledgeBaseNames[j] = message.knowledgeBaseNames[j]; + } + if (message.subAgents && message.subAgents.length) { + object.subAgents = []; + for (var j = 0; j < message.subAgents.length; ++j) + object.subAgents[j] = $root.google.cloud.dialogflow.v2beta1.SubAgent.toObject(message.subAgents[j], options); + } + 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.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; return object; }; /** - * Converts this SuggestSmartRepliesResponse to JSON. + * Converts this QueryParameters to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse + * @memberof google.cloud.dialogflow.v2beta1.QueryParameters * @instance * @returns {Object.} JSON object */ - SuggestSmartRepliesResponse.prototype.toJSON = function toJSON() { + QueryParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SuggestSmartRepliesResponse; + return QueryParameters; })(); - v2beta1.Suggestion = (function() { + v2beta1.QueryInput = (function() { /** - * Properties of a Suggestion. + * Properties of a QueryInput. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISuggestion - * @property {string|null} [name] Suggestion name - * @property {Array.|null} [articles] Suggestion articles - * @property {Array.|null} [faqAnswers] Suggestion faqAnswers - * @property {google.protobuf.ITimestamp|null} [createTime] Suggestion createTime - * @property {string|null} [latestMessage] Suggestion latestMessage + * @interface IQueryInput + * @property {google.cloud.dialogflow.v2beta1.IInputAudioConfig|null} [audioConfig] QueryInput audioConfig + * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [text] QueryInput text + * @property {google.cloud.dialogflow.v2beta1.IEventInput|null} [event] QueryInput event + * @property {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null} [dtmf] QueryInput dtmf */ /** - * Constructs a new Suggestion. + * Constructs a new QueryInput. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Suggestion. - * @implements ISuggestion + * @classdesc Represents a QueryInput. + * @implements IQueryInput * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISuggestion=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IQueryInput=} [properties] Properties to set */ - function Suggestion(properties) { - this.articles = []; - this.faqAnswers = []; + function QueryInput(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -93157,133 +93186,128 @@ } /** - * Suggestion name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * QueryInput audioConfig. + * @member {google.cloud.dialogflow.v2beta1.IInputAudioConfig|null|undefined} audioConfig + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance */ - Suggestion.prototype.name = ""; + QueryInput.prototype.audioConfig = null; /** - * Suggestion articles. - * @member {Array.} articles - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * QueryInput text. + * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} text + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance */ - Suggestion.prototype.articles = $util.emptyArray; + QueryInput.prototype.text = null; /** - * Suggestion faqAnswers. - * @member {Array.} faqAnswers - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * QueryInput event. + * @member {google.cloud.dialogflow.v2beta1.IEventInput|null|undefined} event + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance */ - Suggestion.prototype.faqAnswers = $util.emptyArray; + QueryInput.prototype.event = null; /** - * Suggestion createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * QueryInput dtmf. + * @member {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null|undefined} dtmf + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance */ - Suggestion.prototype.createTime = null; + QueryInput.prototype.dtmf = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Suggestion latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * QueryInput input. + * @member {"audioConfig"|"text"|"event"|"dtmf"|undefined} input + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance */ - Suggestion.prototype.latestMessage = ""; + Object.defineProperty(QueryInput.prototype, "input", { + get: $util.oneOfGetter($oneOfFields = ["audioConfig", "text", "event", "dtmf"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Suggestion instance using the specified properties. + * Creates a new QueryInput instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion instance + * @param {google.cloud.dialogflow.v2beta1.IQueryInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput instance */ - Suggestion.create = function create(properties) { - return new Suggestion(properties); + QueryInput.create = function create(properties) { + return new QueryInput(properties); }; /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. + * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestion} message Suggestion message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Suggestion.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.articles != null && message.articles.length) - for (var i = 0; i < message.articles.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.encode(message.articles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.faqAnswers != null && message.faqAnswers.length) - for (var i = 0; i < message.faqAnswers.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.encode(message.faqAnswers[i], 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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.latestMessage); + if (message.audioConfig != null && Object.hasOwnProperty.call(message, "audioConfig")) + $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.encode(message.audioConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.google.cloud.dialogflow.v2beta1.EventInput.encode(message.event, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) + $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.encode(message.dtmf, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.verify|verify} messages. + * Encodes the specified QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static - * @param {google.cloud.dialogflow.v2beta1.ISuggestion} message Suggestion message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryInput} message QueryInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Suggestion.encodeDelimited = function encodeDelimited(message, writer) { + QueryInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Suggestion message from the specified reader or buffer. + * Decodes a QueryInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Suggestion} Suggestion + * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Suggestion.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.v2beta1.Suggestion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.QueryInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.decode(reader, reader.uint32()); break; case 2: - if (!(message.articles && message.articles.length)) - message.articles = []; - message.articles.push($root.google.cloud.dialogflow.v2beta1.Suggestion.Article.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.faqAnswers && message.faqAnswers.length)) - message.faqAnswers = []; - message.faqAnswers.push($root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.decode(reader, reader.uint32())); + message.text = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: + message.event = $root.google.cloud.dialogflow.v2beta1.EventInput.decode(reader, reader.uint32()); break; - case 7: - message.latestMessage = reader.string(); + case 4: + message.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -93294,962 +93318,485 @@ }; /** - * Decodes a Suggestion 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.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion + * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Suggestion.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 Suggestion message. + * Verifies a QueryInput message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Suggestion.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.articles != null && message.hasOwnProperty("articles")) { - if (!Array.isArray(message.articles)) - return "articles: array expected"; - for (var i = 0; i < message.articles.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.verify(message.articles[i]); + var properties = {}; + if (message.audioConfig != null && message.hasOwnProperty("audioConfig")) { + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.verify(message.audioConfig); if (error) - return "articles." + error; + return "audioConfig." + error; } } - if (message.faqAnswers != null && message.hasOwnProperty("faqAnswers")) { - if (!Array.isArray(message.faqAnswers)) - return "faqAnswers: array expected"; - for (var i = 0; i < message.faqAnswers.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify(message.faqAnswers[i]); + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.text); if (error) - return "faqAnswers." + error; + return "text." + error; } } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + 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.v2beta1.EventInput.verify(message.event); + if (error) + return "event." + error; + } } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - return null; - }; + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + if (properties.input === 1) + return "input: multiple values"; + properties.input = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify(message.dtmf); + if (error) + return "dtmf." + error; + } + } + return null; + }; /** - * Creates a Suggestion 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.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Suggestion} Suggestion + * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput */ - Suggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion) + QueryInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryInput) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion(); - if (object.name != null) - message.name = String(object.name); - if (object.articles) { - if (!Array.isArray(object.articles)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.articles: array expected"); - message.articles = []; - for (var i = 0; i < object.articles.length; ++i) { - if (typeof object.articles[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.articles: object expected"); - message.articles[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.fromObject(object.articles[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.QueryInput(); + if (object.audioConfig != null) { + if (typeof object.audioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.audioConfig: object expected"); + message.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.fromObject(object.audioConfig); } - if (object.faqAnswers) { - if (!Array.isArray(object.faqAnswers)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.faqAnswers: array expected"); - message.faqAnswers = []; - for (var i = 0; i < object.faqAnswers.length; ++i) { - if (typeof object.faqAnswers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.faqAnswers: object expected"); - message.faqAnswers[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.fromObject(object.faqAnswers[i]); - } + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.text: object expected"); + message.text = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.text); } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.event: object expected"); + message.event = $root.google.cloud.dialogflow.v2beta1.EventInput.fromObject(object.event); + } + if (object.dtmf != null) { + if (typeof object.dtmf !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.dtmf: object expected"); + message.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.fromObject(object.dtmf); } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); return message; }; /** - * Creates a plain object from a Suggestion 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.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion} message Suggestion + * @param {google.cloud.dialogflow.v2beta1.QueryInput} message QueryInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Suggestion.toObject = function toObject(message, options) { + QueryInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.articles = []; - object.faqAnswers = []; + if (message.audioConfig != null && message.hasOwnProperty("audioConfig")) { + object.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.toObject(message.audioConfig, options); + if (options.oneofs) + object.input = "audioConfig"; } - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.latestMessage = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.text, options); + if (options.oneofs) + object.input = "text"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.articles && message.articles.length) { - object.articles = []; - for (var j = 0; j < message.articles.length; ++j) - object.articles[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.Article.toObject(message.articles[j], options); + if (message.event != null && message.hasOwnProperty("event")) { + object.event = $root.google.cloud.dialogflow.v2beta1.EventInput.toObject(message.event, options); + if (options.oneofs) + object.input = "event"; } - if (message.faqAnswers && message.faqAnswers.length) { - object.faqAnswers = []; - for (var j = 0; j < message.faqAnswers.length; ++j) - object.faqAnswers[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.toObject(message.faqAnswers[j], options); + if (message.dtmf != null && message.hasOwnProperty("dtmf")) { + object.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.toObject(message.dtmf, options); + if (options.oneofs) + object.input = "dtmf"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; return object; }; /** - * Converts this Suggestion to JSON. + * Converts this QueryInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Suggestion + * @memberof google.cloud.dialogflow.v2beta1.QueryInput * @instance * @returns {Object.} JSON object */ - Suggestion.prototype.toJSON = function toJSON() { + QueryInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Suggestion.Article = (function() { + return QueryInput; + })(); - /** - * Properties of an Article. - * @memberof google.cloud.dialogflow.v2beta1.Suggestion - * @interface IArticle - * @property {string|null} [title] Article title - * @property {string|null} [uri] Article uri - * @property {Array.|null} [snippets] Article snippets - * @property {Object.|null} [metadata] Article metadata - * @property {string|null} [answerRecord] Article answerRecord - */ + v2beta1.QueryResult = (function() { - /** - * Constructs a new Article. - * @memberof google.cloud.dialogflow.v2beta1.Suggestion - * @classdesc Represents an Article. - * @implements IArticle - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle=} [properties] Properties to set - */ - function Article(properties) { - this.snippets = []; - this.metadata = {}; - 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 QueryResult. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IQueryResult + * @property {string|null} [queryText] QueryResult queryText + * @property {string|null} [languageCode] QueryResult languageCode + * @property {number|null} [speechRecognitionConfidence] QueryResult speechRecognitionConfidence + * @property {string|null} [action] QueryResult action + * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters + * @property {boolean|null} [allRequiredParamsPresent] QueryResult allRequiredParamsPresent + * @property {boolean|null} [cancelsSlotFilling] QueryResult cancelsSlotFilling + * @property {string|null} [fulfillmentText] QueryResult fulfillmentText + * @property {Array.|null} [fulfillmentMessages] QueryResult fulfillmentMessages + * @property {string|null} [webhookSource] QueryResult webhookSource + * @property {google.protobuf.IStruct|null} [webhookPayload] QueryResult webhookPayload + * @property {Array.|null} [outputContexts] QueryResult outputContexts + * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] QueryResult intent + * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence + * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo + * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult + * @property {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null} [knowledgeAnswers] QueryResult knowledgeAnswers + */ - /** - * Article title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - */ - Article.prototype.title = ""; + /** + * Constructs a new QueryResult. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a QueryResult. + * @implements IQueryResult + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IQueryResult=} [properties] Properties to set + */ + function QueryResult(properties) { + this.fulfillmentMessages = []; + this.outputContexts = []; + 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]]; + } - /** - * Article uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - */ - Article.prototype.uri = ""; + /** + * QueryResult queryText. + * @member {string} queryText + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.queryText = ""; - /** - * Article snippets. - * @member {Array.} snippets - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - */ - Article.prototype.snippets = $util.emptyArray; + /** + * QueryResult languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.languageCode = ""; - /** - * Article metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - */ - Article.prototype.metadata = $util.emptyObject; + /** + * QueryResult speechRecognitionConfidence. + * @member {number} speechRecognitionConfidence + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.speechRecognitionConfidence = 0; - /** - * Article answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - */ - Article.prototype.answerRecord = ""; + /** + * QueryResult action. + * @member {string} action + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.action = ""; - /** - * Creates a new Article instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article instance - */ - Article.create = function create(properties) { - return new Article(properties); - }; + /** + * QueryResult parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.parameters = null; - /** - * Encodes the specified Article message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle} message Article message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Article.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.snippets != null && message.snippets.length) - for (var i = 0; i < message.snippets.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snippets[i]); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); - return writer; - }; + /** + * QueryResult allRequiredParamsPresent. + * @member {boolean} allRequiredParamsPresent + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.allRequiredParamsPresent = false; - /** - * Encodes the specified Article message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.Article.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IArticle} message Article message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Article.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * QueryResult cancelsSlotFilling. + * @member {boolean} cancelsSlotFilling + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.cancelsSlotFilling = false; - /** - * Decodes an Article message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Article.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.v2beta1.Suggestion.Article(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.uri = reader.string(); - break; - case 3: - if (!(message.snippets && message.snippets.length)) - message.snippets = []; - message.snippets.push(reader.string()); - break; - case 5: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; - break; - case 6: - message.answerRecord = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * QueryResult fulfillmentText. + * @member {string} fulfillmentText + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.fulfillmentText = ""; - /** - * Decodes an Article message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Article.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * QueryResult fulfillmentMessages. + * @member {Array.} fulfillmentMessages + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.fulfillmentMessages = $util.emptyArray; - /** - * Verifies an Article message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Article.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.snippets != null && message.hasOwnProperty("snippets")) { - if (!Array.isArray(message.snippets)) - return "snippets: array expected"; - for (var i = 0; i < message.snippets.length; ++i) - if (!$util.isString(message.snippets[i])) - return "snippets: string[] expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string expected"; - return null; - }; + /** + * QueryResult webhookSource. + * @member {string} webhookSource + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.webhookSource = ""; - /** - * Creates an Article message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.Article} Article - */ - Article.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion.Article) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion.Article(); - if (object.title != null) - message.title = String(object.title); - if (object.uri != null) - message.uri = String(object.uri); - if (object.snippets) { - if (!Array.isArray(object.snippets)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.Article.snippets: array expected"); - message.snippets = []; - for (var i = 0; i < object.snippets.length; ++i) - message.snippets[i] = String(object.snippets[i]); - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.Article.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.answerRecord != null) - message.answerRecord = String(object.answerRecord); - return message; - }; - - /** - * Creates a plain object from an Article message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.Article} message Article - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Article.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.snippets = []; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.title = ""; - object.uri = ""; - object.answerRecord = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.snippets && message.snippets.length) { - object.snippets = []; - for (var j = 0; j < message.snippets.length; ++j) - object.snippets[j] = message.snippets[j]; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; - return object; - }; - - /** - * Converts this Article to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.Article - * @instance - * @returns {Object.} JSON object - */ - Article.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Article; - })(); - - Suggestion.FaqAnswer = (function() { - - /** - * Properties of a FaqAnswer. - * @memberof google.cloud.dialogflow.v2beta1.Suggestion - * @interface IFaqAnswer - * @property {string|null} [answer] FaqAnswer answer - * @property {number|null} [confidence] FaqAnswer confidence - * @property {string|null} [question] FaqAnswer question - * @property {string|null} [source] FaqAnswer source - * @property {Object.|null} [metadata] FaqAnswer metadata - * @property {string|null} [answerRecord] FaqAnswer answerRecord - */ - - /** - * Constructs a new FaqAnswer. - * @memberof google.cloud.dialogflow.v2beta1.Suggestion - * @classdesc Represents a FaqAnswer. - * @implements IFaqAnswer - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer=} [properties] Properties to set - */ - function FaqAnswer(properties) { - this.metadata = {}; - 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]]; - } - - /** - * FaqAnswer answer. - * @member {string} answer - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.answer = ""; - - /** - * FaqAnswer confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.confidence = 0; - - /** - * FaqAnswer question. - * @member {string} question - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.question = ""; - - /** - * FaqAnswer source. - * @member {string} source - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.source = ""; - - /** - * FaqAnswer metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.metadata = $util.emptyObject; - - /** - * FaqAnswer answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - */ - FaqAnswer.prototype.answerRecord = ""; - - /** - * Creates a new FaqAnswer instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer instance - */ - FaqAnswer.create = function create(properties) { - return new FaqAnswer(properties); - }; - - /** - * Encodes the specified FaqAnswer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer} message FaqAnswer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FaqAnswer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.source); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.answerRecord); - return writer; - }; - - /** - * Encodes the specified FaqAnswer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.IFaqAnswer} message FaqAnswer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FaqAnswer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FaqAnswer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FaqAnswer.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.v2beta1.Suggestion.FaqAnswer(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.answer = reader.string(); - break; - case 2: - message.confidence = reader.float(); - break; - case 3: - message.question = reader.string(); - break; - case 4: - message.source = reader.string(); - break; - case 5: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; - break; - case 6: - message.answerRecord = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FaqAnswer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FaqAnswer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FaqAnswer message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FaqAnswer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.answer != null && message.hasOwnProperty("answer")) - if (!$util.isString(message.answer)) - return "answer: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string expected"; - return null; - }; - - /** - * Creates a FaqAnswer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} FaqAnswer - */ - FaqAnswer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer(); - if (object.answer != null) - message.answer = String(object.answer); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.question != null) - message.question = String(object.question); - if (object.source != null) - message.source = String(object.source); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.answerRecord != null) - message.answerRecord = String(object.answerRecord); - return message; - }; - - /** - * Creates a plain object from a FaqAnswer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @static - * @param {google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer} message FaqAnswer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FaqAnswer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.answer = ""; - object.confidence = 0; - object.question = ""; - object.source = ""; - object.answerRecord = ""; - } - if (message.answer != null && message.hasOwnProperty("answer")) - object.answer = message.answer; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; - return object; - }; - - /** - * Converts this FaqAnswer to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Suggestion.FaqAnswer - * @instance - * @returns {Object.} JSON object - */ - FaqAnswer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FaqAnswer; - })(); - - return Suggestion; - })(); - - v2beta1.ListSuggestionsRequest = (function() { + /** + * QueryResult webhookPayload. + * @member {google.protobuf.IStruct|null|undefined} webhookPayload + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance + */ + QueryResult.prototype.webhookPayload = null; /** - * Properties of a ListSuggestionsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListSuggestionsRequest - * @property {string|null} [parent] ListSuggestionsRequest parent - * @property {number|null} [pageSize] ListSuggestionsRequest pageSize - * @property {string|null} [pageToken] ListSuggestionsRequest pageToken - * @property {string|null} [filter] ListSuggestionsRequest filter + * QueryResult outputContexts. + * @member {Array.} outputContexts + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance */ + QueryResult.prototype.outputContexts = $util.emptyArray; /** - * Constructs a new ListSuggestionsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListSuggestionsRequest. - * @implements IListSuggestionsRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest=} [properties] Properties to set + * QueryResult intent. + * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @instance */ - function ListSuggestionsRequest(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.prototype.intent = null; /** - * ListSuggestionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * QueryResult intentDetectionConfidence. + * @member {number} intentDetectionConfidence + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @instance */ - ListSuggestionsRequest.prototype.parent = ""; + QueryResult.prototype.intentDetectionConfidence = 0; /** - * ListSuggestionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * QueryResult diagnosticInfo. + * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @instance */ - ListSuggestionsRequest.prototype.pageSize = 0; + QueryResult.prototype.diagnosticInfo = null; /** - * ListSuggestionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * QueryResult sentimentAnalysisResult. + * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @instance */ - ListSuggestionsRequest.prototype.pageToken = ""; + QueryResult.prototype.sentimentAnalysisResult = null; /** - * ListSuggestionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * QueryResult knowledgeAnswers. + * @member {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null|undefined} knowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @instance */ - ListSuggestionsRequest.prototype.filter = ""; + QueryResult.prototype.knowledgeAnswers = null; /** - * Creates a new ListSuggestionsRequest instance using the specified properties. + * Creates a new QueryResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest instance + * @param {google.cloud.dialogflow.v2beta1.IQueryResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult instance */ - ListSuggestionsRequest.create = function create(properties) { - return new ListSuggestionsRequest(properties); + QueryResult.create = function create(properties) { + return new QueryResult(properties); }; /** - * Encodes the specified ListSuggestionsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} message ListSuggestionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSuggestionsRequest.encode = function encode(message, writer) { + QueryResult.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryText); + if (message.speechRecognitionConfidence != null && Object.hasOwnProperty.call(message, "speechRecognitionConfidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.speechRecognitionConfidence); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.action); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allRequiredParamsPresent != null && Object.hasOwnProperty.call(message, "allRequiredParamsPresent")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allRequiredParamsPresent); + if (message.fulfillmentText != null && Object.hasOwnProperty.call(message, "fulfillmentText")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.fulfillmentText); + if (message.fulfillmentMessages != null && message.fulfillmentMessages.length) + for (var i = 0; i < message.fulfillmentMessages.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.encode(message.fulfillmentMessages[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webhookSource != null && Object.hasOwnProperty.call(message, "webhookSource")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.webhookSource); + if (message.webhookPayload != null && Object.hasOwnProperty.call(message, "webhookPayload")) + $root.google.protobuf.Struct.encode(message.webhookPayload, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.outputContexts != null && message.outputContexts.length) + for (var i = 0; i < message.outputContexts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.outputContexts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.v2beta1.Intent.encode(message.intent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) + writer.uint32(/* id 12, wireType 5 =*/101).float(message.intentDetectionConfidence); + if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) + $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); + if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) + $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.knowledgeAnswers != null && Object.hasOwnProperty.call(message, "knowledgeAnswers")) + $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.encode(message.knowledgeAnswers, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.cancelsSlotFilling != null && Object.hasOwnProperty.call(message, "cancelsSlotFilling")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.cancelsSlotFilling); return writer; }; /** - * Encodes the specified ListSuggestionsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsRequest.verify|verify} messages. + * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsRequest} message ListSuggestionsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IQueryResult} message QueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSuggestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + QueryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSuggestionsRequest message from the specified reader or buffer. + * Decodes a QueryResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest + * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSuggestionsRequest.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.v2beta1.ListSuggestionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.QueryResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.queryText = reader.string(); + break; + case 15: + message.languageCode = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.speechRecognitionConfidence = reader.float(); break; case 3: - message.pageToken = reader.string(); + message.action = reader.string(); break; case 4: - message.filter = reader.string(); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 5: + message.allRequiredParamsPresent = reader.bool(); + break; + case 21: + message.cancelsSlotFilling = reader.bool(); + break; + case 6: + message.fulfillmentText = reader.string(); + break; + case 7: + if (!(message.fulfillmentMessages && message.fulfillmentMessages.length)) + message.fulfillmentMessages = []; + message.fulfillmentMessages.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.decode(reader, reader.uint32())); + break; + case 8: + message.webhookSource = reader.string(); + break; + case 9: + message.webhookPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 10: + if (!(message.outputContexts && message.outputContexts.length)) + message.outputContexts = []; + message.outputContexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); + break; + case 11: + message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32()); + break; + case 12: + message.intentDetectionConfidence = reader.float(); + break; + case 14: + message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 17: + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.decode(reader, reader.uint32()); + break; + case 18: + message.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -94260,134 +93807,303 @@ }; /** - * Decodes a ListSuggestionsRequest 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.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest + * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSuggestionsRequest.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 ListSuggestionsRequest message. + * Verifies a QueryResult message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSuggestionsRequest.verify = function verify(message) { + QueryResult.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.speechRecognitionConfidence != null && message.hasOwnProperty("speechRecognitionConfidence")) + if (typeof message.speechRecognitionConfidence !== "number") + return "speechRecognitionConfidence: number expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: 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.allRequiredParamsPresent != null && message.hasOwnProperty("allRequiredParamsPresent")) + if (typeof message.allRequiredParamsPresent !== "boolean") + return "allRequiredParamsPresent: boolean expected"; + if (message.cancelsSlotFilling != null && message.hasOwnProperty("cancelsSlotFilling")) + if (typeof message.cancelsSlotFilling !== "boolean") + return "cancelsSlotFilling: boolean expected"; + if (message.fulfillmentText != null && message.hasOwnProperty("fulfillmentText")) + if (!$util.isString(message.fulfillmentText)) + return "fulfillmentText: string expected"; + if (message.fulfillmentMessages != null && message.hasOwnProperty("fulfillmentMessages")) { + if (!Array.isArray(message.fulfillmentMessages)) + return "fulfillmentMessages: array expected"; + for (var i = 0; i < message.fulfillmentMessages.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.verify(message.fulfillmentMessages[i]); + if (error) + return "fulfillmentMessages." + error; + } + } + if (message.webhookSource != null && message.hasOwnProperty("webhookSource")) + if (!$util.isString(message.webhookSource)) + return "webhookSource: string expected"; + if (message.webhookPayload != null && message.hasOwnProperty("webhookPayload")) { + var error = $root.google.protobuf.Struct.verify(message.webhookPayload); + if (error) + return "webhookPayload." + error; + } + if (message.outputContexts != null && message.hasOwnProperty("outputContexts")) { + if (!Array.isArray(message.outputContexts)) + return "outputContexts: array expected"; + for (var i = 0; i < message.outputContexts.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.outputContexts[i]); + if (error) + return "outputContexts." + error; + } + } + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.v2beta1.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.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.v2beta1.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); + if (error) + return "sentimentAnalysisResult." + error; + } + if (message.knowledgeAnswers != null && message.hasOwnProperty("knowledgeAnswers")) { + var error = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify(message.knowledgeAnswers); + if (error) + return "knowledgeAnswers." + error; + } return null; }; /** - * Creates a ListSuggestionsRequest 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.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} ListSuggestionsRequest + * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult */ - ListSuggestionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest) + QueryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryResult) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListSuggestionsRequest(); - 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.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.dialogflow.v2beta1.QueryResult(); + if (object.queryText != null) + message.queryText = String(object.queryText); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.speechRecognitionConfidence != null) + message.speechRecognitionConfidence = Number(object.speechRecognitionConfidence); + if (object.action != null) + message.action = String(object.action); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); + } + if (object.allRequiredParamsPresent != null) + message.allRequiredParamsPresent = Boolean(object.allRequiredParamsPresent); + if (object.cancelsSlotFilling != null) + message.cancelsSlotFilling = Boolean(object.cancelsSlotFilling); + if (object.fulfillmentText != null) + message.fulfillmentText = String(object.fulfillmentText); + if (object.fulfillmentMessages) { + if (!Array.isArray(object.fulfillmentMessages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.fulfillmentMessages: array expected"); + message.fulfillmentMessages = []; + for (var i = 0; i < object.fulfillmentMessages.length; ++i) { + if (typeof object.fulfillmentMessages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.fulfillmentMessages: object expected"); + message.fulfillmentMessages[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.fromObject(object.fulfillmentMessages[i]); + } + } + if (object.webhookSource != null) + message.webhookSource = String(object.webhookSource); + if (object.webhookPayload != null) { + if (typeof object.webhookPayload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.webhookPayload: object expected"); + message.webhookPayload = $root.google.protobuf.Struct.fromObject(object.webhookPayload); + } + if (object.outputContexts) { + if (!Array.isArray(object.outputContexts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.outputContexts: array expected"); + message.outputContexts = []; + for (var i = 0; i < object.outputContexts.length; ++i) { + if (typeof object.outputContexts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.outputContexts: object expected"); + message.outputContexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.outputContexts[i]); + } + } + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intent); + } + if (object.intentDetectionConfidence != null) + message.intentDetectionConfidence = Number(object.intentDetectionConfidence); + if (object.diagnosticInfo != null) { + if (typeof object.diagnosticInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.QueryResult.sentimentAnalysisResult: object expected"); + message.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); + } + if (object.knowledgeAnswers != null) { + if (typeof object.knowledgeAnswers !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.knowledgeAnswers: object expected"); + message.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.fromObject(object.knowledgeAnswers); + } return message; }; /** - * Creates a plain object from a ListSuggestionsRequest 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.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @static - * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsRequest} message ListSuggestionsRequest + * @param {google.cloud.dialogflow.v2beta1.QueryResult} message QueryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSuggestionsRequest.toObject = function toObject(message, options) { + QueryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.fulfillmentMessages = []; + object.outputContexts = []; + } if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.queryText = ""; + object.speechRecognitionConfidence = 0; + object.action = ""; + object.parameters = null; + object.allRequiredParamsPresent = false; + object.fulfillmentText = ""; + object.webhookSource = ""; + object.webhookPayload = null; + object.intent = null; + object.intentDetectionConfidence = 0; + object.diagnosticInfo = null; + object.languageCode = ""; + object.sentimentAnalysisResult = null; + object.knowledgeAnswers = null; + object.cancelsSlotFilling = 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.speechRecognitionConfidence != null && message.hasOwnProperty("speechRecognitionConfidence")) + object.speechRecognitionConfidence = options.json && !isFinite(message.speechRecognitionConfidence) ? String(message.speechRecognitionConfidence) : message.speechRecognitionConfidence; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.allRequiredParamsPresent != null && message.hasOwnProperty("allRequiredParamsPresent")) + object.allRequiredParamsPresent = message.allRequiredParamsPresent; + if (message.fulfillmentText != null && message.hasOwnProperty("fulfillmentText")) + object.fulfillmentText = message.fulfillmentText; + if (message.fulfillmentMessages && message.fulfillmentMessages.length) { + object.fulfillmentMessages = []; + for (var j = 0; j < message.fulfillmentMessages.length; ++j) + object.fulfillmentMessages[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.toObject(message.fulfillmentMessages[j], options); + } + if (message.webhookSource != null && message.hasOwnProperty("webhookSource")) + object.webhookSource = message.webhookSource; + if (message.webhookPayload != null && message.hasOwnProperty("webhookPayload")) + object.webhookPayload = $root.google.protobuf.Struct.toObject(message.webhookPayload, options); + if (message.outputContexts && message.outputContexts.length) { + object.outputContexts = []; + for (var j = 0; j < message.outputContexts.length; ++j) + object.outputContexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.outputContexts[j], options); + } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.v2beta1.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.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) + object.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); + if (message.knowledgeAnswers != null && message.hasOwnProperty("knowledgeAnswers")) + object.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.toObject(message.knowledgeAnswers, options); + if (message.cancelsSlotFilling != null && message.hasOwnProperty("cancelsSlotFilling")) + object.cancelsSlotFilling = message.cancelsSlotFilling; return object; }; /** - * Converts this ListSuggestionsRequest to JSON. + * Converts this QueryResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsRequest + * @memberof google.cloud.dialogflow.v2beta1.QueryResult * @instance * @returns {Object.} JSON object */ - ListSuggestionsRequest.prototype.toJSON = function toJSON() { + QueryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSuggestionsRequest; + return QueryResult; })(); - v2beta1.ListSuggestionsResponse = (function() { + v2beta1.KnowledgeAnswers = (function() { /** - * Properties of a ListSuggestionsResponse. + * Properties of a KnowledgeAnswers. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListSuggestionsResponse - * @property {Array.|null} [suggestions] ListSuggestionsResponse suggestions - * @property {string|null} [nextPageToken] ListSuggestionsResponse nextPageToken + * @interface IKnowledgeAnswers + * @property {Array.|null} [answers] KnowledgeAnswers answers */ /** - * Constructs a new ListSuggestionsResponse. + * Constructs a new KnowledgeAnswers. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListSuggestionsResponse. - * @implements IListSuggestionsResponse + * @classdesc Represents a KnowledgeAnswers. + * @implements IKnowledgeAnswers * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers=} [properties] Properties to set */ - function ListSuggestionsResponse(properties) { - this.suggestions = []; + function KnowledgeAnswers(properties) { + this.answers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94395,91 +94111,78 @@ } /** - * ListSuggestionsResponse suggestions. - * @member {Array.} suggestions - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse - * @instance - */ - ListSuggestionsResponse.prototype.suggestions = $util.emptyArray; - - /** - * ListSuggestionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * KnowledgeAnswers answers. + * @member {Array.} answers + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @instance */ - ListSuggestionsResponse.prototype.nextPageToken = ""; + KnowledgeAnswers.prototype.answers = $util.emptyArray; /** - * Creates a new ListSuggestionsResponse instance using the specified properties. + * Creates a new KnowledgeAnswers instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse instance + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers instance */ - ListSuggestionsResponse.create = function create(properties) { - return new ListSuggestionsResponse(properties); + KnowledgeAnswers.create = function create(properties) { + return new KnowledgeAnswers(properties); }; /** - * Encodes the specified ListSuggestionsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. + * Encodes the specified KnowledgeAnswers message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse} message ListSuggestionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers} message KnowledgeAnswers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSuggestionsResponse.encode = function encode(message, writer) { + KnowledgeAnswers.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.suggestions != null && message.suggestions.length) - for (var i = 0; i < message.suggestions.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Suggestion.encode(message.suggestions[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.answers != null && message.answers.length) + for (var i = 0; i < message.answers.length; ++i) + $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.encode(message.answers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSuggestionsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.verify|verify} messages. + * Encodes the specified KnowledgeAnswers message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static - * @param {google.cloud.dialogflow.v2beta1.IListSuggestionsResponse} message ListSuggestionsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers} message KnowledgeAnswers message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSuggestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + KnowledgeAnswers.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSuggestionsResponse message from the specified reader or buffer. + * Decodes a KnowledgeAnswers message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSuggestionsResponse.decode = function decode(reader, length) { + KnowledgeAnswers.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.v2beta1.ListSuggestionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.suggestions && message.suggestions.length)) - message.suggestions = []; - message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Suggestion.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + if (!(message.answers && message.answers.length)) + message.answers = []; + message.answers.push($root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -94490,135 +94193,447 @@ }; /** - * Decodes a ListSuggestionsResponse message from the specified reader or buffer, length delimited. + * Decodes a KnowledgeAnswers message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSuggestionsResponse.decodeDelimited = function decodeDelimited(reader) { + KnowledgeAnswers.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSuggestionsResponse message. + * Verifies a KnowledgeAnswers message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSuggestionsResponse.verify = function verify(message) { + KnowledgeAnswers.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (!Array.isArray(message.suggestions)) - return "suggestions: array expected"; - for (var i = 0; i < message.suggestions.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.verify(message.suggestions[i]); + if (message.answers != null && message.hasOwnProperty("answers")) { + if (!Array.isArray(message.answers)) + return "answers: array expected"; + for (var i = 0; i < message.answers.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify(message.answers[i]); if (error) - return "suggestions." + error; + return "answers." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSuggestionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KnowledgeAnswers message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} ListSuggestionsResponse + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers */ - ListSuggestionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse) + KnowledgeAnswers.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse(); - if (object.suggestions) { - if (!Array.isArray(object.suggestions)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.suggestions: array expected"); - message.suggestions = []; - for (var i = 0; i < object.suggestions.length; ++i) { - if (typeof object.suggestions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListSuggestionsResponse.suggestions: object expected"); - message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Suggestion.fromObject(object.suggestions[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers(); + if (object.answers) { + if (!Array.isArray(object.answers)) + throw TypeError(".google.cloud.dialogflow.v2beta1.KnowledgeAnswers.answers: array expected"); + message.answers = []; + for (var i = 0; i < object.answers.length; ++i) { + if (typeof object.answers[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.KnowledgeAnswers.answers: object expected"); + message.answers[i] = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.fromObject(object.answers[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSuggestionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a KnowledgeAnswers message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @static - * @param {google.cloud.dialogflow.v2beta1.ListSuggestionsResponse} message ListSuggestionsResponse + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} message KnowledgeAnswers * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSuggestionsResponse.toObject = function toObject(message, options) { + KnowledgeAnswers.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.suggestions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.suggestions && message.suggestions.length) { - object.suggestions = []; - for (var j = 0; j < message.suggestions.length; ++j) - object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Suggestion.toObject(message.suggestions[j], options); + object.answers = []; + if (message.answers && message.answers.length) { + object.answers = []; + for (var j = 0; j < message.answers.length; ++j) + object.answers[j] = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.toObject(message.answers[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListSuggestionsResponse to JSON. + * Converts this KnowledgeAnswers to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListSuggestionsResponse + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers * @instance * @returns {Object.} JSON object */ - ListSuggestionsResponse.prototype.toJSON = function toJSON() { + KnowledgeAnswers.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSuggestionsResponse; + KnowledgeAnswers.Answer = (function() { + + /** + * Properties of an Answer. + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @interface IAnswer + * @property {string|null} [source] Answer source + * @property {string|null} [faqQuestion] Answer faqQuestion + * @property {string|null} [answer] Answer answer + * @property {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|null} [matchConfidenceLevel] Answer matchConfidenceLevel + * @property {number|null} [matchConfidence] Answer matchConfidence + */ + + /** + * Constructs a new Answer. + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @classdesc Represents an Answer. + * @implements IAnswer + * @constructor + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer=} [properties] Properties to set + */ + function Answer(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]]; + } + + /** + * Answer source. + * @member {string} source + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + */ + Answer.prototype.source = ""; + + /** + * Answer faqQuestion. + * @member {string} faqQuestion + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + */ + Answer.prototype.faqQuestion = ""; + + /** + * Answer answer. + * @member {string} answer + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + */ + Answer.prototype.answer = ""; + + /** + * Answer matchConfidenceLevel. + * @member {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel} matchConfidenceLevel + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + */ + Answer.prototype.matchConfidenceLevel = 0; + + /** + * Answer matchConfidence. + * @member {number} matchConfidence + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + */ + Answer.prototype.matchConfidence = 0; + + /** + * Creates a new Answer instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer instance + */ + Answer.create = function create(properties) { + return new Answer(properties); + }; + + /** + * Encodes the specified Answer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer} message Answer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Answer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.faqQuestion != null && Object.hasOwnProperty.call(message, "faqQuestion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.faqQuestion); + if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.answer); + if (message.matchConfidenceLevel != null && Object.hasOwnProperty.call(message, "matchConfidenceLevel")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchConfidenceLevel); + if (message.matchConfidence != null && Object.hasOwnProperty.call(message, "matchConfidence")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.matchConfidence); + return writer; + }; + + /** + * Encodes the specified Answer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer} message Answer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Answer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Answer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Answer.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.v2beta1.KnowledgeAnswers.Answer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.source = reader.string(); + break; + case 2: + message.faqQuestion = reader.string(); + break; + case 3: + message.answer = reader.string(); + break; + case 4: + message.matchConfidenceLevel = reader.int32(); + break; + case 5: + message.matchConfidence = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Answer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Answer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Answer message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Answer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.faqQuestion != null && message.hasOwnProperty("faqQuestion")) + if (!$util.isString(message.faqQuestion)) + return "faqQuestion: string expected"; + if (message.answer != null && message.hasOwnProperty("answer")) + if (!$util.isString(message.answer)) + return "answer: string expected"; + if (message.matchConfidenceLevel != null && message.hasOwnProperty("matchConfidenceLevel")) + switch (message.matchConfidenceLevel) { + default: + return "matchConfidenceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) + if (typeof message.matchConfidence !== "number") + return "matchConfidence: number expected"; + return null; + }; + + /** + * Creates an Answer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer + */ + Answer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer(); + if (object.source != null) + message.source = String(object.source); + if (object.faqQuestion != null) + message.faqQuestion = String(object.faqQuestion); + if (object.answer != null) + message.answer = String(object.answer); + switch (object.matchConfidenceLevel) { + case "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED": + case 0: + message.matchConfidenceLevel = 0; + break; + case "LOW": + case 1: + message.matchConfidenceLevel = 1; + break; + case "MEDIUM": + case 2: + message.matchConfidenceLevel = 2; + break; + case "HIGH": + case 3: + message.matchConfidenceLevel = 3; + break; + } + if (object.matchConfidence != null) + message.matchConfidence = Number(object.matchConfidence); + return message; + }; + + /** + * Creates a plain object from an Answer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @static + * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} message Answer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Answer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = ""; + object.faqQuestion = ""; + object.answer = ""; + object.matchConfidenceLevel = options.enums === String ? "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" : 0; + object.matchConfidence = 0; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.faqQuestion != null && message.hasOwnProperty("faqQuestion")) + object.faqQuestion = message.faqQuestion; + if (message.answer != null && message.hasOwnProperty("answer")) + object.answer = message.answer; + if (message.matchConfidenceLevel != null && message.hasOwnProperty("matchConfidenceLevel")) + object.matchConfidenceLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel[message.matchConfidenceLevel] : message.matchConfidenceLevel; + if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) + object.matchConfidence = options.json && !isFinite(message.matchConfidence) ? String(message.matchConfidence) : message.matchConfidence; + return object; + }; + + /** + * Converts this Answer to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer + * @instance + * @returns {Object.} JSON object + */ + Answer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * MatchConfidenceLevel enum. + * @name google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel + * @enum {number} + * @property {number} MATCH_CONFIDENCE_LEVEL_UNSPECIFIED=0 MATCH_CONFIDENCE_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + */ + Answer.MatchConfidenceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + return values; + })(); + + return Answer; + })(); + + return KnowledgeAnswers; })(); - v2beta1.CompileSuggestionRequest = (function() { + v2beta1.StreamingDetectIntentRequest = (function() { /** - * Properties of a CompileSuggestionRequest. + * Properties of a StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICompileSuggestionRequest - * @property {string|null} [parent] CompileSuggestionRequest parent - * @property {string|null} [latestMessage] CompileSuggestionRequest latestMessage - * @property {number|null} [contextSize] CompileSuggestionRequest contextSize + * @interface IStreamingDetectIntentRequest + * @property {string|null} [session] StreamingDetectIntentRequest session + * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams + * @property {google.cloud.dialogflow.v2beta1.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput + * @property {boolean|null} [singleUtterance] StreamingDetectIntentRequest singleUtterance + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig + * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] StreamingDetectIntentRequest outputAudioConfigMask + * @property {Uint8Array|null} [inputAudio] StreamingDetectIntentRequest inputAudio */ /** - * Constructs a new CompileSuggestionRequest. + * Constructs a new StreamingDetectIntentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CompileSuggestionRequest. - * @implements ICompileSuggestionRequest + * @classdesc Represents a StreamingDetectIntentRequest. + * @implements IStreamingDetectIntentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest=} [properties] Properties to set */ - function CompileSuggestionRequest(properties) { + function StreamingDetectIntentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94626,101 +94641,153 @@ } /** - * CompileSuggestionRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * StreamingDetectIntentRequest session. + * @member {string} session + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @instance */ - CompileSuggestionRequest.prototype.parent = ""; + StreamingDetectIntentRequest.prototype.session = ""; /** - * CompileSuggestionRequest latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * StreamingDetectIntentRequest queryParams. + * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @instance */ - CompileSuggestionRequest.prototype.latestMessage = ""; + StreamingDetectIntentRequest.prototype.queryParams = null; /** - * CompileSuggestionRequest contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * StreamingDetectIntentRequest queryInput. + * @member {google.cloud.dialogflow.v2beta1.IQueryInput|null|undefined} queryInput + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @instance */ - CompileSuggestionRequest.prototype.contextSize = 0; + StreamingDetectIntentRequest.prototype.queryInput = null; /** - * Creates a new CompileSuggestionRequest instance using the specified properties. + * StreamingDetectIntentRequest singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.singleUtterance = false; + + /** + * StreamingDetectIntentRequest outputAudioConfig. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.outputAudioConfig = null; + + /** + * StreamingDetectIntentRequest outputAudioConfigMask. + * @member {google.protobuf.IFieldMask|null|undefined} outputAudioConfigMask + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.outputAudioConfigMask = null; + + /** + * StreamingDetectIntentRequest inputAudio. + * @member {Uint8Array} inputAudio + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); + + /** + * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest instance + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance */ - CompileSuggestionRequest.create = function create(properties) { - return new CompileSuggestionRequest(properties); + StreamingDetectIntentRequest.create = function create(properties) { + return new StreamingDetectIntentRequest(properties); }; /** - * Encodes the specified CompileSuggestionRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} message CompileSuggestionRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompileSuggestionRequest.encode = function encode(message, writer) { + StreamingDetectIntentRequest.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.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + 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.v2beta1.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.v2beta1.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.singleUtterance); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.inputAudio != null && Object.hasOwnProperty.call(message, "inputAudio")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.inputAudio); + if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) + $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified CompileSuggestionRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.verify|verify} messages. + * Encodes the specified StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionRequest} message CompileSuggestionRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompileSuggestionRequest.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompileSuggestionRequest message from the specified reader or buffer. + * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompileSuggestionRequest.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.v2beta1.CompileSuggestionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.session = reader.string(); break; case 2: - message.latestMessage = reader.string(); + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); break; case 3: - message.contextSize = reader.int32(); + message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.decode(reader, reader.uint32()); + break; + case 4: + message.singleUtterance = reader.bool(); + break; + case 5: + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + break; + case 7: + message.outputAudioConfigMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 6: + message.inputAudio = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -94731,126 +94798,192 @@ }; /** - * Decodes a CompileSuggestionRequest 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.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompileSuggestionRequest.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 CompileSuggestionRequest message. + * Verifies a StreamingDetectIntentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompileSuggestionRequest.verify = function verify(message) { + StreamingDetectIntentRequest.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.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; - return null; - }; - - /** - * Creates a CompileSuggestionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} CompileSuggestionRequest + 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.v2beta1.QueryParameters.verify(message.queryParams); + if (error) + return "queryParams." + error; + } + if (message.queryInput != null && message.hasOwnProperty("queryInput")) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryInput.verify(message.queryInput); + if (error) + return "queryInput." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; + } + if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.outputAudioConfigMask); + if (error) + return "outputAudioConfigMask." + error; + } + if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) + if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) + return "inputAudio: buffer expected"; + return null; + }; + + /** + * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest */ - CompileSuggestionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest) + StreamingDetectIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; + var message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest(); + if (object.session != null) + message.session = String(object.session); + if (object.queryParams != null) { + if (typeof object.queryParams !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.queryParams: object expected"); + message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); + } + if (object.queryInput != null) { + if (typeof object.queryInput !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.queryInput: object expected"); + message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.fromObject(object.queryInput); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.outputAudioConfig != null) { + if (typeof object.outputAudioConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); + } + if (object.outputAudioConfigMask != null) { + if (typeof object.outputAudioConfigMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.outputAudioConfigMask: object expected"); + message.outputAudioConfigMask = $root.google.protobuf.FieldMask.fromObject(object.outputAudioConfigMask); + } + if (object.inputAudio != null) + if (typeof object.inputAudio === "string") + $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); + else if (object.inputAudio.length) + message.inputAudio = object.inputAudio; return message; }; /** - * Creates a plain object from a CompileSuggestionRequest 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.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionRequest} message CompileSuggestionRequest + * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} message StreamingDetectIntentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompileSuggestionRequest.toObject = function toObject(message, options) { + StreamingDetectIntentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.latestMessage = ""; - object.contextSize = 0; + object.session = ""; + object.queryParams = null; + object.queryInput = null; + object.singleUtterance = false; + object.outputAudioConfig = null; + if (options.bytes === String) + object.inputAudio = ""; + else { + object.inputAudio = []; + if (options.bytes !== Array) + object.inputAudio = $util.newBuffer(object.inputAudio); + } + object.outputAudioConfigMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; + if (message.session != null && message.hasOwnProperty("session")) + object.session = message.session; + if (message.queryParams != null && message.hasOwnProperty("queryParams")) + object.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.toObject(message.queryParams, options); + if (message.queryInput != null && message.hasOwnProperty("queryInput")) + object.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.toObject(message.queryInput, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) + object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) + object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; + if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) + object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); return object; }; /** - * Converts this CompileSuggestionRequest to JSON. + * Converts this StreamingDetectIntentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionRequest + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest * @instance * @returns {Object.} JSON object */ - CompileSuggestionRequest.prototype.toJSON = function toJSON() { + StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CompileSuggestionRequest; + return StreamingDetectIntentRequest; })(); - v2beta1.CompileSuggestionResponse = (function() { + v2beta1.StreamingDetectIntentResponse = (function() { /** - * Properties of a CompileSuggestionResponse. + * Properties of a StreamingDetectIntentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICompileSuggestionResponse - * @property {google.cloud.dialogflow.v2beta1.ISuggestion|null} [suggestion] CompileSuggestionResponse suggestion - * @property {string|null} [latestMessage] CompileSuggestionResponse latestMessage - * @property {number|null} [contextSize] CompileSuggestionResponse contextSize + * @interface IStreamingDetectIntentResponse + * @property {string|null} [responseId] StreamingDetectIntentResponse responseId + * @property {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult + * @property {google.cloud.dialogflow.v2beta1.IQueryResult|null} [queryResult] StreamingDetectIntentResponse queryResult + * @property {Array.|null} [alternativeQueryResults] StreamingDetectIntentResponse alternativeQueryResults + * @property {google.rpc.IStatus|null} [webhookStatus] StreamingDetectIntentResponse webhookStatus + * @property {Uint8Array|null} [outputAudio] StreamingDetectIntentResponse outputAudio + * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentResponse outputAudioConfig */ /** - * Constructs a new CompileSuggestionResponse. + * Constructs a new StreamingDetectIntentResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CompileSuggestionResponse. - * @implements ICompileSuggestionResponse + * @classdesc Represents a StreamingDetectIntentResponse. + * @implements IStreamingDetectIntentResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse=} [properties] Properties to set */ - function CompileSuggestionResponse(properties) { + function StreamingDetectIntentResponse(properties) { + this.alternativeQueryResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -94858,101 +94991,156 @@ } /** - * CompileSuggestionResponse suggestion. - * @member {google.cloud.dialogflow.v2beta1.ISuggestion|null|undefined} suggestion - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * StreamingDetectIntentResponse responseId. + * @member {string} responseId + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @instance */ - CompileSuggestionResponse.prototype.suggestion = null; + StreamingDetectIntentResponse.prototype.responseId = ""; /** - * CompileSuggestionResponse latestMessage. - * @member {string} latestMessage - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * StreamingDetectIntentResponse recognitionResult. + * @member {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null|undefined} recognitionResult + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @instance */ - CompileSuggestionResponse.prototype.latestMessage = ""; + StreamingDetectIntentResponse.prototype.recognitionResult = null; /** - * CompileSuggestionResponse contextSize. - * @member {number} contextSize - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * StreamingDetectIntentResponse queryResult. + * @member {google.cloud.dialogflow.v2beta1.IQueryResult|null|undefined} queryResult + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @instance */ - CompileSuggestionResponse.prototype.contextSize = 0; + StreamingDetectIntentResponse.prototype.queryResult = null; /** - * Creates a new CompileSuggestionResponse instance using the specified properties. + * StreamingDetectIntentResponse alternativeQueryResults. + * @member {Array.} alternativeQueryResults + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.alternativeQueryResults = $util.emptyArray; + + /** + * StreamingDetectIntentResponse webhookStatus. + * @member {google.rpc.IStatus|null|undefined} webhookStatus + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.webhookStatus = null; + + /** + * StreamingDetectIntentResponse outputAudio. + * @member {Uint8Array} outputAudio + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); + + /** + * StreamingDetectIntentResponse outputAudioConfig. + * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.outputAudioConfig = null; + + /** + * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse instance + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance */ - CompileSuggestionResponse.create = function create(properties) { - return new CompileSuggestionResponse(properties); + StreamingDetectIntentResponse.create = function create(properties) { + return new StreamingDetectIntentResponse(properties); }; /** - * Encodes the specified CompileSuggestionResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse} message CompileSuggestionResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompileSuggestionResponse.encode = function encode(message, writer) { + StreamingDetectIntentResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) - $root.google.cloud.dialogflow.v2beta1.Suggestion.encode(message.suggestion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); - if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + if (message.responseId != null && Object.hasOwnProperty.call(message, "responseId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseId); + if (message.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) + $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.queryResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.webhookStatus != null && Object.hasOwnProperty.call(message, "webhookStatus")) + $root.google.rpc.Status.encode(message.webhookStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.outputAudio); + if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) + $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.alternativeQueryResults != null && message.alternativeQueryResults.length) + for (var i = 0; i < message.alternativeQueryResults.length; ++i) + $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.alternativeQueryResults[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified CompileSuggestionResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.verify|verify} messages. + * Encodes the specified StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompileSuggestionResponse} message CompileSuggestionResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompileSuggestionResponse.encodeDelimited = function encodeDelimited(message, writer) { + StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompileSuggestionResponse message from the specified reader or buffer. + * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompileSuggestionResponse.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.v2beta1.CompileSuggestionResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.decode(reader, reader.uint32()); + message.responseId = reader.string(); break; case 2: - message.latestMessage = reader.string(); + message.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.decode(reader, reader.uint32()); break; case 3: - message.contextSize = reader.int32(); + message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.alternativeQueryResults && message.alternativeQueryResults.length)) + message.alternativeQueryResults = []; + message.alternativeQueryResults.push($root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32())); + break; + case 4: + message.webhookStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.outputAudio = reader.bytes(); + break; + case 6: + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -94963,133 +95151,212 @@ }; /** - * Decodes a CompileSuggestionResponse 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.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompileSuggestionResponse.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 CompileSuggestionResponse message. + * Verifies a StreamingDetectIntentResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompileSuggestionResponse.verify = function verify(message) { + StreamingDetectIntentResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) { - var error = $root.google.cloud.dialogflow.v2beta1.Suggestion.verify(message.suggestion); + if (message.responseId != null && message.hasOwnProperty("responseId")) + if (!$util.isString(message.responseId)) + return "responseId: string expected"; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { + var error = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify(message.recognitionResult); if (error) - return "suggestion." + error; + return "recognitionResult." + error; + } + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.queryResult); + if (error) + return "queryResult." + error; + } + if (message.alternativeQueryResults != null && message.hasOwnProperty("alternativeQueryResults")) { + if (!Array.isArray(message.alternativeQueryResults)) + return "alternativeQueryResults: array expected"; + for (var i = 0; i < message.alternativeQueryResults.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.alternativeQueryResults[i]); + if (error) + return "alternativeQueryResults." + error; + } + } + if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) { + var error = $root.google.rpc.Status.verify(message.webhookStatus); + if (error) + return "webhookStatus." + 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.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); + if (error) + return "outputAudioConfig." + error; } - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - if (!$util.isString(message.latestMessage)) - return "latestMessage: string expected"; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - if (!$util.isInteger(message.contextSize)) - return "contextSize: integer expected"; return null; }; /** - * Creates a CompileSuggestionResponse 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.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} CompileSuggestionResponse + * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse */ - CompileSuggestionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse) + StreamingDetectIntentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse(); - if (object.suggestion != null) { - if (typeof object.suggestion !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.suggestion: object expected"); - message.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.fromObject(object.suggestion); + var message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse(); + if (object.responseId != null) + message.responseId = String(object.responseId); + if (object.recognitionResult != null) { + if (typeof object.recognitionResult !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.recognitionResult: object expected"); + message.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.fromObject(object.recognitionResult); + } + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.queryResult); + } + if (object.alternativeQueryResults) { + if (!Array.isArray(object.alternativeQueryResults)) + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.alternativeQueryResults: array expected"); + message.alternativeQueryResults = []; + for (var i = 0; i < object.alternativeQueryResults.length; ++i) { + if (typeof object.alternativeQueryResults[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.alternativeQueryResults: object expected"); + message.alternativeQueryResults[i] = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.alternativeQueryResults[i]); + } + } + if (object.webhookStatus != null) { + if (typeof object.webhookStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.webhookStatus: object expected"); + message.webhookStatus = $root.google.rpc.Status.fromObject(object.webhookStatus); + } + 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.v2beta1.StreamingDetectIntentResponse.outputAudioConfig: object expected"); + message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); } - if (object.latestMessage != null) - message.latestMessage = String(object.latestMessage); - if (object.contextSize != null) - message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a CompileSuggestionResponse 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.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @static - * @param {google.cloud.dialogflow.v2beta1.CompileSuggestionResponse} message CompileSuggestionResponse + * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} message StreamingDetectIntentResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompileSuggestionResponse.toObject = function toObject(message, options) { + StreamingDetectIntentResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.alternativeQueryResults = []; if (options.defaults) { - object.suggestion = null; - object.latestMessage = ""; - object.contextSize = 0; + object.responseId = ""; + object.recognitionResult = null; + object.queryResult = null; + object.webhookStatus = 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.responseId != null && message.hasOwnProperty("responseId")) + object.responseId = message.responseId; + if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) + object.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.toObject(message.recognitionResult, options); + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.queryResult, options); + if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) + object.webhookStatus = $root.google.rpc.Status.toObject(message.webhookStatus, 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.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.alternativeQueryResults && message.alternativeQueryResults.length) { + object.alternativeQueryResults = []; + for (var j = 0; j < message.alternativeQueryResults.length; ++j) + object.alternativeQueryResults[j] = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.alternativeQueryResults[j], options); } - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - object.suggestion = $root.google.cloud.dialogflow.v2beta1.Suggestion.toObject(message.suggestion, options); - if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) - object.latestMessage = message.latestMessage; - if (message.contextSize != null && message.hasOwnProperty("contextSize")) - object.contextSize = message.contextSize; return object; }; /** - * Converts this CompileSuggestionResponse to JSON. + * Converts this StreamingDetectIntentResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CompileSuggestionResponse + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse * @instance * @returns {Object.} JSON object */ - CompileSuggestionResponse.prototype.toJSON = function toJSON() { + StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CompileSuggestionResponse; + return StreamingDetectIntentResponse; })(); - v2beta1.ResponseMessage = (function() { + v2beta1.StreamingRecognitionResult = (function() { /** - * Properties of a ResponseMessage. + * Properties of a StreamingRecognitionResult. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IResponseMessage - * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null} [text] ResponseMessage text - * @property {google.protobuf.IStruct|null} [payload] ResponseMessage payload - * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null} [liveAgentHandoff] ResponseMessage liveAgentHandoff - * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null} [endInteraction] ResponseMessage endInteraction - * @property {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null} [telephonyTransferCall] ResponseMessage telephonyTransferCall + * @interface IStreamingRecognitionResult + * @property {google.cloud.dialogflow.v2beta1.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 + * @property {string|null} [languageCode] StreamingRecognitionResult languageCode + * @property {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null} [dtmfDigits] StreamingRecognitionResult dtmfDigits */ /** - * Constructs a new ResponseMessage. + * Constructs a new StreamingRecognitionResult. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ResponseMessage. - * @implements IResponseMessage + * @classdesc Represents a StreamingRecognitionResult. + * @implements IStreamingRecognitionResult * @constructor - * @param {google.cloud.dialogflow.v2beta1.IResponseMessage=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult=} [properties] Properties to set */ - function ResponseMessage(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) @@ -95097,141 +95364,182 @@ } /** - * ResponseMessage text. - * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.IText|null|undefined} text - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult messageType. + * @member {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType} messageType + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - ResponseMessage.prototype.text = null; + StreamingRecognitionResult.prototype.messageType = 0; /** - * ResponseMessage payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult transcript. + * @member {string} transcript + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - ResponseMessage.prototype.payload = null; + StreamingRecognitionResult.prototype.transcript = ""; /** - * ResponseMessage liveAgentHandoff. - * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff|null|undefined} liveAgentHandoff - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult isFinal. + * @member {boolean} isFinal + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - ResponseMessage.prototype.liveAgentHandoff = null; + StreamingRecognitionResult.prototype.isFinal = false; /** - * ResponseMessage endInteraction. - * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction|null|undefined} endInteraction - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult confidence. + * @member {number} confidence + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - ResponseMessage.prototype.endInteraction = null; + StreamingRecognitionResult.prototype.confidence = 0; /** - * ResponseMessage telephonyTransferCall. - * @member {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall|null|undefined} telephonyTransferCall - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult stability. + * @member {number} stability + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - ResponseMessage.prototype.telephonyTransferCall = null; + StreamingRecognitionResult.prototype.stability = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * StreamingRecognitionResult speechWordInfo. + * @member {Array.} speechWordInfo + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; /** - * ResponseMessage message. - * @member {"text"|"payload"|"liveAgentHandoff"|"endInteraction"|"telephonyTransferCall"|undefined} message - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * StreamingRecognitionResult speechEndOffset. + * @member {google.protobuf.IDuration|null|undefined} speechEndOffset + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance */ - Object.defineProperty(ResponseMessage.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "payload", "liveAgentHandoff", "endInteraction", "telephonyTransferCall"]), - set: $util.oneOfSetter($oneOfFields) - }); + StreamingRecognitionResult.prototype.speechEndOffset = null; /** - * Creates a new ResponseMessage instance using the specified properties. + * StreamingRecognitionResult languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.languageCode = ""; + + /** + * StreamingRecognitionResult dtmfDigits. + * @member {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null|undefined} dtmfDigits + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @instance + */ + StreamingRecognitionResult.prototype.dtmfDigits = null; + + /** + * Creates a new StreamingRecognitionResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IResponseMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage instance + * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult instance */ - ResponseMessage.create = function create(properties) { - return new ResponseMessage(properties); + StreamingRecognitionResult.create = function create(properties) { + return new StreamingRecognitionResult(properties); }; /** - * Encodes the specified ResponseMessage message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.v2beta1.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.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.encode(message.liveAgentHandoff, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.encode(message.endInteraction, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) - $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 6, wireType 2 =*/50).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.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) + $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.encode(message.dtmfDigits, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + 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.v2beta1.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); return writer; }; /** - * Encodes the specified ResponseMessage message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.verify|verify} messages. + * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.v2beta1.IResponseMessage} message ResponseMessage message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResponseMessage message from the specified reader or buffer. + * Decodes a StreamingRecognitionResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult * @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) { + 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.v2beta1.ResponseMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.decode(reader, reader.uint32()); + message.messageType = reader.int32(); break; case 2: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.transcript = reader.string(); break; case 3: - message.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.decode(reader, reader.uint32()); + message.isFinal = reader.bool(); break; case 4: - message.endInteraction = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.decode(reader, reader.uint32()); + message.confidence = reader.float(); break; case 6: - message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.decode(reader, reader.uint32()); + message.stability = reader.float(); + break; + case 7: + if (!(message.speechWordInfo && message.speechWordInfo.length)) + message.speechWordInfo = []; + message.speechWordInfo.push($root.google.cloud.dialogflow.v2beta1.SpeechWordInfo.decode(reader, reader.uint32())); + break; + case 8: + message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 10: + message.languageCode = reader.string(); + break; + case 5: + message.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -95242,1065 +95550,562 @@ }; /** - * Decodes a ResponseMessage 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.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult * @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) { + StreamingRecognitionResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResponseMessage message. + * Verifies a StreamingRecognitionResult message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @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) { + StreamingRecognitionResult.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.v2beta1.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.messageType != null && message.hasOwnProperty("messageType")) + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + case 3: + case 2: + case 4: + break; } - } - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.verify(message.liveAgentHandoff); + 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.v2beta1.SpeechWordInfo.verify(message.speechWordInfo[i]); if (error) - return "liveAgentHandoff." + error; + return "speechWordInfo." + 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.v2beta1.ResponseMessage.EndInteraction.verify(message.endInteraction); - if (error) - return "endInteraction." + error; - } + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { + var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); + if (error) + return "speechEndOffset." + error; } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify(message.telephonyTransferCall); - if (error) - return "telephonyTransferCall." + error; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + var error = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify(message.dtmfDigits); + if (error) + return "dtmfDigits." + error; } return null; }; /** - * Creates a ResponseMessage 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. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage} ResponseMessage + * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult */ - ResponseMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage) + StreamingRecognitionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.text: object expected"); - message.text = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text.fromObject(object.text); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + var message = new $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult(); + switch (object.messageType) { + case "MESSAGE_TYPE_UNSPECIFIED": + case 0: + message.messageType = 0; + break; + case "TRANSCRIPT": + case 1: + message.messageType = 1; + break; + case "DTMF_DIGITS": + case 3: + message.messageType = 3; + break; + case "END_OF_SINGLE_UTTERANCE": + case 2: + message.messageType = 2; + break; + case "PARTIAL_DTMF_DIGITS": + case 4: + message.messageType = 4; + break; } - if (object.liveAgentHandoff != null) { - if (typeof object.liveAgentHandoff !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.liveAgentHandoff: object expected"); - message.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.fromObject(object.liveAgentHandoff); + 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.v2beta1.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.v2beta1.StreamingRecognitionResult.speechWordInfo: object expected"); + message.speechWordInfo[i] = $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo.fromObject(object.speechWordInfo[i]); + } } - if (object.endInteraction != null) { - if (typeof object.endInteraction !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.endInteraction: object expected"); - message.endInteraction = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction.fromObject(object.endInteraction); + if (object.speechEndOffset != null) { + if (typeof object.speechEndOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.speechEndOffset: object expected"); + message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); } - if (object.telephonyTransferCall != null) { - if (typeof object.telephonyTransferCall !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.telephonyTransferCall: object expected"); - message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.dtmfDigits != null) { + if (typeof object.dtmfDigits !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.dtmfDigits: object expected"); + message.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.fromObject(object.dtmfDigits); } return message; }; /** - * Creates a plain object from a ResponseMessage 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.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage} message ResponseMessage + * @param {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} message StreamingRecognitionResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResponseMessage.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.v2beta1.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.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) { - object.liveAgentHandoff = $root.google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.EndInteraction.toObject(message.endInteraction, options); - if (options.oneofs) - object.message = "endInteraction"; + 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.dtmfDigits = null; + object.stability = 0; + object.speechEndOffset = null; + object.languageCode = ""; } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - object.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); - if (options.oneofs) - object.message = "telephonyTransferCall"; + if (message.messageType != null && message.hasOwnProperty("messageType")) + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.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.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) + object.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.toObject(message.dtmfDigits, options); + 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.v2beta1.SpeechWordInfo.toObject(message.speechWordInfo[j], options); } + if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) + object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ResponseMessage to JSON. + * Converts this StreamingRecognitionResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage + * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult * @instance * @returns {Object.} JSON object */ - ResponseMessage.prototype.toJSON = function toJSON() { + StreamingRecognitionResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ResponseMessage.Text = (function() { + /** + * MessageType enum. + * @name google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType + * @enum {number} + * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value + * @property {number} TRANSCRIPT=1 TRANSCRIPT value + * @property {number} DTMF_DIGITS=3 DTMF_DIGITS value + * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value + * @property {number} PARTIAL_DTMF_DIGITS=4 PARTIAL_DTMF_DIGITS value + */ + StreamingRecognitionResult.MessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSCRIPT"] = 1; + values[valuesById[3] = "DTMF_DIGITS"] = 3; + values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; + values[valuesById[4] = "PARTIAL_DTMF_DIGITS"] = 4; + return values; + })(); - /** - * Properties of a Text. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @interface IText - * @property {Array.|null} [text] Text text - */ + return StreamingRecognitionResult; + })(); - /** - * Constructs a new Text. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @classdesc Represents a Text. - * @implements IText - * @constructor - * @param {google.cloud.dialogflow.v2beta1.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]]; - } + v2beta1.TextInput = (function() { - /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @instance - */ - Text.prototype.text = $util.emptyArray; + /** + * Properties of a TextInput. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ITextInput + * @property {string|null} [text] TextInput text + * @property {string|null} [languageCode] TextInput languageCode + */ - /** - * Creates a new Text instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.Text} Text instance - */ - Text.create = function create(properties) { - return new Text(properties); - }; + /** + * Constructs a new TextInput. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a TextInput. + * @implements ITextInput + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ITextInput=} [properties] Properties to set + */ + function TextInput(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 Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.Text.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.v2beta1.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]); - return writer; - }; + /** + * TextInput text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @instance + */ + TextInput.prototype.text = ""; - /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.Text.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * TextInput languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @instance + */ + TextInput.prototype.languageCode = ""; - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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()); - }; + /** + * Creates a new TextInput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput instance + */ + TextInput.create = function create(properties) { + return new TextInput(properties); + }; - /** - * Verifies a Text message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.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"; - } - return null; - }; + /** + * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextInput} message TextInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextInput.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); + return writer; + }; - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - return message; - }; + /** + * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextInput} message TextInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @static - * @param {google.cloud.dialogflow.v2beta1.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 (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; + /** + * Decodes a TextInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.TextInput} TextInput + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.TextInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.languageCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return object; - }; - - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - return Text; - })(); + /** + * Decodes a TextInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - ResponseMessage.LiveAgentHandoff = (function() { + /** + * Verifies a TextInput message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @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) { + 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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; - /** - * Properties of a LiveAgentHandoff. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @interface ILiveAgentHandoff - * @property {google.protobuf.IStruct|null} [metadata] LiveAgentHandoff metadata - */ + /** + * Creates a TextInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput + */ + TextInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.TextInput) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.TextInput(); + if (object.text != null) + message.text = String(object.text); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Constructs a new LiveAgentHandoff. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @classdesc Represents a LiveAgentHandoff. - * @implements ILiveAgentHandoff - * @constructor - * @param {google.cloud.dialogflow.v2beta1.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]]; + /** + * Creates a plain object from a TextInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @static + * @param {google.cloud.dialogflow.v2beta1.TextInput} message TextInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.languageCode = ""; } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; - /** - * LiveAgentHandoff metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @instance - */ - LiveAgentHandoff.prototype.metadata = null; + /** + * Converts this TextInput to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.TextInput + * @instance + * @returns {Object.} JSON object + */ + TextInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new LiveAgentHandoff instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ILiveAgentHandoff=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff instance - */ - LiveAgentHandoff.create = function create(properties) { - return new LiveAgentHandoff(properties); - }; + return TextInput; + })(); - /** - * Encodes the specified LiveAgentHandoff message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.v2beta1.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; - }; + v2beta1.EventInput = (function() { - /** - * Encodes the specified LiveAgentHandoff message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.v2beta1.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(); - }; + /** + * Properties of an EventInput. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IEventInput + * @property {string|null} [name] EventInput name + * @property {google.protobuf.IStruct|null} [parameters] EventInput parameters + * @property {string|null} [languageCode] EventInput languageCode + */ - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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; - }; + /** + * Constructs a new EventInput. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an EventInput. + * @implements IEventInput + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IEventInput=} [properties] Properties to set + */ + function EventInput(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]]; + } - /** - * Decodes a LiveAgentHandoff message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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()); - }; + /** + * EventInput name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.EventInput + * @instance + */ + EventInput.prototype.name = ""; - /** - * Verifies a LiveAgentHandoff message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.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; - }; + /** + * EventInput parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.v2beta1.EventInput + * @instance + */ + EventInput.prototype.parameters = null; - /** - * Creates a LiveAgentHandoff message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff} LiveAgentHandoff - */ - LiveAgentHandoff.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - return message; - }; + /** + * EventInput languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.EventInput + * @instance + */ + EventInput.prototype.languageCode = ""; - /** - * Creates a plain object from a LiveAgentHandoff message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.LiveAgentHandoff - * @static - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.LiveAgentHandoff - * @instance - * @returns {Object.} JSON object - */ - LiveAgentHandoff.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LiveAgentHandoff; - })(); - - ResponseMessage.EndInteraction = (function() { - - /** - * Properties of an EndInteraction. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @interface IEndInteraction - */ - - /** - * Constructs a new EndInteraction. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @classdesc Represents an EndInteraction. - * @implements IEndInteraction - * @constructor - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.IEndInteraction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.EndInteraction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction} EndInteraction - */ - EndInteraction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction) - return object; - return new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction(); - }; - - /** - * Creates a plain object from an EndInteraction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.EndInteraction - * @static - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ResponseMessage.EndInteraction - * @instance - * @returns {Object.} JSON object - */ - EndInteraction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EndInteraction; - })(); - - ResponseMessage.TelephonyTransferCall = (function() { - - /** - * Properties of a TelephonyTransferCall. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @interface ITelephonyTransferCall - * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber - * @property {string|null} [sipUri] TelephonyTransferCall sipUri - */ - - /** - * Constructs a new TelephonyTransferCall. - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage - * @classdesc Represents a TelephonyTransferCall. - * @implements ITelephonyTransferCall - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set - */ - function TelephonyTransferCall(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]]; - } - - /** - * TelephonyTransferCall phoneNumber. - * @member {string|null|undefined} phoneNumber - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @instance - */ - TelephonyTransferCall.prototype.phoneNumber = null; - - /** - * TelephonyTransferCall sipUri. - * @member {string|null|undefined} sipUri - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @instance - */ - TelephonyTransferCall.prototype.sipUri = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TelephonyTransferCall endpoint. - * @member {"phoneNumber"|"sipUri"|undefined} endpoint - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @instance - */ - Object.defineProperty(TelephonyTransferCall.prototype, "endpoint", { - get: $util.oneOfGetter($oneOfFields = ["phoneNumber", "sipUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TelephonyTransferCall instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall instance - */ - TelephonyTransferCall.create = function create(properties) { - return new TelephonyTransferCall(properties); - }; - - /** - * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); - if (message.sipUri != null && Object.hasOwnProperty.call(message, "sipUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sipUri); - return writer; - }; - - /** - * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.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.v2beta1.ResponseMessage.TelephonyTransferCall(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.phoneNumber = reader.string(); - break; - case 2: - message.sipUri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TelephonyTransferCall message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TelephonyTransferCall.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - properties.endpoint = 1; - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - } - if (message.sipUri != null && message.hasOwnProperty("sipUri")) { - if (properties.endpoint === 1) - return "endpoint: multiple values"; - properties.endpoint = 1; - if (!$util.isString(message.sipUri)) - return "sipUri: string expected"; - } - return null; - }; - - /** - * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} TelephonyTransferCall - */ - TelephonyTransferCall.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - if (object.sipUri != null) - message.sipUri = String(object.sipUri); - return message; - }; - - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall} message TelephonyTransferCall - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonyTransferCall.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - object.phoneNumber = message.phoneNumber; - if (options.oneofs) - object.endpoint = "phoneNumber"; - } - if (message.sipUri != null && message.hasOwnProperty("sipUri")) { - object.sipUri = message.sipUri; - if (options.oneofs) - object.endpoint = "sipUri"; - } - return object; - }; - - /** - * Converts this TelephonyTransferCall to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ResponseMessage.TelephonyTransferCall - * @instance - * @returns {Object.} JSON object - */ - TelephonyTransferCall.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TelephonyTransferCall; - })(); - - return ResponseMessage; - })(); - - v2beta1.GcsSources = (function() { - - /** - * Properties of a GcsSources. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGcsSources - * @property {Array.|null} [uris] GcsSources uris - */ - - /** - * Constructs a new GcsSources. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GcsSources. - * @implements IGcsSources - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGcsSources=} [properties] Properties to set - */ - function GcsSources(properties) { - this.uris = []; - 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]]; - } - - /** - * GcsSources uris. - * @member {Array.} uris - * @memberof google.cloud.dialogflow.v2beta1.GcsSources - * @instance - */ - GcsSources.prototype.uris = $util.emptyArray; - - /** - * Creates a new GcsSources instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.GcsSources - * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSources=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources instance - */ - GcsSources.create = function create(properties) { - return new GcsSources(properties); - }; + /** + * Creates a new EventInput instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.EventInput + * @static + * @param {google.cloud.dialogflow.v2beta1.IEventInput=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput instance + */ + EventInput.create = function create(properties) { + return new EventInput(properties); + }; /** - * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. + * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EventInput.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSources} message GcsSources message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSources.encode = function encode(message, writer) { + EventInput.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uris != null && message.uris.length) - for (var i = 0; i < message.uris.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. + * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EventInput.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSources} message GcsSources message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEventInput} message EventInput message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSources.encodeDelimited = function encodeDelimited(message, writer) { + EventInput.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsSources message from the specified reader or buffer. + * Decodes an EventInput message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GcsSources} GcsSources + * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSources.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.v2beta1.GcsSources(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.EventInput(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; case 2: - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -96311,119 +96116,129 @@ }; /** - * Decodes a GcsSources 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.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources + * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSources.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 GcsSources message. + * Verifies an EventInput message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsSources.verify = function verify(message) { + EventInput.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uris != null && message.hasOwnProperty("uris")) { - if (!Array.isArray(message.uris)) - return "uris: array expected"; - for (var i = 0; i < message.uris.length; ++i) - if (!$util.isString(message.uris[i])) - return "uris: string[] expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a GcsSources 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.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources + * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput */ - GcsSources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GcsSources) + EventInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EventInput) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GcsSources(); - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.cloud.dialogflow.v2beta1.GcsSources.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.EventInput(); + if (object.name != null) + message.name = String(object.name); + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.EventInput.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a GcsSources 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.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @static - * @param {google.cloud.dialogflow.v2beta1.GcsSources} message GcsSources + * @param {google.cloud.dialogflow.v2beta1.EventInput} message EventInput * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsSources.toObject = function toObject(message, options) { + EventInput.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uris = []; - if (message.uris && message.uris.length) { - object.uris = []; - for (var j = 0; j < message.uris.length; ++j) - object.uris[j] = message.uris[j]; + if (options.defaults) { + object.name = ""; + object.parameters = null; + object.languageCode = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this GcsSources to JSON. + * Converts this EventInput to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GcsSources + * @memberof google.cloud.dialogflow.v2beta1.EventInput * @instance * @returns {Object.} JSON object */ - GcsSources.prototype.toJSON = function toJSON() { + EventInput.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsSources; + return EventInput; })(); - v2beta1.GcsSource = (function() { + v2beta1.SentimentAnalysisRequestConfig = (function() { /** - * Properties of a GcsSource. + * Properties of a SentimentAnalysisRequestConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGcsSource - * @property {string|null} [uri] GcsSource uri + * @interface ISentimentAnalysisRequestConfig + * @property {boolean|null} [analyzeQueryTextSentiment] SentimentAnalysisRequestConfig analyzeQueryTextSentiment */ /** - * Constructs a new GcsSource. + * Constructs a new SentimentAnalysisRequestConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource + * @classdesc Represents a SentimentAnalysisRequestConfig. + * @implements ISentimentAnalysisRequestConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGcsSource=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig=} [properties] Properties to set */ - function GcsSource(properties) { + function SentimentAnalysisRequestConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96431,75 +96246,75 @@ } /** - * GcsSource uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * SentimentAnalysisRequestConfig analyzeQueryTextSentiment. + * @member {boolean} analyzeQueryTextSentiment + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @instance */ - GcsSource.prototype.uri = ""; + SentimentAnalysisRequestConfig.prototype.analyzeQueryTextSentiment = false; /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new SentimentAnalysisRequestConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource instance + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig instance */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); + SentimentAnalysisRequestConfig.create = function create(properties) { + return new SentimentAnalysisRequestConfig(properties); }; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. + * Encodes the specified SentimentAnalysisRequestConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encode = function encode(message, writer) { + SentimentAnalysisRequestConfig.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.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.analyzeQueryTextSentiment); return writer; }; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. + * Encodes the specified SentimentAnalysisRequestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + SentimentAnalysisRequestConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decode = function decode(reader, length) { + SentimentAnalysisRequestConfig.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.v2beta1.GcsSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uri = reader.string(); + message.analyzeQueryTextSentiment = reader.bool(); break; default: reader.skipType(tag & 7); @@ -96510,213 +96325,107 @@ }; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { + SentimentAnalysisRequestConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsSource message. + * Verifies a SentimentAnalysisRequestConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsSource.verify = function verify(message) { + SentimentAnalysisRequestConfig.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.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) + if (typeof message.analyzeQueryTextSentiment !== "boolean") + return "analyzeQueryTextSentiment: boolean expected"; return null; }; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentAnalysisRequestConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GcsSource) + SentimentAnalysisRequestConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GcsSource(); - if (object.uri != null) - message.uri = String(object.uri); + var message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig(); + if (object.analyzeQueryTextSentiment != null) + message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); return message; }; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * Creates a plain object from a SentimentAnalysisRequestConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @static - * @param {google.cloud.dialogflow.v2beta1.GcsSource} message GcsSource + * @param {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsSource.toObject = function toObject(message, options) { + SentimentAnalysisRequestConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; + object.analyzeQueryTextSentiment = false; + if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) + object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; return object; }; /** - * Converts this GcsSource to JSON. + * Converts this SentimentAnalysisRequestConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GcsSource + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig * @instance * @returns {Object.} JSON object */ - GcsSource.prototype.toJSON = function toJSON() { + SentimentAnalysisRequestConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GcsSource; - })(); - - v2beta1.Sessions = (function() { - - /** - * Constructs a new Sessions service. - * @memberof google.cloud.dialogflow.v2beta1 - * @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); - } - - (Sessions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Sessions; - - /** - * Creates new Sessions service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Sessions#detectIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @typedef DetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.DetectIntentResponse} [response] DetectIntentResponse - */ - - /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DetectIntentRequest, $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse, request, callback); - }, "name", { value: "DetectIntent" }); - - /** - * Calls DetectIntent. - * @function detectIntent - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} request DetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Sessions#streamingDetectIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @typedef StreamingDetectIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} [response] StreamingDetectIntentResponse - */ - - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @instance - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.StreamingDetectIntentRequest, $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse, request, callback); - }, "name", { value: "StreamingDetectIntent" }); - - /** - * Calls StreamingDetectIntent. - * @function streamingDetectIntent - * @memberof google.cloud.dialogflow.v2beta1.Sessions - * @instance - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} request StreamingDetectIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Sessions; + return SentimentAnalysisRequestConfig; })(); - v2beta1.DetectIntentRequest = (function() { + v2beta1.SentimentAnalysisResult = (function() { /** - * Properties of a DetectIntentRequest. + * Properties of a SentimentAnalysisResult. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDetectIntentRequest - * @property {string|null} [session] DetectIntentRequest session - * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] DetectIntentRequest queryParams - * @property {google.cloud.dialogflow.v2beta1.IQueryInput|null} [queryInput] DetectIntentRequest queryInput - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentRequest outputAudioConfig - * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] DetectIntentRequest outputAudioConfigMask - * @property {Uint8Array|null} [inputAudio] DetectIntentRequest inputAudio + * @interface ISentimentAnalysisResult + * @property {google.cloud.dialogflow.v2beta1.ISentiment|null} [queryTextSentiment] SentimentAnalysisResult queryTextSentiment */ /** - * Constructs a new DetectIntentRequest. + * Constructs a new SentimentAnalysisResult. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DetectIntentRequest. - * @implements IDetectIntentRequest + * @classdesc Represents a SentimentAnalysisResult. + * @implements ISentimentAnalysisResult * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult=} [properties] Properties to set */ - function DetectIntentRequest(properties) { + function SentimentAnalysisResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -96724,140 +96433,75 @@ } /** - * DetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.session = ""; - - /** - * DetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.queryParams = null; - - /** - * DetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.v2beta1.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.queryInput = null; - - /** - * DetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.outputAudioConfig = null; - - /** - * DetectIntentRequest outputAudioConfigMask. - * @member {google.protobuf.IFieldMask|null|undefined} outputAudioConfigMask - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest - * @instance - */ - DetectIntentRequest.prototype.outputAudioConfigMask = null; - - /** - * DetectIntentRequest inputAudio. - * @member {Uint8Array} inputAudio - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * SentimentAnalysisResult queryTextSentiment. + * @member {google.cloud.dialogflow.v2beta1.ISentiment|null|undefined} queryTextSentiment + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @instance */ - DetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); + SentimentAnalysisResult.prototype.queryTextSentiment = null; /** - * Creates a new DetectIntentRequest instance using the specified properties. + * Creates a new SentimentAnalysisResult instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest instance + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult instance */ - DetectIntentRequest.create = function create(properties) { - return new DetectIntentRequest(properties); + SentimentAnalysisResult.create = function create(properties) { + return new SentimentAnalysisResult(properties); }; /** - * Encodes the specified DetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encode = function encode(message, writer) { + SentimentAnalysisResult.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.v2beta1.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.v2beta1.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.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.inputAudio != null && Object.hasOwnProperty.call(message, "inputAudio")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.inputAudio); - if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) - $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.queryTextSentiment != null && Object.hasOwnProperty.call(message, "queryTextSentiment")) + $root.google.cloud.dialogflow.v2beta1.Sentiment.encode(message.queryTextSentiment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentRequest.verify|verify} messages. + * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentRequest} message DetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentRequest message from the specified reader or buffer. + * Decodes a SentimentAnalysisResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult * @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) { + 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.v2beta1.DetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); - break; - case 2: - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); - break; - case 3: - message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.decode(reader, reader.uint32()); - break; - case 4: - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); - break; - case 7: - message.outputAudioConfigMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 5: - message.inputAudio = reader.bytes(); + message.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -96868,183 +96512,113 @@ }; /** - * Decodes a DetectIntentRequest 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.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult * @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) { + SentimentAnalysisResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentRequest message. + * Verifies a SentimentAnalysisResult message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @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) { + SentimentAnalysisResult.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.v2beta1.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; - } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } - if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.outputAudioConfigMask); + if (message.queryTextSentiment != null && message.hasOwnProperty("queryTextSentiment")) { + var error = $root.google.cloud.dialogflow.v2beta1.Sentiment.verify(message.queryTextSentiment); if (error) - return "outputAudioConfigMask." + error; + return "queryTextSentiment." + error; } - if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) - if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) - return "inputAudio: buffer expected"; return null; }; /** - * Creates a DetectIntentRequest 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.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentRequest} DetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult */ - DetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DetectIntentRequest) + SentimentAnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.fromObject(object.queryInput); - } - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); + var message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult(); + if (object.queryTextSentiment != null) { + if (typeof object.queryTextSentiment !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.queryTextSentiment: object expected"); + message.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.fromObject(object.queryTextSentiment); } - if (object.outputAudioConfigMask != null) { - if (typeof object.outputAudioConfigMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentRequest.outputAudioConfigMask: object expected"); - message.outputAudioConfigMask = $root.google.protobuf.FieldMask.fromObject(object.outputAudioConfigMask); - } - if (object.inputAudio != null) - if (typeof object.inputAudio === "string") - $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); - else if (object.inputAudio.length) - message.inputAudio = object.inputAudio; return message; }; /** - * Creates a plain object from a DetectIntentRequest 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.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @static - * @param {google.cloud.dialogflow.v2beta1.DetectIntentRequest} message DetectIntentRequest + * @param {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} message SentimentAnalysisResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentRequest.toObject = function toObject(message, options) { + SentimentAnalysisResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.outputAudioConfig = null; - if (options.bytes === String) - object.inputAudio = ""; - else { - object.inputAudio = []; - if (options.bytes !== Array) - object.inputAudio = $util.newBuffer(object.inputAudio); - } - object.outputAudioConfigMask = 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.v2beta1.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.toObject(message.queryInput, options); - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); - if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) - object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; - if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) - object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); + if (options.defaults) + object.queryTextSentiment = null; + if (message.queryTextSentiment != null && message.hasOwnProperty("queryTextSentiment")) + object.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.toObject(message.queryTextSentiment, options); return object; }; /** - * Converts this DetectIntentRequest to JSON. + * Converts this SentimentAnalysisResult to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult * @instance * @returns {Object.} JSON object */ - DetectIntentRequest.prototype.toJSON = function toJSON() { + SentimentAnalysisResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DetectIntentRequest; + return SentimentAnalysisResult; })(); - v2beta1.DetectIntentResponse = (function() { + v2beta1.Sentiment = (function() { /** - * Properties of a DetectIntentResponse. + * Properties of a Sentiment. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDetectIntentResponse - * @property {string|null} [responseId] DetectIntentResponse responseId - * @property {google.cloud.dialogflow.v2beta1.IQueryResult|null} [queryResult] DetectIntentResponse queryResult - * @property {Array.|null} [alternativeQueryResults] DetectIntentResponse alternativeQueryResults - * @property {google.rpc.IStatus|null} [webhookStatus] DetectIntentResponse webhookStatus - * @property {Uint8Array|null} [outputAudio] DetectIntentResponse outputAudio - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] DetectIntentResponse outputAudioConfig + * @interface ISentiment + * @property {number|null} [score] Sentiment score + * @property {number|null} [magnitude] Sentiment magnitude */ /** - * Constructs a new DetectIntentResponse. + * Constructs a new Sentiment. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DetectIntentResponse. - * @implements IDetectIntentResponse + * @classdesc Represents a Sentiment. + * @implements ISentiment * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISentiment=} [properties] Properties to set */ - function DetectIntentResponse(properties) { - this.alternativeQueryResults = []; + function Sentiment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97052,143 +96626,88 @@ } /** - * DetectIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.responseId = ""; - - /** - * DetectIntentResponse queryResult. - * @member {google.cloud.dialogflow.v2beta1.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.queryResult = null; - - /** - * DetectIntentResponse alternativeQueryResults. - * @member {Array.} alternativeQueryResults - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.alternativeQueryResults = $util.emptyArray; - - /** - * DetectIntentResponse webhookStatus. - * @member {google.rpc.IStatus|null|undefined} webhookStatus - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse - * @instance - */ - DetectIntentResponse.prototype.webhookStatus = null; - - /** - * DetectIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * Sentiment score. + * @member {number} score + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @instance */ - DetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); + Sentiment.prototype.score = 0; /** - * DetectIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * Sentiment magnitude. + * @member {number} magnitude + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @instance */ - DetectIntentResponse.prototype.outputAudioConfig = null; + Sentiment.prototype.magnitude = 0; /** - * Creates a new DetectIntentResponse instance using the specified properties. + * Creates a new Sentiment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse instance + * @param {google.cloud.dialogflow.v2beta1.ISentiment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment instance */ - DetectIntentResponse.create = function create(properties) { - return new DetectIntentResponse(properties); + Sentiment.create = function create(properties) { + return new Sentiment(properties); }; /** - * Encodes the specified DetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. + * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentiment} message Sentiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encode = function encode(message, writer) { + Sentiment.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.v2beta1.QueryResult.encode(message.queryResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.webhookStatus != null && Object.hasOwnProperty.call(message, "webhookStatus")) - $root.google.rpc.Status.encode(message.webhookStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.outputAudio); - if (message.alternativeQueryResults != null && message.alternativeQueryResults.length) - for (var i = 0; i < message.alternativeQueryResults.length; ++i) - $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.alternativeQueryResults[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + 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 DetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DetectIntentResponse.verify|verify} messages. + * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static - * @param {google.cloud.dialogflow.v2beta1.IDetectIntentResponse} message DetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISentiment} message Sentiment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + Sentiment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer. + * Decodes a Sentiment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment * @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) { + Sentiment.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.v2beta1.DetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Sentiment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.responseId = reader.string(); + message.score = reader.float(); break; case 2: - message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.alternativeQueryResults && message.alternativeQueryResults.length)) - message.alternativeQueryResults = []; - message.alternativeQueryResults.push($root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32())); - break; - case 3: - message.webhookStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 4: - message.outputAudio = reader.bytes(); - break; - case 6: - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + message.magnitude = reader.float(); break; default: reader.skipType(tag & 7); @@ -97199,429 +96718,453 @@ }; /** - * Decodes a DetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a Sentiment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment * @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) { + Sentiment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DetectIntentResponse message. + * Verifies a Sentiment message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @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) { + Sentiment.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.v2beta1.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.alternativeQueryResults != null && message.hasOwnProperty("alternativeQueryResults")) { - if (!Array.isArray(message.alternativeQueryResults)) - return "alternativeQueryResults: array expected"; - for (var i = 0; i < message.alternativeQueryResults.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.alternativeQueryResults[i]); - if (error) - return "alternativeQueryResults." + error; - } - } - if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) { - var error = $root.google.rpc.Status.verify(message.webhookStatus); - if (error) - return "webhookStatus." + 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.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); - if (error) - return "outputAudioConfig." + error; - } + 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 DetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DetectIntentResponse} DetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment */ - DetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse) + Sentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Sentiment) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DetectIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.queryResult); - } - if (object.alternativeQueryResults) { - if (!Array.isArray(object.alternativeQueryResults)) - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.alternativeQueryResults: array expected"); - message.alternativeQueryResults = []; - for (var i = 0; i < object.alternativeQueryResults.length; ++i) { - if (typeof object.alternativeQueryResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.alternativeQueryResults: object expected"); - message.alternativeQueryResults[i] = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.alternativeQueryResults[i]); - } - } - if (object.webhookStatus != null) { - if (typeof object.webhookStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.DetectIntentResponse.webhookStatus: object expected"); - message.webhookStatus = $root.google.rpc.Status.fromObject(object.webhookStatus); - } - 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.v2beta1.DetectIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); - } + var message = new $root.google.cloud.dialogflow.v2beta1.Sentiment(); + 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 DetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a Sentiment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @static - * @param {google.cloud.dialogflow.v2beta1.DetectIntentResponse} message DetectIntentResponse + * @param {google.cloud.dialogflow.v2beta1.Sentiment} message Sentiment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DetectIntentResponse.toObject = function toObject(message, options) { + Sentiment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.alternativeQueryResults = []; if (options.defaults) { - object.responseId = ""; - object.queryResult = null; - object.webhookStatus = 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.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.queryResult, options); - if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) - object.webhookStatus = $root.google.rpc.Status.toObject(message.webhookStatus, 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.alternativeQueryResults && message.alternativeQueryResults.length) { - object.alternativeQueryResults = []; - for (var j = 0; j < message.alternativeQueryResults.length; ++j) - object.alternativeQueryResults[j] = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.alternativeQueryResults[j], options); + object.score = 0; + object.magnitude = 0; } - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); + 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 DetectIntentResponse to JSON. + * Converts this Sentiment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.Sentiment * @instance * @returns {Object.} JSON object */ - DetectIntentResponse.prototype.toJSON = function toJSON() { + Sentiment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DetectIntentResponse; + return Sentiment; })(); - v2beta1.QueryParameters = (function() { - - /** - * Properties of a QueryParameters. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IQueryParameters - * @property {string|null} [timeZone] QueryParameters timeZone - * @property {google.type.ILatLng|null} [geoLocation] QueryParameters geoLocation - * @property {Array.|null} [contexts] QueryParameters contexts - * @property {boolean|null} [resetContexts] QueryParameters resetContexts - * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes - * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload - * @property {Array.|null} [knowledgeBaseNames] QueryParameters knowledgeBaseNames - * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null} [sentimentAnalysisRequestConfig] QueryParameters sentimentAnalysisRequestConfig - * @property {Array.|null} [subAgents] QueryParameters subAgents - * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders - */ + v2beta1.Contexts = (function() { /** - * Constructs a new QueryParameters. + * Constructs a new Contexts service. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a QueryParameters. - * @implements IQueryParameters + * @classdesc Represents a Contexts + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.v2beta1.IQueryParameters=} [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 QueryParameters(properties) { - this.contexts = []; - this.sessionEntityTypes = []; - this.knowledgeBaseNames = []; - this.subAgents = []; - this.webhookHeaders = {}; - 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 Contexts(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Contexts.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Contexts; + /** - * QueryParameters timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters - * @instance + * Creates new Contexts service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @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 {Contexts} RPC service. Useful where requests and/or responses are streamed. */ - QueryParameters.prototype.timeZone = ""; + Contexts.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * QueryParameters geoLocation. - * @member {google.type.ILatLng|null|undefined} geoLocation - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#listContexts}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef ListContextsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListContextsResponse} [response] ListContextsResponse */ - QueryParameters.prototype.geoLocation = null; /** - * QueryParameters contexts. - * @member {Array.} contexts - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls ListContexts. + * @function listContexts + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} request ListContextsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.ListContextsCallback} callback Node-style callback called with the error, if any, and ListContextsResponse + * @returns {undefined} + * @variation 1 */ - QueryParameters.prototype.contexts = $util.emptyArray; + Object.defineProperty(Contexts.prototype.listContexts = function listContexts(request, callback) { + return this.rpcCall(listContexts, $root.google.cloud.dialogflow.v2beta1.ListContextsRequest, $root.google.cloud.dialogflow.v2beta1.ListContextsResponse, request, callback); + }, "name", { value: "ListContexts" }); /** - * QueryParameters resetContexts. - * @member {boolean} resetContexts - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls ListContexts. + * @function listContexts + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} request ListContextsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryParameters.prototype.resetContexts = false; /** - * QueryParameters sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#getContext}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef GetContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context */ - QueryParameters.prototype.sessionEntityTypes = $util.emptyArray; /** - * QueryParameters payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls GetContext. + * @function getContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} request GetContextRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.GetContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 */ - QueryParameters.prototype.payload = null; + Object.defineProperty(Contexts.prototype.getContext = function getContext(request, callback) { + return this.rpcCall(getContext, $root.google.cloud.dialogflow.v2beta1.GetContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); + }, "name", { value: "GetContext" }); /** - * QueryParameters knowledgeBaseNames. - * @member {Array.} knowledgeBaseNames - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls GetContext. + * @function getContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} request GetContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryParameters.prototype.knowledgeBaseNames = $util.emptyArray; /** - * QueryParameters sentimentAnalysisRequestConfig. - * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig|null|undefined} sentimentAnalysisRequestConfig - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#createContext}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef CreateContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context */ - QueryParameters.prototype.sentimentAnalysisRequestConfig = null; /** - * QueryParameters subAgents. - * @member {Array.} subAgents - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls CreateContext. + * @function createContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} request CreateContextRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.CreateContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 */ - QueryParameters.prototype.subAgents = $util.emptyArray; + Object.defineProperty(Contexts.prototype.createContext = function createContext(request, callback) { + return this.rpcCall(createContext, $root.google.cloud.dialogflow.v2beta1.CreateContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); + }, "name", { value: "CreateContext" }); /** - * QueryParameters webhookHeaders. - * @member {Object.} webhookHeaders - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * Calls CreateContext. + * @function createContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} request CreateContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - QueryParameters.prototype.webhookHeaders = $util.emptyObject; /** - * Creates a new QueryParameters instance using the specified properties. + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#updateContext}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef UpdateContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context + */ + + /** + * Calls UpdateContext. + * @function updateContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} request UpdateContextRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.UpdateContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Contexts.prototype.updateContext = function updateContext(request, callback) { + return this.rpcCall(updateContext, $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); + }, "name", { value: "UpdateContext" }); + + /** + * Calls UpdateContext. + * @function updateContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} request UpdateContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteContext}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef DeleteContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteContext. + * @function deleteContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} request DeleteContextRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.DeleteContextCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Contexts.prototype.deleteContext = function deleteContext(request, callback) { + return this.rpcCall(deleteContext, $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteContext" }); + + /** + * Calls DeleteContext. + * @function deleteContext + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} request DeleteContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteAllContexts}. + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @typedef DeleteAllContextsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAllContexts. + * @function deleteAllContexts + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} request DeleteAllContextsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContextsCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Contexts.prototype.deleteAllContexts = function deleteAllContexts(request, callback) { + return this.rpcCall(deleteAllContexts, $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAllContexts" }); + + /** + * Calls DeleteAllContexts. + * @function deleteAllContexts + * @memberof google.cloud.dialogflow.v2beta1.Contexts + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} request DeleteAllContextsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Contexts; + })(); + + v2beta1.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IContext + * @property {string|null} [name] Context name + * @property {number|null} [lifespanCount] Context lifespanCount + * @property {google.protobuf.IStruct|null} [parameters] Context parameters + */ + + /** + * Constructs a new Context. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IContext=} [properties] Properties to set + */ + function Context(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]]; + } + + /** + * Context name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Context + * @instance + */ + Context.prototype.name = ""; + + /** + * Context lifespanCount. + * @member {number} lifespanCount + * @memberof google.cloud.dialogflow.v2beta1.Context + * @instance + */ + Context.prototype.lifespanCount = 0; + + /** + * Context parameters. + * @member {google.protobuf.IStruct|null|undefined} parameters + * @memberof google.cloud.dialogflow.v2beta1.Context + * @instance + */ + Context.prototype.parameters = null; + + /** + * Creates a new Context instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryParameters=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters instance + * @param {google.cloud.dialogflow.v2beta1.IContext=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Context} Context instance */ - QueryParameters.create = function create(properties) { - return new QueryParameters(properties); + Context.create = function create(properties) { + return new Context(properties); }; /** - * Encodes the specified QueryParameters message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. + * Encodes the specified Context message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IContext} message Context message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encode = function encode(message, writer) { + Context.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.contexts != null && message.contexts.length) - for (var i = 0; i < message.contexts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.contexts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resetContexts != null && Object.hasOwnProperty.call(message, "resetContexts")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.resetContexts); - if (message.sessionEntityTypes != null && message.sessionEntityTypes.length) - for (var i = 0; i < message.sessionEntityTypes.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SessionEntityType.encode(message.sessionEntityTypes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.sentimentAnalysisRequestConfig != null && Object.hasOwnProperty.call(message, "sentimentAnalysisRequestConfig")) - $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.encode(message.sentimentAnalysisRequestConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.knowledgeBaseNames != null && message.knowledgeBaseNames.length) - for (var i = 0; i < message.knowledgeBaseNames.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.knowledgeBaseNames[i]); - if (message.subAgents != null && message.subAgents.length) - for (var i = 0; i < message.subAgents.length; ++i) - $root.google.cloud.dialogflow.v2beta1.SubAgent.encode(message.subAgents[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.webhookHeaders[keys[i]]).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.lifespanCount != null && Object.hasOwnProperty.call(message, "lifespanCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lifespanCount); + 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(); return writer; }; /** - * Encodes the specified QueryParameters message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryParameters.verify|verify} messages. + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryParameters} message QueryParameters message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IContext} message Context message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryParameters.encodeDelimited = function encodeDelimited(message, writer) { + Context.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryParameters message from the specified reader or buffer. + * Decodes a Context message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.v2beta1.Context} Context * @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) { + Context.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.v2beta1.QueryParameters(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Context(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeZone = reader.string(); + message.name = reader.string(); break; case 2: - message.geoLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); + message.lifespanCount = reader.int32(); break; case 3: - if (!(message.contexts && message.contexts.length)) - message.contexts = []; - message.contexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); - break; - case 4: - message.resetContexts = reader.bool(); - break; - case 5: - if (!(message.sessionEntityTypes && message.sessionEntityTypes.length)) - message.sessionEntityTypes = []; - message.sessionEntityTypes.push($root.google.cloud.dialogflow.v2beta1.SessionEntityType.decode(reader, reader.uint32())); - break; - case 6: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 12: - if (!(message.knowledgeBaseNames && message.knowledgeBaseNames.length)) - message.knowledgeBaseNames = []; - message.knowledgeBaseNames.push(reader.string()); - break; - case 10: - message.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.decode(reader, reader.uint32()); - break; - case 13: - if (!(message.subAgents && message.subAgents.length)) - message.subAgents = []; - message.subAgents.push($root.google.cloud.dialogflow.v2beta1.SubAgent.decode(reader, reader.uint32())); - break; - case 14: - 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; + message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -97632,278 +97175,131 @@ }; /** - * Decodes a QueryParameters message from the specified reader or buffer, length delimited. + * Decodes a Context message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.v2beta1.Context} Context * @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) { + Context.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryParameters message. + * Verifies a Context message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @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) { + Context.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.contexts != null && message.hasOwnProperty("contexts")) { - if (!Array.isArray(message.contexts)) - return "contexts: array expected"; - for (var i = 0; i < message.contexts.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.contexts[i]); - if (error) - return "contexts." + error; - } - } - if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) - if (typeof message.resetContexts !== "boolean") - return "resetContexts: boolean 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.v2beta1.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.knowledgeBaseNames != null && message.hasOwnProperty("knowledgeBaseNames")) { - if (!Array.isArray(message.knowledgeBaseNames)) - return "knowledgeBaseNames: array expected"; - for (var i = 0; i < message.knowledgeBaseNames.length; ++i) - if (!$util.isString(message.knowledgeBaseNames[i])) - return "knowledgeBaseNames: string[] expected"; - } - if (message.sentimentAnalysisRequestConfig != null && message.hasOwnProperty("sentimentAnalysisRequestConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify(message.sentimentAnalysisRequestConfig); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.lifespanCount != null && message.hasOwnProperty("lifespanCount")) + if (!$util.isInteger(message.lifespanCount)) + return "lifespanCount: integer expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + var error = $root.google.protobuf.Struct.verify(message.parameters); if (error) - return "sentimentAnalysisRequestConfig." + error; - } - if (message.subAgents != null && message.hasOwnProperty("subAgents")) { - if (!Array.isArray(message.subAgents)) - return "subAgents: array expected"; - for (var i = 0; i < message.subAgents.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.SubAgent.verify(message.subAgents[i]); - if (error) - return "subAgents." + error; - } - } - 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 "parameters." + error; } return null; }; /** - * Creates a QueryParameters message from a plain object. Also converts values to their respective internal types. + * Creates a Context message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.QueryParameters} QueryParameters + * @returns {google.cloud.dialogflow.v2beta1.Context} Context */ - QueryParameters.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryParameters) + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Context) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.QueryParameters(); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.geoLocation != null) { - if (typeof object.geoLocation !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.geoLocation: object expected"); - message.geoLocation = $root.google.type.LatLng.fromObject(object.geoLocation); - } - if (object.contexts) { - if (!Array.isArray(object.contexts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.contexts: array expected"); - message.contexts = []; - for (var i = 0; i < object.contexts.length; ++i) { - if (typeof object.contexts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.contexts: object expected"); - message.contexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.contexts[i]); - } - } - if (object.resetContexts != null) - message.resetContexts = Boolean(object.resetContexts); - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.QueryParameters.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityTypes[i]); - } - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.knowledgeBaseNames) { - if (!Array.isArray(object.knowledgeBaseNames)) - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.knowledgeBaseNames: array expected"); - message.knowledgeBaseNames = []; - for (var i = 0; i < object.knowledgeBaseNames.length; ++i) - message.knowledgeBaseNames[i] = String(object.knowledgeBaseNames[i]); - } - if (object.sentimentAnalysisRequestConfig != null) { - if (typeof object.sentimentAnalysisRequestConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.sentimentAnalysisRequestConfig: object expected"); - message.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.fromObject(object.sentimentAnalysisRequestConfig); - } - if (object.subAgents) { - if (!Array.isArray(object.subAgents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.subAgents: array expected"); - message.subAgents = []; - for (var i = 0; i < object.subAgents.length; ++i) { - if (typeof object.subAgents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryParameters.subAgents: object expected"); - message.subAgents[i] = $root.google.cloud.dialogflow.v2beta1.SubAgent.fromObject(object.subAgents[i]); - } - } - if (object.webhookHeaders) { - if (typeof object.webhookHeaders !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.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]]); + var message = new $root.google.cloud.dialogflow.v2beta1.Context(); + if (object.name != null) + message.name = String(object.name); + if (object.lifespanCount != null) + message.lifespanCount = object.lifespanCount | 0; + if (object.parameters != null) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Context.parameters: object expected"); + message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); } return message; }; /** - * Creates a plain object from a QueryParameters message. Also converts values to other types if specified. + * Creates a plain object from a Context message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @static - * @param {google.cloud.dialogflow.v2beta1.QueryParameters} message QueryParameters + * @param {google.cloud.dialogflow.v2beta1.Context} message Context * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryParameters.toObject = function toObject(message, options) { + Context.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.contexts = []; - object.sessionEntityTypes = []; - object.knowledgeBaseNames = []; - object.subAgents = []; - } - if (options.objects || options.defaults) - object.webhookHeaders = {}; if (options.defaults) { - object.timeZone = ""; - object.geoLocation = null; - object.resetContexts = false; - object.payload = null; - object.sentimentAnalysisRequestConfig = null; - } - 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.contexts && message.contexts.length) { - object.contexts = []; - for (var j = 0; j < message.contexts.length; ++j) - object.contexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.contexts[j], options); - } - if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) - object.resetContexts = message.resetContexts; - if (message.sessionEntityTypes && message.sessionEntityTypes.length) { - object.sessionEntityTypes = []; - for (var j = 0; j < message.sessionEntityTypes.length; ++j) - object.sessionEntityTypes[j] = $root.google.cloud.dialogflow.v2beta1.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.sentimentAnalysisRequestConfig != null && message.hasOwnProperty("sentimentAnalysisRequestConfig")) - object.sentimentAnalysisRequestConfig = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.toObject(message.sentimentAnalysisRequestConfig, options); - if (message.knowledgeBaseNames && message.knowledgeBaseNames.length) { - object.knowledgeBaseNames = []; - for (var j = 0; j < message.knowledgeBaseNames.length; ++j) - object.knowledgeBaseNames[j] = message.knowledgeBaseNames[j]; - } - if (message.subAgents && message.subAgents.length) { - object.subAgents = []; - for (var j = 0; j < message.subAgents.length; ++j) - object.subAgents[j] = $root.google.cloud.dialogflow.v2beta1.SubAgent.toObject(message.subAgents[j], options); - } - 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]]; + object.name = ""; + object.lifespanCount = 0; + object.parameters = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lifespanCount != null && message.hasOwnProperty("lifespanCount")) + object.lifespanCount = message.lifespanCount; + if (message.parameters != null && message.hasOwnProperty("parameters")) + object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); return object; }; /** - * Converts this QueryParameters to JSON. + * Converts this Context to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.QueryParameters + * @memberof google.cloud.dialogflow.v2beta1.Context * @instance * @returns {Object.} JSON object */ - QueryParameters.prototype.toJSON = function toJSON() { + Context.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryParameters; + return Context; })(); - v2beta1.QueryInput = (function() { + v2beta1.ListContextsRequest = (function() { /** - * Properties of a QueryInput. + * Properties of a ListContextsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IQueryInput - * @property {google.cloud.dialogflow.v2beta1.IInputAudioConfig|null} [audioConfig] QueryInput audioConfig - * @property {google.cloud.dialogflow.v2beta1.ITextInput|null} [text] QueryInput text - * @property {google.cloud.dialogflow.v2beta1.IEventInput|null} [event] QueryInput event - * @property {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null} [dtmf] QueryInput dtmf + * @interface IListContextsRequest + * @property {string|null} [parent] ListContextsRequest parent + * @property {number|null} [pageSize] ListContextsRequest pageSize + * @property {string|null} [pageToken] ListContextsRequest pageToken */ /** - * Constructs a new QueryInput. + * Constructs a new ListContextsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a QueryInput. - * @implements IQueryInput + * @classdesc Represents a ListContextsRequest. + * @implements IListContextsRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IQueryInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest=} [properties] Properties to set */ - function QueryInput(properties) { + function ListContextsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97911,128 +97307,101 @@ } /** - * QueryInput audioConfig. - * @member {google.cloud.dialogflow.v2beta1.IInputAudioConfig|null|undefined} audioConfig - * @memberof google.cloud.dialogflow.v2beta1.QueryInput - * @instance - */ - QueryInput.prototype.audioConfig = null; - - /** - * QueryInput text. - * @member {google.cloud.dialogflow.v2beta1.ITextInput|null|undefined} text - * @memberof google.cloud.dialogflow.v2beta1.QueryInput - * @instance - */ - QueryInput.prototype.text = null; - - /** - * QueryInput event. - * @member {google.cloud.dialogflow.v2beta1.IEventInput|null|undefined} event - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * ListContextsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @instance */ - QueryInput.prototype.event = null; + ListContextsRequest.prototype.parent = ""; /** - * QueryInput dtmf. - * @member {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null|undefined} dtmf - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * ListContextsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @instance */ - QueryInput.prototype.dtmf = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListContextsRequest.prototype.pageSize = 0; /** - * QueryInput input. - * @member {"audioConfig"|"text"|"event"|"dtmf"|undefined} input - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * ListContextsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @instance */ - Object.defineProperty(QueryInput.prototype, "input", { - get: $util.oneOfGetter($oneOfFields = ["audioConfig", "text", "event", "dtmf"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListContextsRequest.prototype.pageToken = ""; /** - * Creates a new QueryInput instance using the specified properties. + * Creates a new ListContextsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput instance + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest instance */ - QueryInput.create = function create(properties) { - return new QueryInput(properties); + ListContextsRequest.create = function create(properties) { + return new ListContextsRequest(properties); }; /** - * Encodes the specified QueryInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. + * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryInput} message QueryInput message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} message ListContextsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryInput.encode = function encode(message, writer) { + ListContextsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.audioConfig != null && Object.hasOwnProperty.call(message, "audioConfig")) - $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.encode(message.audioConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.v2beta1.TextInput.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) - $root.google.cloud.dialogflow.v2beta1.EventInput.encode(message.event, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dtmf != null && Object.hasOwnProperty.call(message, "dtmf")) - $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.encode(message.dtmf, 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.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 QueryInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryInput.verify|verify} messages. + * Encodes the specified ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryInput} message QueryInput message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} message ListContextsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryInput.encodeDelimited = function encodeDelimited(message, writer) { + ListContextsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryInput message from the specified reader or buffer. + * Decodes a ListContextsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryInput.decode = function decode(reader, length) { + ListContextsRequest.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.v2beta1.QueryInput(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListContextsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 2: - message.text = $root.google.cloud.dialogflow.v2beta1.TextInput.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.event = $root.google.cloud.dialogflow.v2beta1.EventInput.decode(reader, reader.uint32()); - break; - case 4: - message.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -98043,195 +97412,126 @@ }; /** - * Decodes a QueryInput message from the specified reader or buffer, length delimited. + * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest * @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) { + ListContextsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryInput message. + * Verifies a ListContextsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @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) { + ListContextsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.audioConfig != null && message.hasOwnProperty("audioConfig")) { - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.verify(message.audioConfig); - if (error) - return "audioConfig." + error; - } - } - if (message.text != null && message.hasOwnProperty("text")) { - if (properties.input === 1) - return "input: multiple values"; - properties.input = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.TextInput.verify(message.text); - if (error) - return "text." + 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.v2beta1.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.v2beta1.TelephonyDtmfEvents.verify(message.dtmf); - if (error) - return "dtmf." + 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 QueryInput message from a plain object. Also converts values to their respective internal types. + * Creates a ListContextsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.QueryInput} QueryInput + * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest */ - QueryInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryInput) + ListContextsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListContextsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.QueryInput(); - if (object.audioConfig != null) { - if (typeof object.audioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.audioConfig: object expected"); - message.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.fromObject(object.audioConfig); - } - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.text: object expected"); - message.text = $root.google.cloud.dialogflow.v2beta1.TextInput.fromObject(object.text); - } - if (object.event != null) { - if (typeof object.event !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.event: object expected"); - message.event = $root.google.cloud.dialogflow.v2beta1.EventInput.fromObject(object.event); - } - if (object.dtmf != null) { - if (typeof object.dtmf !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryInput.dtmf: object expected"); - message.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.fromObject(object.dtmf); - } + var message = new $root.google.cloud.dialogflow.v2beta1.ListContextsRequest(); + 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 QueryInput message. Also converts values to other types if specified. + * Creates a plain object from a ListContextsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.QueryInput} message QueryInput + * @param {google.cloud.dialogflow.v2beta1.ListContextsRequest} message ListContextsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryInput.toObject = function toObject(message, options) { + ListContextsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.audioConfig != null && message.hasOwnProperty("audioConfig")) { - object.audioConfig = $root.google.cloud.dialogflow.v2beta1.InputAudioConfig.toObject(message.audioConfig, options); - if (options.oneofs) - object.input = "audioConfig"; - } - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.v2beta1.TextInput.toObject(message.text, options); - if (options.oneofs) - object.input = "text"; - } - if (message.event != null && message.hasOwnProperty("event")) { - object.event = $root.google.cloud.dialogflow.v2beta1.EventInput.toObject(message.event, options); - if (options.oneofs) - object.input = "event"; - } - if (message.dtmf != null && message.hasOwnProperty("dtmf")) { - object.dtmf = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.toObject(message.dtmf, options); - if (options.oneofs) - object.input = "dtmf"; + 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 QueryInput to JSON. + * Converts this ListContextsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.QueryInput + * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest * @instance * @returns {Object.} JSON object */ - QueryInput.prototype.toJSON = function toJSON() { + ListContextsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryInput; + return ListContextsRequest; })(); - v2beta1.QueryResult = (function() { + v2beta1.ListContextsResponse = (function() { /** - * Properties of a QueryResult. + * Properties of a ListContextsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IQueryResult - * @property {string|null} [queryText] QueryResult queryText - * @property {string|null} [languageCode] QueryResult languageCode - * @property {number|null} [speechRecognitionConfidence] QueryResult speechRecognitionConfidence - * @property {string|null} [action] QueryResult action - * @property {google.protobuf.IStruct|null} [parameters] QueryResult parameters - * @property {boolean|null} [allRequiredParamsPresent] QueryResult allRequiredParamsPresent - * @property {boolean|null} [cancelsSlotFilling] QueryResult cancelsSlotFilling - * @property {string|null} [fulfillmentText] QueryResult fulfillmentText - * @property {Array.|null} [fulfillmentMessages] QueryResult fulfillmentMessages - * @property {string|null} [webhookSource] QueryResult webhookSource - * @property {google.protobuf.IStruct|null} [webhookPayload] QueryResult webhookPayload - * @property {Array.|null} [outputContexts] QueryResult outputContexts - * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] QueryResult intent - * @property {number|null} [intentDetectionConfidence] QueryResult intentDetectionConfidence - * @property {google.protobuf.IStruct|null} [diagnosticInfo] QueryResult diagnosticInfo - * @property {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null} [sentimentAnalysisResult] QueryResult sentimentAnalysisResult - * @property {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null} [knowledgeAnswers] QueryResult knowledgeAnswers + * @interface IListContextsResponse + * @property {Array.|null} [contexts] ListContextsResponse contexts + * @property {string|null} [nextPageToken] ListContextsResponse nextPageToken */ /** - * Constructs a new QueryResult. + * Constructs a new ListContextsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a QueryResult. - * @implements IQueryResult + * @classdesc Represents a ListContextsResponse. + * @implements IListContextsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IQueryResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse=} [properties] Properties to set */ - function QueryResult(properties) { - this.fulfillmentMessages = []; - this.outputContexts = []; + function ListContextsResponse(properties) { + this.contexts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98239,289 +97539,304 @@ } /** - * QueryResult queryText. - * @member {string} queryText - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * ListContextsResponse contexts. + * @member {Array.} contexts + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse * @instance */ - QueryResult.prototype.queryText = ""; + ListContextsResponse.prototype.contexts = $util.emptyArray; /** - * QueryResult languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * ListContextsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse * @instance */ - QueryResult.prototype.languageCode = ""; + ListContextsResponse.prototype.nextPageToken = ""; /** - * QueryResult speechRecognitionConfidence. - * @member {number} speechRecognitionConfidence - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Creates a new ListContextsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse instance */ - QueryResult.prototype.speechRecognitionConfidence = 0; + ListContextsResponse.create = function create(properties) { + return new ListContextsResponse(properties); + }; /** - * QueryResult action. - * @member {string} action - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Encodes the specified ListContextsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse} message ListContextsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryResult.prototype.action = ""; + ListContextsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contexts != null && message.contexts.length) + for (var i = 0; i < message.contexts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.contexts[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; + }; /** - * QueryResult parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Encodes the specified ListContextsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse} message ListContextsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - QueryResult.prototype.parameters = null; + ListContextsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * QueryResult allRequiredParamsPresent. - * @member {boolean} allRequiredParamsPresent - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Decodes a ListContextsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.prototype.allRequiredParamsPresent = false; + ListContextsResponse.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.v2beta1.ListContextsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.contexts && message.contexts.length)) + message.contexts = []; + message.contexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * QueryResult cancelsSlotFilling. - * @member {boolean} cancelsSlotFilling - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Decodes a ListContextsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryResult.prototype.cancelsSlotFilling = false; + ListContextsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * QueryResult fulfillmentText. - * @member {string} fulfillmentText - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Verifies a ListContextsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryResult.prototype.fulfillmentText = ""; + ListContextsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contexts != null && message.hasOwnProperty("contexts")) { + if (!Array.isArray(message.contexts)) + return "contexts: array expected"; + for (var i = 0; i < message.contexts.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.contexts[i]); + if (error) + return "contexts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * QueryResult fulfillmentMessages. - * @member {Array.} fulfillmentMessages - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Creates a ListContextsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse */ - QueryResult.prototype.fulfillmentMessages = $util.emptyArray; + ListContextsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListContextsResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListContextsResponse(); + if (object.contexts) { + if (!Array.isArray(object.contexts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListContextsResponse.contexts: array expected"); + message.contexts = []; + for (var i = 0; i < object.contexts.length; ++i) { + if (typeof object.contexts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListContextsResponse.contexts: object expected"); + message.contexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.contexts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * QueryResult webhookSource. - * @member {string} webhookSource - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Creates a plain object from a ListContextsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListContextsResponse} message ListContextsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - QueryResult.prototype.webhookSource = ""; - - /** - * QueryResult webhookPayload. - * @member {google.protobuf.IStruct|null|undefined} webhookPayload - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance - */ - QueryResult.prototype.webhookPayload = null; + ListContextsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contexts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.contexts && message.contexts.length) { + object.contexts = []; + for (var j = 0; j < message.contexts.length; ++j) + object.contexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.contexts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * QueryResult outputContexts. - * @member {Array.} outputContexts - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * Converts this ListContextsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse * @instance + * @returns {Object.} JSON object */ - QueryResult.prototype.outputContexts = $util.emptyArray; + ListContextsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * QueryResult intent. - * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance - */ - QueryResult.prototype.intent = null; + return ListContextsResponse; + })(); - /** - * QueryResult intentDetectionConfidence. - * @member {number} intentDetectionConfidence - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance - */ - QueryResult.prototype.intentDetectionConfidence = 0; + v2beta1.GetContextRequest = (function() { /** - * QueryResult diagnosticInfo. - * @member {google.protobuf.IStruct|null|undefined} diagnosticInfo - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Properties of a GetContextRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGetContextRequest + * @property {string|null} [name] GetContextRequest name */ - QueryResult.prototype.diagnosticInfo = null; /** - * QueryResult sentimentAnalysisResult. - * @member {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult|null|undefined} sentimentAnalysisResult - * @memberof google.cloud.dialogflow.v2beta1.QueryResult - * @instance + * Constructs a new GetContextRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GetContextRequest. + * @implements IGetContextRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest=} [properties] Properties to set */ - QueryResult.prototype.sentimentAnalysisResult = null; + function GetContextRequest(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 knowledgeAnswers. - * @member {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers|null|undefined} knowledgeAnswers - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * GetContextRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @instance */ - QueryResult.prototype.knowledgeAnswers = null; + GetContextRequest.prototype.name = ""; /** - * Creates a new QueryResult instance using the specified properties. + * Creates a new GetContextRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult instance + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest instance */ - QueryResult.create = function create(properties) { - return new QueryResult(properties); + GetContextRequest.create = function create(properties) { + return new GetContextRequest(properties); }; /** - * Encodes the specified QueryResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. + * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} message GetContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encode = function encode(message, writer) { + GetContextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryText); - if (message.speechRecognitionConfidence != null && Object.hasOwnProperty.call(message, "speechRecognitionConfidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.speechRecognitionConfidence); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.action); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.allRequiredParamsPresent != null && Object.hasOwnProperty.call(message, "allRequiredParamsPresent")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allRequiredParamsPresent); - if (message.fulfillmentText != null && Object.hasOwnProperty.call(message, "fulfillmentText")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.fulfillmentText); - if (message.fulfillmentMessages != null && message.fulfillmentMessages.length) - for (var i = 0; i < message.fulfillmentMessages.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.encode(message.fulfillmentMessages[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.webhookSource != null && Object.hasOwnProperty.call(message, "webhookSource")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.webhookSource); - if (message.webhookPayload != null && Object.hasOwnProperty.call(message, "webhookPayload")) - $root.google.protobuf.Struct.encode(message.webhookPayload, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.outputContexts != null && message.outputContexts.length) - for (var i = 0; i < message.outputContexts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.outputContexts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.v2beta1.Intent.encode(message.intent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.intentDetectionConfidence != null && Object.hasOwnProperty.call(message, "intentDetectionConfidence")) - writer.uint32(/* id 12, wireType 5 =*/101).float(message.intentDetectionConfidence); - if (message.diagnosticInfo != null && Object.hasOwnProperty.call(message, "diagnosticInfo")) - $root.google.protobuf.Struct.encode(message.diagnosticInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); - if (message.sentimentAnalysisResult != null && Object.hasOwnProperty.call(message, "sentimentAnalysisResult")) - $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.encode(message.sentimentAnalysisResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.knowledgeAnswers != null && Object.hasOwnProperty.call(message, "knowledgeAnswers")) - $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.encode(message.knowledgeAnswers, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.cancelsSlotFilling != null && Object.hasOwnProperty.call(message, "cancelsSlotFilling")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.cancelsSlotFilling); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.QueryResult.verify|verify} messages. + * Encodes the specified GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IQueryResult} message QueryResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} message GetContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { + GetContextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryResult message from the specified reader or buffer. + * Decodes a GetContextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest * @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) { + GetContextRequest.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.v2beta1.QueryResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetContextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.queryText = reader.string(); - break; - case 15: - message.languageCode = reader.string(); - break; - case 2: - message.speechRecognitionConfidence = reader.float(); - break; - case 3: - message.action = reader.string(); - break; - case 4: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 5: - message.allRequiredParamsPresent = reader.bool(); - break; - case 21: - message.cancelsSlotFilling = reader.bool(); - break; - case 6: - message.fulfillmentText = reader.string(); - break; - case 7: - if (!(message.fulfillmentMessages && message.fulfillmentMessages.length)) - message.fulfillmentMessages = []; - message.fulfillmentMessages.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.decode(reader, reader.uint32())); - break; - case 8: - message.webhookSource = reader.string(); - break; - case 9: - message.webhookPayload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 10: - if (!(message.outputContexts && message.outputContexts.length)) - message.outputContexts = []; - message.outputContexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); - break; - case 11: - message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32()); - break; - case 12: - message.intentDetectionConfidence = reader.float(); - break; - case 14: - message.diagnosticInfo = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 17: - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.decode(reader, reader.uint32()); - break; - case 18: - message.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -98532,303 +97847,108 @@ }; /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. + * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest * @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) { + GetContextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryResult message. + * Verifies a GetContextRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @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) { + GetContextRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.queryText != null && message.hasOwnProperty("queryText")) - if (!$util.isString(message.queryText)) - return "queryText: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.speechRecognitionConfidence != null && message.hasOwnProperty("speechRecognitionConfidence")) - if (typeof message.speechRecognitionConfidence !== "number") - return "speechRecognitionConfidence: number expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: 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.allRequiredParamsPresent != null && message.hasOwnProperty("allRequiredParamsPresent")) - if (typeof message.allRequiredParamsPresent !== "boolean") - return "allRequiredParamsPresent: boolean expected"; - if (message.cancelsSlotFilling != null && message.hasOwnProperty("cancelsSlotFilling")) - if (typeof message.cancelsSlotFilling !== "boolean") - return "cancelsSlotFilling: boolean expected"; - if (message.fulfillmentText != null && message.hasOwnProperty("fulfillmentText")) - if (!$util.isString(message.fulfillmentText)) - return "fulfillmentText: string expected"; - if (message.fulfillmentMessages != null && message.hasOwnProperty("fulfillmentMessages")) { - if (!Array.isArray(message.fulfillmentMessages)) - return "fulfillmentMessages: array expected"; - for (var i = 0; i < message.fulfillmentMessages.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.verify(message.fulfillmentMessages[i]); - if (error) - return "fulfillmentMessages." + error; - } - } - if (message.webhookSource != null && message.hasOwnProperty("webhookSource")) - if (!$util.isString(message.webhookSource)) - return "webhookSource: string expected"; - if (message.webhookPayload != null && message.hasOwnProperty("webhookPayload")) { - var error = $root.google.protobuf.Struct.verify(message.webhookPayload); - if (error) - return "webhookPayload." + error; - } - if (message.outputContexts != null && message.hasOwnProperty("outputContexts")) { - if (!Array.isArray(message.outputContexts)) - return "outputContexts: array expected"; - for (var i = 0; i < message.outputContexts.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.outputContexts[i]); - if (error) - return "outputContexts." + error; - } - } - if (message.intent != null && message.hasOwnProperty("intent")) { - var error = $root.google.cloud.dialogflow.v2beta1.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.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.v2beta1.SentimentAnalysisResult.verify(message.sentimentAnalysisResult); - if (error) - return "sentimentAnalysisResult." + error; - } - if (message.knowledgeAnswers != null && message.hasOwnProperty("knowledgeAnswers")) { - var error = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify(message.knowledgeAnswers); - if (error) - return "knowledgeAnswers." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. + * Creates a GetContextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.QueryResult} QueryResult + * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.QueryResult) + GetContextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetContextRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.QueryResult(); - if (object.queryText != null) - message.queryText = String(object.queryText); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.speechRecognitionConfidence != null) - message.speechRecognitionConfidence = Number(object.speechRecognitionConfidence); - if (object.action != null) - message.action = String(object.action); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.allRequiredParamsPresent != null) - message.allRequiredParamsPresent = Boolean(object.allRequiredParamsPresent); - if (object.cancelsSlotFilling != null) - message.cancelsSlotFilling = Boolean(object.cancelsSlotFilling); - if (object.fulfillmentText != null) - message.fulfillmentText = String(object.fulfillmentText); - if (object.fulfillmentMessages) { - if (!Array.isArray(object.fulfillmentMessages)) - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.fulfillmentMessages: array expected"); - message.fulfillmentMessages = []; - for (var i = 0; i < object.fulfillmentMessages.length; ++i) { - if (typeof object.fulfillmentMessages[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.fulfillmentMessages: object expected"); - message.fulfillmentMessages[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.fromObject(object.fulfillmentMessages[i]); - } - } - if (object.webhookSource != null) - message.webhookSource = String(object.webhookSource); - if (object.webhookPayload != null) { - if (typeof object.webhookPayload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.webhookPayload: object expected"); - message.webhookPayload = $root.google.protobuf.Struct.fromObject(object.webhookPayload); - } - if (object.outputContexts) { - if (!Array.isArray(object.outputContexts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.outputContexts: array expected"); - message.outputContexts = []; - for (var i = 0; i < object.outputContexts.length; ++i) { - if (typeof object.outputContexts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.outputContexts: object expected"); - message.outputContexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.outputContexts[i]); - } - } - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intent); - } - if (object.intentDetectionConfidence != null) - message.intentDetectionConfidence = Number(object.intentDetectionConfidence); - if (object.diagnosticInfo != null) { - if (typeof object.diagnosticInfo !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.QueryResult.sentimentAnalysisResult: object expected"); - message.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.fromObject(object.sentimentAnalysisResult); - } - if (object.knowledgeAnswers != null) { - if (typeof object.knowledgeAnswers !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.QueryResult.knowledgeAnswers: object expected"); - message.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.fromObject(object.knowledgeAnswers); - } + var message = new $root.google.cloud.dialogflow.v2beta1.GetContextRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. + * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.QueryResult} message QueryResult + * @param {google.cloud.dialogflow.v2beta1.GetContextRequest} message GetContextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryResult.toObject = function toObject(message, options) { + GetContextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fulfillmentMessages = []; - object.outputContexts = []; - } - if (options.defaults) { - object.queryText = ""; - object.speechRecognitionConfidence = 0; - object.action = ""; - object.parameters = null; - object.allRequiredParamsPresent = false; - object.fulfillmentText = ""; - object.webhookSource = ""; - object.webhookPayload = null; - object.intent = null; - object.intentDetectionConfidence = 0; - object.diagnosticInfo = null; - object.languageCode = ""; - object.sentimentAnalysisResult = null; - object.knowledgeAnswers = null; - object.cancelsSlotFilling = false; - } - if (message.queryText != null && message.hasOwnProperty("queryText")) - object.queryText = message.queryText; - if (message.speechRecognitionConfidence != null && message.hasOwnProperty("speechRecognitionConfidence")) - object.speechRecognitionConfidence = options.json && !isFinite(message.speechRecognitionConfidence) ? String(message.speechRecognitionConfidence) : message.speechRecognitionConfidence; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.allRequiredParamsPresent != null && message.hasOwnProperty("allRequiredParamsPresent")) - object.allRequiredParamsPresent = message.allRequiredParamsPresent; - if (message.fulfillmentText != null && message.hasOwnProperty("fulfillmentText")) - object.fulfillmentText = message.fulfillmentText; - if (message.fulfillmentMessages && message.fulfillmentMessages.length) { - object.fulfillmentMessages = []; - for (var j = 0; j < message.fulfillmentMessages.length; ++j) - object.fulfillmentMessages[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.toObject(message.fulfillmentMessages[j], options); - } - if (message.webhookSource != null && message.hasOwnProperty("webhookSource")) - object.webhookSource = message.webhookSource; - if (message.webhookPayload != null && message.hasOwnProperty("webhookPayload")) - object.webhookPayload = $root.google.protobuf.Struct.toObject(message.webhookPayload, options); - if (message.outputContexts && message.outputContexts.length) { - object.outputContexts = []; - for (var j = 0; j < message.outputContexts.length; ++j) - object.outputContexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.outputContexts[j], options); - } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.v2beta1.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.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.sentimentAnalysisResult != null && message.hasOwnProperty("sentimentAnalysisResult")) - object.sentimentAnalysisResult = $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.toObject(message.sentimentAnalysisResult, options); - if (message.knowledgeAnswers != null && message.hasOwnProperty("knowledgeAnswers")) - object.knowledgeAnswers = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.toObject(message.knowledgeAnswers, options); - if (message.cancelsSlotFilling != null && message.hasOwnProperty("cancelsSlotFilling")) - object.cancelsSlotFilling = message.cancelsSlotFilling; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this QueryResult to JSON. + * Converts this GetContextRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.QueryResult + * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest * @instance * @returns {Object.} JSON object */ - QueryResult.prototype.toJSON = function toJSON() { + GetContextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QueryResult; + return GetContextRequest; })(); - v2beta1.KnowledgeAnswers = (function() { + v2beta1.CreateContextRequest = (function() { /** - * Properties of a KnowledgeAnswers. + * Properties of a CreateContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IKnowledgeAnswers - * @property {Array.|null} [answers] KnowledgeAnswers answers + * @interface ICreateContextRequest + * @property {string|null} [parent] CreateContextRequest parent + * @property {google.cloud.dialogflow.v2beta1.IContext|null} [context] CreateContextRequest context */ /** - * Constructs a new KnowledgeAnswers. + * Constructs a new CreateContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a KnowledgeAnswers. - * @implements IKnowledgeAnswers + * @classdesc Represents a CreateContextRequest. + * @implements ICreateContextRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest=} [properties] Properties to set */ - function KnowledgeAnswers(properties) { - this.answers = []; + function CreateContextRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -98836,78 +97956,88 @@ } /** - * KnowledgeAnswers answers. - * @member {Array.} answers - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * CreateContextRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @instance */ - KnowledgeAnswers.prototype.answers = $util.emptyArray; + CreateContextRequest.prototype.parent = ""; /** - * Creates a new KnowledgeAnswers instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers - * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers instance + * CreateContextRequest context. + * @member {google.cloud.dialogflow.v2beta1.IContext|null|undefined} context + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest + * @instance */ - KnowledgeAnswers.create = function create(properties) { - return new KnowledgeAnswers(properties); - }; + CreateContextRequest.prototype.context = null; /** - * Encodes the specified KnowledgeAnswers message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers - * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers} message KnowledgeAnswers message or plain object to encode + * Creates a new CreateContextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest instance + */ + CreateContextRequest.create = function create(properties) { + return new CreateContextRequest(properties); + }; + + /** + * Encodes the specified CreateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} message CreateContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeAnswers.encode = function encode(message, writer) { + CreateContextRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answers != null && message.answers.length) - for (var i = 0; i < message.answers.length; ++i) - $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.encode(message.answers[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.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.context, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified KnowledgeAnswers message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.verify|verify} messages. + * Encodes the specified CreateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeAnswers} message KnowledgeAnswers message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} message CreateContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KnowledgeAnswers.encodeDelimited = function encodeDelimited(message, writer) { + CreateContextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KnowledgeAnswers message from the specified reader or buffer. + * Decodes a CreateContextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers + * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KnowledgeAnswers.decode = function decode(reader, length) { + CreateContextRequest.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.v2beta1.KnowledgeAnswers(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateContextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.answers && message.answers.length)) - message.answers = []; - message.answers.push($root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + case 2: + message.context = $root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -98918,447 +98048,122 @@ }; /** - * Decodes a KnowledgeAnswers message from the specified reader or buffer, length delimited. + * Decodes a CreateContextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers + * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KnowledgeAnswers.decodeDelimited = function decodeDelimited(reader) { + CreateContextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KnowledgeAnswers message. + * Verifies a CreateContextRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KnowledgeAnswers.verify = function verify(message) { + CreateContextRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answers != null && message.hasOwnProperty("answers")) { - if (!Array.isArray(message.answers)) - return "answers: array expected"; - for (var i = 0; i < message.answers.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify(message.answers[i]); - if (error) - return "answers." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.context); + if (error) + return "context." + error; } return null; }; /** - * Creates a KnowledgeAnswers message from a plain object. Also converts values to their respective internal types. + * Creates a CreateContextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} KnowledgeAnswers + * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest */ - KnowledgeAnswers.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers) + CreateContextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateContextRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers(); - if (object.answers) { - if (!Array.isArray(object.answers)) - throw TypeError(".google.cloud.dialogflow.v2beta1.KnowledgeAnswers.answers: array expected"); - message.answers = []; - for (var i = 0; i < object.answers.length; ++i) { - if (typeof object.answers[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.KnowledgeAnswers.answers: object expected"); - message.answers[i] = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.fromObject(object.answers[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.CreateContextRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateContextRequest.context: object expected"); + message.context = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.context); } return message; }; /** - * Creates a plain object from a KnowledgeAnswers message. Also converts values to other types if specified. + * Creates a plain object from a CreateContextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers} message KnowledgeAnswers + * @param {google.cloud.dialogflow.v2beta1.CreateContextRequest} message CreateContextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KnowledgeAnswers.toObject = function toObject(message, options) { + CreateContextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.answers = []; - if (message.answers && message.answers.length) { - object.answers = []; - for (var j = 0; j < message.answers.length; ++j) - object.answers[j] = $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.toObject(message.answers[j], options); + if (options.defaults) { + object.parent = ""; + object.context = null; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.context, options); return object; }; /** - * Converts this KnowledgeAnswers to JSON. + * Converts this CreateContextRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers + * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest * @instance * @returns {Object.} JSON object */ - KnowledgeAnswers.prototype.toJSON = function toJSON() { + CreateContextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - KnowledgeAnswers.Answer = (function() { - - /** - * Properties of an Answer. - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers - * @interface IAnswer - * @property {string|null} [source] Answer source - * @property {string|null} [faqQuestion] Answer faqQuestion - * @property {string|null} [answer] Answer answer - * @property {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel|null} [matchConfidenceLevel] Answer matchConfidenceLevel - * @property {number|null} [matchConfidence] Answer matchConfidence - */ - - /** - * Constructs a new Answer. - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers - * @classdesc Represents an Answer. - * @implements IAnswer - * @constructor - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer=} [properties] Properties to set - */ - function Answer(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]]; - } - - /** - * Answer source. - * @member {string} source - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - */ - Answer.prototype.source = ""; - - /** - * Answer faqQuestion. - * @member {string} faqQuestion - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - */ - Answer.prototype.faqQuestion = ""; - - /** - * Answer answer. - * @member {string} answer - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - */ - Answer.prototype.answer = ""; - - /** - * Answer matchConfidenceLevel. - * @member {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel} matchConfidenceLevel - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - */ - Answer.prototype.matchConfidenceLevel = 0; - - /** - * Answer matchConfidence. - * @member {number} matchConfidence - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - */ - Answer.prototype.matchConfidence = 0; - - /** - * Creates a new Answer instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer instance - */ - Answer.create = function create(properties) { - return new Answer(properties); - }; - - /** - * Encodes the specified Answer message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer} message Answer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Answer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); - if (message.faqQuestion != null && Object.hasOwnProperty.call(message, "faqQuestion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.faqQuestion); - if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.answer); - if (message.matchConfidenceLevel != null && Object.hasOwnProperty.call(message, "matchConfidenceLevel")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchConfidenceLevel); - if (message.matchConfidence != null && Object.hasOwnProperty.call(message, "matchConfidence")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.matchConfidence); - return writer; - }; - - /** - * Encodes the specified Answer message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.IAnswer} message Answer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Answer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Answer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Answer.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.v2beta1.KnowledgeAnswers.Answer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source = reader.string(); - break; - case 2: - message.faqQuestion = reader.string(); - break; - case 3: - message.answer = reader.string(); - break; - case 4: - message.matchConfidenceLevel = reader.int32(); - break; - case 5: - message.matchConfidence = reader.float(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Answer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Answer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Answer message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Answer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.faqQuestion != null && message.hasOwnProperty("faqQuestion")) - if (!$util.isString(message.faqQuestion)) - return "faqQuestion: string expected"; - if (message.answer != null && message.hasOwnProperty("answer")) - if (!$util.isString(message.answer)) - return "answer: string expected"; - if (message.matchConfidenceLevel != null && message.hasOwnProperty("matchConfidenceLevel")) - switch (message.matchConfidenceLevel) { - default: - return "matchConfidenceLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) - if (typeof message.matchConfidence !== "number") - return "matchConfidence: number expected"; - return null; - }; - - /** - * Creates an Answer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} Answer - */ - Answer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer(); - if (object.source != null) - message.source = String(object.source); - if (object.faqQuestion != null) - message.faqQuestion = String(object.faqQuestion); - if (object.answer != null) - message.answer = String(object.answer); - switch (object.matchConfidenceLevel) { - case "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED": - case 0: - message.matchConfidenceLevel = 0; - break; - case "LOW": - case 1: - message.matchConfidenceLevel = 1; - break; - case "MEDIUM": - case 2: - message.matchConfidenceLevel = 2; - break; - case "HIGH": - case 3: - message.matchConfidenceLevel = 3; - break; - } - if (object.matchConfidence != null) - message.matchConfidence = Number(object.matchConfidence); - return message; - }; - - /** - * Creates a plain object from an Answer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer} message Answer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Answer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.source = ""; - object.faqQuestion = ""; - object.answer = ""; - object.matchConfidenceLevel = options.enums === String ? "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED" : 0; - object.matchConfidence = 0; - } - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.faqQuestion != null && message.hasOwnProperty("faqQuestion")) - object.faqQuestion = message.faqQuestion; - if (message.answer != null && message.hasOwnProperty("answer")) - object.answer = message.answer; - if (message.matchConfidenceLevel != null && message.hasOwnProperty("matchConfidenceLevel")) - object.matchConfidenceLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel[message.matchConfidenceLevel] : message.matchConfidenceLevel; - if (message.matchConfidence != null && message.hasOwnProperty("matchConfidence")) - object.matchConfidence = options.json && !isFinite(message.matchConfidence) ? String(message.matchConfidence) : message.matchConfidence; - return object; - }; - - /** - * Converts this Answer to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer - * @instance - * @returns {Object.} JSON object - */ - Answer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * MatchConfidenceLevel enum. - * @name google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel - * @enum {number} - * @property {number} MATCH_CONFIDENCE_LEVEL_UNSPECIFIED=0 MATCH_CONFIDENCE_LEVEL_UNSPECIFIED value - * @property {number} LOW=1 LOW value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} HIGH=3 HIGH value - */ - Answer.MatchConfidenceLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "LOW"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "HIGH"] = 3; - return values; - })(); - - return Answer; - })(); - - return KnowledgeAnswers; + return CreateContextRequest; })(); - v2beta1.StreamingDetectIntentRequest = (function() { + v2beta1.UpdateContextRequest = (function() { /** - * Properties of a StreamingDetectIntentRequest. + * Properties of an UpdateContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IStreamingDetectIntentRequest - * @property {string|null} [session] StreamingDetectIntentRequest session - * @property {google.cloud.dialogflow.v2beta1.IQueryParameters|null} [queryParams] StreamingDetectIntentRequest queryParams - * @property {google.cloud.dialogflow.v2beta1.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput - * @property {boolean|null} [singleUtterance] StreamingDetectIntentRequest singleUtterance - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig - * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] StreamingDetectIntentRequest outputAudioConfigMask - * @property {Uint8Array|null} [inputAudio] StreamingDetectIntentRequest inputAudio + * @interface IUpdateContextRequest + * @property {google.cloud.dialogflow.v2beta1.IContext|null} [context] UpdateContextRequest context + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContextRequest updateMask */ /** - * Constructs a new StreamingDetectIntentRequest. + * Constructs a new UpdateContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a StreamingDetectIntentRequest. - * @implements IStreamingDetectIntentRequest + * @classdesc Represents an UpdateContextRequest. + * @implements IUpdateContextRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest=} [properties] Properties to set */ - function StreamingDetectIntentRequest(properties) { + function UpdateContextRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99366,153 +98171,88 @@ } /** - * StreamingDetectIntentRequest session. - * @member {string} session - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * UpdateContextRequest context. + * @member {google.cloud.dialogflow.v2beta1.IContext|null|undefined} context + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @instance */ - StreamingDetectIntentRequest.prototype.session = ""; + UpdateContextRequest.prototype.context = null; /** - * StreamingDetectIntentRequest queryParams. - * @member {google.cloud.dialogflow.v2beta1.IQueryParameters|null|undefined} queryParams - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * UpdateContextRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @instance */ - StreamingDetectIntentRequest.prototype.queryParams = null; + UpdateContextRequest.prototype.updateMask = null; /** - * StreamingDetectIntentRequest queryInput. - * @member {google.cloud.dialogflow.v2beta1.IQueryInput|null|undefined} queryInput - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @instance + * Creates a new UpdateContextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest instance */ - StreamingDetectIntentRequest.prototype.queryInput = null; + UpdateContextRequest.create = function create(properties) { + return new UpdateContextRequest(properties); + }; /** - * StreamingDetectIntentRequest singleUtterance. - * @member {boolean} singleUtterance - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.singleUtterance = false; - - /** - * StreamingDetectIntentRequest outputAudioConfig. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.outputAudioConfig = null; - - /** - * StreamingDetectIntentRequest outputAudioConfigMask. - * @member {google.protobuf.IFieldMask|null|undefined} outputAudioConfigMask - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.outputAudioConfigMask = null; - - /** - * StreamingDetectIntentRequest inputAudio. - * @member {Uint8Array} inputAudio - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @instance - */ - StreamingDetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); - - /** - * Creates a new StreamingDetectIntentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest instance - */ - StreamingDetectIntentRequest.create = function create(properties) { - return new StreamingDetectIntentRequest(properties); - }; - - /** - * Encodes the specified StreamingDetectIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified UpdateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} message UpdateContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encode = function encode(message, writer) { + UpdateContextRequest.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.v2beta1.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.v2beta1.QueryInput.encode(message.queryInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.singleUtterance); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.inputAudio != null && Object.hasOwnProperty.call(message, "inputAudio")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.inputAudio); - if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) - $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.context, 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 StreamingDetectIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.verify|verify} messages. + * Encodes the specified UpdateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentRequest} message StreamingDetectIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} message UpdateContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateContextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer. + * Decodes an UpdateContextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest * @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) { + UpdateContextRequest.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.v2beta1.StreamingDetectIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.session = reader.string(); + message.context = $root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32()); break; case 2: - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.decode(reader, reader.uint32()); - break; - case 3: - message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.decode(reader, reader.uint32()); - break; - case 4: - message.singleUtterance = reader.bool(); - break; - case 5: - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); - break; - case 7: - message.outputAudioConfigMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 6: - message.inputAudio = reader.bytes(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -99523,192 +98263,126 @@ }; /** - * Decodes a StreamingDetectIntentRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateContextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest * @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) { + UpdateContextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentRequest message. + * Verifies an UpdateContextRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @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) { + UpdateContextRequest.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.v2beta1.QueryParameters.verify(message.queryParams); - if (error) - return "queryParams." + error; - } - if (message.queryInput != null && message.hasOwnProperty("queryInput")) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryInput.verify(message.queryInput); - if (error) - return "queryInput." + error; - } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - if (typeof message.singleUtterance !== "boolean") - return "singleUtterance: boolean expected"; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.verify(message.outputAudioConfig); + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.context); if (error) - return "outputAudioConfig." + error; + return "context." + error; } - if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.outputAudioConfigMask); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "outputAudioConfigMask." + error; + return "updateMask." + error; } - if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) - if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) - return "inputAudio: buffer expected"; return null; }; /** - * Creates a StreamingDetectIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateContextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} StreamingDetectIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest */ - StreamingDetectIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) + UpdateContextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest(); - if (object.session != null) - message.session = String(object.session); - if (object.queryParams != null) { - if (typeof object.queryParams !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.queryParams: object expected"); - message.queryParams = $root.google.cloud.dialogflow.v2beta1.QueryParameters.fromObject(object.queryParams); - } - if (object.queryInput != null) { - if (typeof object.queryInput !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.queryInput: object expected"); - message.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.fromObject(object.queryInput); - } - if (object.singleUtterance != null) - message.singleUtterance = Boolean(object.singleUtterance); - if (object.outputAudioConfig != null) { - if (typeof object.outputAudioConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest(); + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateContextRequest.context: object expected"); + message.context = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.context); } - if (object.outputAudioConfigMask != null) { - if (typeof object.outputAudioConfigMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.outputAudioConfigMask: object expected"); - message.outputAudioConfigMask = $root.google.protobuf.FieldMask.fromObject(object.outputAudioConfigMask); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateContextRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.inputAudio != null) - if (typeof object.inputAudio === "string") - $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); - else if (object.inputAudio.length) - message.inputAudio = object.inputAudio; return message; }; /** - * Creates a plain object from a StreamingDetectIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateContextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest} message StreamingDetectIntentRequest + * @param {google.cloud.dialogflow.v2beta1.UpdateContextRequest} message UpdateContextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentRequest.toObject = function toObject(message, options) { + UpdateContextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.session = ""; - object.queryParams = null; - object.queryInput = null; - object.singleUtterance = false; - object.outputAudioConfig = null; - if (options.bytes === String) - object.inputAudio = ""; - else { - object.inputAudio = []; - if (options.bytes !== Array) - object.inputAudio = $util.newBuffer(object.inputAudio); - } - object.outputAudioConfigMask = null; + object.context = null; + object.updateMask = 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.v2beta1.QueryParameters.toObject(message.queryParams, options); - if (message.queryInput != null && message.hasOwnProperty("queryInput")) - object.queryInput = $root.google.cloud.dialogflow.v2beta1.QueryInput.toObject(message.queryInput, options); - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) - object.singleUtterance = message.singleUtterance; - if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) - object.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); - if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) - object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; - if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) - object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.context, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this StreamingDetectIntentRequest to JSON. + * Converts this UpdateContextRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentRequest.prototype.toJSON = function toJSON() { + UpdateContextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamingDetectIntentRequest; + return UpdateContextRequest; })(); - v2beta1.StreamingDetectIntentResponse = (function() { + v2beta1.DeleteContextRequest = (function() { /** - * Properties of a StreamingDetectIntentResponse. + * Properties of a DeleteContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IStreamingDetectIntentResponse - * @property {string|null} [responseId] StreamingDetectIntentResponse responseId - * @property {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult - * @property {google.cloud.dialogflow.v2beta1.IQueryResult|null} [queryResult] StreamingDetectIntentResponse queryResult - * @property {Array.|null} [alternativeQueryResults] StreamingDetectIntentResponse alternativeQueryResults - * @property {google.rpc.IStatus|null} [webhookStatus] StreamingDetectIntentResponse webhookStatus - * @property {Uint8Array|null} [outputAudio] StreamingDetectIntentResponse outputAudio - * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentResponse outputAudioConfig + * @interface IDeleteContextRequest + * @property {string|null} [name] DeleteContextRequest name */ /** - * Constructs a new StreamingDetectIntentResponse. + * Constructs a new DeleteContextRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a StreamingDetectIntentResponse. - * @implements IStreamingDetectIntentResponse + * @classdesc Represents a DeleteContextRequest. + * @implements IDeleteContextRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest=} [properties] Properties to set */ - function StreamingDetectIntentResponse(properties) { - this.alternativeQueryResults = []; + function DeleteContextRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -99716,156 +98390,75 @@ } /** - * StreamingDetectIntentResponse responseId. - * @member {string} responseId - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.responseId = ""; - - /** - * StreamingDetectIntentResponse recognitionResult. - * @member {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult|null|undefined} recognitionResult - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.recognitionResult = null; - - /** - * StreamingDetectIntentResponse queryResult. - * @member {google.cloud.dialogflow.v2beta1.IQueryResult|null|undefined} queryResult - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.queryResult = null; - - /** - * StreamingDetectIntentResponse alternativeQueryResults. - * @member {Array.} alternativeQueryResults - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.alternativeQueryResults = $util.emptyArray; - - /** - * StreamingDetectIntentResponse webhookStatus. - * @member {google.rpc.IStatus|null|undefined} webhookStatus - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.webhookStatus = null; - - /** - * StreamingDetectIntentResponse outputAudio. - * @member {Uint8Array} outputAudio - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse - * @instance - */ - StreamingDetectIntentResponse.prototype.outputAudio = $util.newBuffer([]); - - /** - * StreamingDetectIntentResponse outputAudioConfig. - * @member {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null|undefined} outputAudioConfig - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * DeleteContextRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @instance */ - StreamingDetectIntentResponse.prototype.outputAudioConfig = null; + DeleteContextRequest.prototype.name = ""; /** - * Creates a new StreamingDetectIntentResponse instance using the specified properties. + * Creates a new DeleteContextRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest instance */ - StreamingDetectIntentResponse.create = function create(properties) { - return new StreamingDetectIntentResponse(properties); + DeleteContextRequest.create = function create(properties) { + return new DeleteContextRequest(properties); }; /** - * Encodes the specified StreamingDetectIntentResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified DeleteContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} message DeleteContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encode = function encode(message, writer) { + DeleteContextRequest.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.recognitionResult != null && Object.hasOwnProperty.call(message, "recognitionResult")) - $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.queryResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.webhookStatus != null && Object.hasOwnProperty.call(message, "webhookStatus")) - $root.google.rpc.Status.encode(message.webhookStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.outputAudio != null && Object.hasOwnProperty.call(message, "outputAudio")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.outputAudio); - if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) - $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.alternativeQueryResults != null && message.alternativeQueryResults.length) - for (var i = 0; i < message.alternativeQueryResults.length; ++i) - $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.alternativeQueryResults[i], writer.uint32(/* id 7, wireType 2 =*/58).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 StreamingDetectIntentResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.verify|verify} messages. + * Encodes the specified DeleteContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingDetectIntentResponse} message StreamingDetectIntentResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} message DeleteContextRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingDetectIntentResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteContextRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer. + * Decodes a DeleteContextRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest * @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) { + DeleteContextRequest.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.v2beta1.StreamingDetectIntentResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.responseId = reader.string(); - break; - case 2: - message.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.decode(reader, reader.uint32()); - break; - case 3: - message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.alternativeQueryResults && message.alternativeQueryResults.length)) - message.alternativeQueryResults = []; - message.alternativeQueryResults.push($root.google.cloud.dialogflow.v2beta1.QueryResult.decode(reader, reader.uint32())); - break; - case 4: - message.webhookStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.outputAudio = reader.bytes(); - break; - case 6: - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -99876,212 +98469,107 @@ }; /** - * Decodes a StreamingDetectIntentResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteContextRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest * @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) { + DeleteContextRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingDetectIntentResponse message. + * Verifies a DeleteContextRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @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) { + DeleteContextRequest.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.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { - var error = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify(message.recognitionResult); - if (error) - return "recognitionResult." + error; - } - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; - } - if (message.alternativeQueryResults != null && message.hasOwnProperty("alternativeQueryResults")) { - if (!Array.isArray(message.alternativeQueryResults)) - return "alternativeQueryResults: array expected"; - for (var i = 0; i < message.alternativeQueryResults.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.QueryResult.verify(message.alternativeQueryResults[i]); - if (error) - return "alternativeQueryResults." + error; - } - } - if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) { - var error = $root.google.rpc.Status.verify(message.webhookStatus); - if (error) - return "webhookStatus." + 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.v2beta1.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"; return null; }; /** - * Creates a StreamingDetectIntentResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteContextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} StreamingDetectIntentResponse + * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest */ - StreamingDetectIntentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse) + DeleteContextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse(); - if (object.responseId != null) - message.responseId = String(object.responseId); - if (object.recognitionResult != null) { - if (typeof object.recognitionResult !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.recognitionResult: object expected"); - message.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.fromObject(object.recognitionResult); - } - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.queryResult); - } - if (object.alternativeQueryResults) { - if (!Array.isArray(object.alternativeQueryResults)) - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.alternativeQueryResults: array expected"); - message.alternativeQueryResults = []; - for (var i = 0; i < object.alternativeQueryResults.length; ++i) { - if (typeof object.alternativeQueryResults[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.alternativeQueryResults: object expected"); - message.alternativeQueryResults[i] = $root.google.cloud.dialogflow.v2beta1.QueryResult.fromObject(object.alternativeQueryResults[i]); - } - } - if (object.webhookStatus != null) { - if (typeof object.webhookStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.webhookStatus: object expected"); - message.webhookStatus = $root.google.rpc.Status.fromObject(object.webhookStatus); - } - 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.v2beta1.StreamingDetectIntentResponse.outputAudioConfig: object expected"); - message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); - } + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a StreamingDetectIntentResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteContextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @static - * @param {google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse} message StreamingDetectIntentResponse + * @param {google.cloud.dialogflow.v2beta1.DeleteContextRequest} message DeleteContextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingDetectIntentResponse.toObject = function toObject(message, options) { + DeleteContextRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.alternativeQueryResults = []; - if (options.defaults) { - object.responseId = ""; - object.recognitionResult = null; - object.queryResult = null; - object.webhookStatus = 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.responseId != null && message.hasOwnProperty("responseId")) - object.responseId = message.responseId; - if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) - object.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.toObject(message.recognitionResult, options); - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.queryResult, options); - if (message.webhookStatus != null && message.hasOwnProperty("webhookStatus")) - object.webhookStatus = $root.google.rpc.Status.toObject(message.webhookStatus, 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.v2beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); - if (message.alternativeQueryResults && message.alternativeQueryResults.length) { - object.alternativeQueryResults = []; - for (var j = 0; j < message.alternativeQueryResults.length; ++j) - object.alternativeQueryResults[j] = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.alternativeQueryResults[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this StreamingDetectIntentResponse to JSON. + * Converts this DeleteContextRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest * @instance * @returns {Object.} JSON object */ - StreamingDetectIntentResponse.prototype.toJSON = function toJSON() { + DeleteContextRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StreamingDetectIntentResponse; + return DeleteContextRequest; })(); - v2beta1.StreamingRecognitionResult = (function() { + v2beta1.DeleteAllContextsRequest = (function() { /** - * Properties of a StreamingRecognitionResult. + * Properties of a DeleteAllContextsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IStreamingRecognitionResult - * @property {google.cloud.dialogflow.v2beta1.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 - * @property {string|null} [languageCode] StreamingRecognitionResult languageCode - * @property {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null} [dtmfDigits] StreamingRecognitionResult dtmfDigits + * @interface IDeleteAllContextsRequest + * @property {string|null} [parent] DeleteAllContextsRequest parent */ /** - * Constructs a new StreamingRecognitionResult. + * Constructs a new DeleteAllContextsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a StreamingRecognitionResult. - * @implements IStreamingRecognitionResult + * @classdesc Represents a DeleteAllContextsRequest. + * @implements IDeleteAllContextsRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest=} [properties] Properties to set */ - function StreamingRecognitionResult(properties) { - this.speechWordInfo = []; + function DeleteAllContextsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100089,182 +98577,75 @@ } /** - * StreamingRecognitionResult messageType. - * @member {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType} messageType - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.messageType = 0; - - /** - * StreamingRecognitionResult transcript. - * @member {string} transcript - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.transcript = ""; - - /** - * StreamingRecognitionResult isFinal. - * @member {boolean} isFinal - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.isFinal = false; - - /** - * StreamingRecognitionResult confidence. - * @member {number} confidence - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.confidence = 0; - - /** - * StreamingRecognitionResult stability. - * @member {number} stability - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.stability = 0; - - /** - * StreamingRecognitionResult speechWordInfo. - * @member {Array.} speechWordInfo - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.speechWordInfo = $util.emptyArray; - - /** - * StreamingRecognitionResult speechEndOffset. - * @member {google.protobuf.IDuration|null|undefined} speechEndOffset - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.speechEndOffset = null; - - /** - * StreamingRecognitionResult languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult - * @instance - */ - StreamingRecognitionResult.prototype.languageCode = ""; - - /** - * StreamingRecognitionResult dtmfDigits. - * @member {google.cloud.dialogflow.v2beta1.ITelephonyDtmfEvents|null|undefined} dtmfDigits - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * DeleteAllContextsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @instance */ - StreamingRecognitionResult.prototype.dtmfDigits = null; + DeleteAllContextsRequest.prototype.parent = ""; /** - * Creates a new StreamingRecognitionResult instance using the specified properties. + * Creates a new DeleteAllContextsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest instance */ - StreamingRecognitionResult.create = function create(properties) { - return new StreamingRecognitionResult(properties); + DeleteAllContextsRequest.create = function create(properties) { + return new DeleteAllContextsRequest(properties); }; /** - * Encodes the specified StreamingRecognitionResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified DeleteAllContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} message DeleteAllContextsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + DeleteAllContextsRequest.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.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) - $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.encode(message.dtmfDigits, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - 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.v2beta1.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); return writer; }; /** - * Encodes the specified StreamingRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.verify|verify} messages. + * Encodes the specified DeleteAllContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IStreamingRecognitionResult} message StreamingRecognitionResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} message DeleteAllContextsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAllContextsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer. + * Decodes a DeleteAllContextsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest * @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) { + DeleteAllContextsRequest.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.v2beta1.StreamingRecognitionResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.messageType = reader.int32(); - break; - case 2: - message.transcript = 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.v2beta1.SpeechWordInfo.decode(reader, reader.uint32())); - break; - case 8: - message.speechEndOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 10: - message.languageCode = reader.string(); - break; - case 5: - message.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.decode(reader, reader.uint32()); + message.parent = reader.string(); break; default: reader.skipType(tag & 7); @@ -100275,460 +98656,401 @@ }; /** - * Decodes a StreamingRecognitionResult message from the specified reader or buffer, length delimited. + * Decodes a DeleteAllContextsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest * @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) { + DeleteAllContextsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamingRecognitionResult message. + * Verifies a DeleteAllContextsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @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) { + DeleteAllContextsRequest.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 3: - case 2: - case 4: - 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.v2beta1.SpeechWordInfo.verify(message.speechWordInfo[i]); - if (error) - return "speechWordInfo." + error; - } - } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) { - var error = $root.google.protobuf.Duration.verify(message.speechEndOffset); - if (error) - return "speechEndOffset." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { - var error = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.verify(message.dtmfDigits); - if (error) - return "dtmfDigits." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; return null; }; /** - * Creates a StreamingRecognitionResult message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAllContextsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} StreamingRecognitionResult + * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest */ - StreamingRecognitionResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult) + DeleteAllContextsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult(); - switch (object.messageType) { - case "MESSAGE_TYPE_UNSPECIFIED": - case 0: - message.messageType = 0; - break; - case "TRANSCRIPT": - case 1: - message.messageType = 1; - break; - case "DTMF_DIGITS": - case 3: - message.messageType = 3; - break; - case "END_OF_SINGLE_UTTERANCE": - case 2: - message.messageType = 2; - break; - case "PARTIAL_DTMF_DIGITS": - case 4: - message.messageType = 4; - 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.v2beta1.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.v2beta1.StreamingRecognitionResult.speechWordInfo: object expected"); - message.speechWordInfo[i] = $root.google.cloud.dialogflow.v2beta1.SpeechWordInfo.fromObject(object.speechWordInfo[i]); - } - } - if (object.speechEndOffset != null) { - if (typeof object.speechEndOffset !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.speechEndOffset: object expected"); - message.speechEndOffset = $root.google.protobuf.Duration.fromObject(object.speechEndOffset); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.dtmfDigits != null) { - if (typeof object.dtmfDigits !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.dtmfDigits: object expected"); - message.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.fromObject(object.dtmfDigits); - } + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest(); + if (object.parent != null) + message.parent = String(object.parent); return message; }; /** - * Creates a plain object from a StreamingRecognitionResult message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAllContextsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.StreamingRecognitionResult} message StreamingRecognitionResult + * @param {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} message DeleteAllContextsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + DeleteAllContextsRequest.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.dtmfDigits = null; - object.stability = 0; - object.speechEndOffset = null; - object.languageCode = ""; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.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.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) - object.dtmfDigits = $root.google.cloud.dialogflow.v2beta1.TelephonyDtmfEvents.toObject(message.dtmfDigits, options); - 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.v2beta1.SpeechWordInfo.toObject(message.speechWordInfo[j], options); - } - if (message.speechEndOffset != null && message.hasOwnProperty("speechEndOffset")) - object.speechEndOffset = $root.google.protobuf.Duration.toObject(message.speechEndOffset, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; /** - * Converts this StreamingRecognitionResult to JSON. + * Converts this DeleteAllContextsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.StreamingRecognitionResult + * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest * @instance * @returns {Object.} JSON object */ - StreamingRecognitionResult.prototype.toJSON = function toJSON() { + DeleteAllContextsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * MessageType enum. - * @name google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType - * @enum {number} - * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value - * @property {number} TRANSCRIPT=1 TRANSCRIPT value - * @property {number} DTMF_DIGITS=3 DTMF_DIGITS value - * @property {number} END_OF_SINGLE_UTTERANCE=2 END_OF_SINGLE_UTTERANCE value - * @property {number} PARTIAL_DTMF_DIGITS=4 PARTIAL_DTMF_DIGITS value - */ - StreamingRecognitionResult.MessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TRANSCRIPT"] = 1; - values[valuesById[3] = "DTMF_DIGITS"] = 3; - values[valuesById[2] = "END_OF_SINGLE_UTTERANCE"] = 2; - values[valuesById[4] = "PARTIAL_DTMF_DIGITS"] = 4; - return values; - })(); - - return StreamingRecognitionResult; + return DeleteAllContextsRequest; })(); - v2beta1.TextInput = (function() { - - /** - * Properties of a TextInput. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ITextInput - * @property {string|null} [text] TextInput text - * @property {string|null} [languageCode] TextInput languageCode - */ + v2beta1.Intents = (function() { /** - * Constructs a new TextInput. + * Constructs a new Intents service. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a TextInput. - * @implements ITextInput + * @classdesc Represents an Intents + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.v2beta1.ITextInput=} [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 TextInput(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 Intents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (Intents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Intents; + /** - * TextInput text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @instance + * Creates new Intents service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.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. */ - TextInput.prototype.text = ""; + Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * TextInput languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#listIntents}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef ListIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListIntentsResponse} [response] ListIntentsResponse */ - TextInput.prototype.languageCode = ""; /** - * Creates a new TextInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {google.cloud.dialogflow.v2beta1.ITextInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput instance + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} request ListIntentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse + * @returns {undefined} + * @variation 1 */ - TextInput.create = function create(properties) { - return new TextInput(properties); - }; + Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { + return this.rpcCall(listIntents, $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest, $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse, request, callback); + }, "name", { value: "ListIntents" }); /** - * Encodes the specified TextInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {google.cloud.dialogflow.v2beta1.ITextInput} message TextInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListIntents. + * @function listIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} request ListIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TextInput.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); - return writer; - }; /** - * Encodes the specified TextInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {google.cloud.dialogflow.v2beta1.ITextInput} message TextInput 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.v2beta1.Intents#getIntent}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef GetIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent */ - TextInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a TextInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} request GetIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - 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.v2beta1.TextInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { + return this.rpcCall(getIntent, $root.google.cloud.dialogflow.v2beta1.GetIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); + }, "name", { value: "GetIntent" }); /** - * Decodes a TextInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetIntent. + * @function getIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} request GetIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TextInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a TextInput message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#createIntent}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef CreateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent */ - TextInput.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.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; /** - * Creates a TextInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.TextInput} TextInput + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - TextInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.TextInput) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.TextInput(); - if (object.text != null) - message.text = String(object.text); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { + return this.rpcCall(createIntent, $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); + }, "name", { value: "CreateIntent" }); /** - * Creates a plain object from a TextInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.TextInput - * @static - * @param {google.cloud.dialogflow.v2beta1.TextInput} message TextInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls CreateIntent. + * @function createIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} request CreateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - TextInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.languageCode = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; /** - * Converts this TextInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.TextInput + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#updateIntent}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef UpdateIntentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent + */ + + /** + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent + * @returns {undefined} + * @variation 1 */ - TextInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { + return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); + }, "name", { value: "UpdateIntent" }); - return TextInput; + /** + * Calls UpdateIntent. + * @function updateIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} request UpdateIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#deleteIntent}. + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIntent" }); + + /** + * Calls DeleteIntent. + * @function deleteIntent + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} request DeleteIntentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchUpdateIntents}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef BatchUpdateIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BatchUpdateIntents. + * @function batchUpdateIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} request BatchUpdateIntentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.batchUpdateIntents = function batchUpdateIntents(request, callback) { + return this.rpcCall(batchUpdateIntents, $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchUpdateIntents" }); + + /** + * Calls BatchUpdateIntents. + * @function batchUpdateIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} request BatchUpdateIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchDeleteIntents}. + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @typedef BatchDeleteIntentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BatchDeleteIntents. + * @function batchDeleteIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} request BatchDeleteIntentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Intents.prototype.batchDeleteIntents = function batchDeleteIntents(request, callback) { + return this.rpcCall(batchDeleteIntents, $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchDeleteIntents" }); + + /** + * Calls BatchDeleteIntents. + * @function batchDeleteIntents + * @memberof google.cloud.dialogflow.v2beta1.Intents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} request BatchDeleteIntentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Intents; })(); - v2beta1.EventInput = (function() { + v2beta1.Intent = (function() { /** - * Properties of an EventInput. + * Properties of an Intent. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IEventInput - * @property {string|null} [name] EventInput name - * @property {google.protobuf.IStruct|null} [parameters] EventInput parameters - * @property {string|null} [languageCode] EventInput languageCode + * @interface IIntent + * @property {string|null} [name] Intent name + * @property {string|null} [displayName] Intent displayName + * @property {google.cloud.dialogflow.v2beta1.Intent.WebhookState|null} [webhookState] Intent webhookState + * @property {number|null} [priority] Intent priority + * @property {boolean|null} [isFallback] Intent isFallback + * @property {boolean|null} [mlEnabled] Intent mlEnabled + * @property {boolean|null} [mlDisabled] Intent mlDisabled + * @property {boolean|null} [liveAgentHandoff] Intent liveAgentHandoff + * @property {boolean|null} [endInteraction] Intent endInteraction + * @property {Array.|null} [inputContextNames] Intent inputContextNames + * @property {Array.|null} [events] Intent events + * @property {Array.|null} [trainingPhrases] Intent trainingPhrases + * @property {string|null} [action] Intent action + * @property {Array.|null} [outputContexts] Intent outputContexts + * @property {boolean|null} [resetContexts] Intent resetContexts + * @property {Array.|null} [parameters] Intent parameters + * @property {Array.|null} [messages] Intent messages + * @property {Array.|null} [defaultResponsePlatforms] Intent defaultResponsePlatforms + * @property {string|null} [rootFollowupIntentName] Intent rootFollowupIntentName + * @property {string|null} [parentFollowupIntentName] Intent parentFollowupIntentName + * @property {Array.|null} [followupIntentInfo] Intent followupIntentInfo */ /** - * Constructs a new EventInput. + * Constructs a new Intent. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an EventInput. - * @implements IEventInput + * @classdesc Represents an Intent. + * @implements IIntent * @constructor - * @param {google.cloud.dialogflow.v2beta1.IEventInput=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IIntent=} [properties] Properties to set */ - function EventInput(properties) { + function Intent(properties) { + this.inputContextNames = []; + this.events = []; + this.trainingPhrases = []; + this.outputContexts = []; + this.parameters = []; + this.messages = []; + this.defaultResponsePlatforms = []; + this.followupIntentInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100736,497 +99058,367 @@ } /** - * EventInput name. + * Intent name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.EventInput + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance */ - EventInput.prototype.name = ""; + Intent.prototype.name = ""; /** - * EventInput parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.v2beta1.EventInput + * Intent displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance */ - EventInput.prototype.parameters = null; + Intent.prototype.displayName = ""; /** - * EventInput languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.EventInput + * Intent webhookState. + * @member {google.cloud.dialogflow.v2beta1.Intent.WebhookState} webhookState + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance */ - EventInput.prototype.languageCode = ""; + Intent.prototype.webhookState = 0; /** - * Creates a new EventInput instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {google.cloud.dialogflow.v2beta1.IEventInput=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput instance + * Intent priority. + * @member {number} priority + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - EventInput.create = function create(properties) { - return new EventInput(properties); - }; + Intent.prototype.priority = 0; /** - * Encodes the specified EventInput message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EventInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {google.cloud.dialogflow.v2beta1.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Intent isFallback. + * @member {boolean} isFallback + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - 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.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - return writer; - }; + Intent.prototype.isFallback = false; /** - * Encodes the specified EventInput message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EventInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {google.cloud.dialogflow.v2beta1.IEventInput} message EventInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Intent mlEnabled. + * @member {boolean} mlEnabled + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - EventInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Intent.prototype.mlEnabled = false; /** - * Decodes an EventInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Intent mlDisabled. + * @member {boolean} mlDisabled + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - 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.v2beta1.EventInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 3: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Intent.prototype.mlDisabled = false; /** - * Decodes an EventInput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Intent liveAgentHandoff. + * @member {boolean} liveAgentHandoff + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - EventInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Intent.prototype.liveAgentHandoff = false; /** - * Verifies an EventInput message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Intent endInteraction. + * @member {boolean} endInteraction + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - 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.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates an EventInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EventInput} EventInput - */ - EventInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EventInput) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.EventInput(); - if (object.name != null) - message.name = String(object.name); - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.EventInput.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from an EventInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EventInput - * @static - * @param {google.cloud.dialogflow.v2beta1.EventInput} message EventInput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventInput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.parameters = null; - object.languageCode = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + Intent.prototype.endInteraction = false; /** - * Converts this EventInput to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EventInput + * Intent inputContextNames. + * @member {Array.} inputContextNames + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance - * @returns {Object.} JSON object - */ - EventInput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventInput; - })(); - - v2beta1.SentimentAnalysisRequestConfig = (function() { - - /** - * Properties of a SentimentAnalysisRequestConfig. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISentimentAnalysisRequestConfig - * @property {boolean|null} [analyzeQueryTextSentiment] SentimentAnalysisRequestConfig analyzeQueryTextSentiment - */ - - /** - * Constructs a new SentimentAnalysisRequestConfig. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SentimentAnalysisRequestConfig. - * @implements ISentimentAnalysisRequestConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig=} [properties] Properties to set */ - function SentimentAnalysisRequestConfig(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]]; - } + Intent.prototype.inputContextNames = $util.emptyArray; /** - * SentimentAnalysisRequestConfig analyzeQueryTextSentiment. - * @member {boolean} analyzeQueryTextSentiment - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig + * Intent events. + * @member {Array.} events + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance */ - SentimentAnalysisRequestConfig.prototype.analyzeQueryTextSentiment = false; - - /** - * Creates a new SentimentAnalysisRequestConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig instance - */ - SentimentAnalysisRequestConfig.create = function create(properties) { - return new SentimentAnalysisRequestConfig(properties); - }; - - /** - * Encodes the specified SentimentAnalysisRequestConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SentimentAnalysisRequestConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.analyzeQueryTextSentiment); - return writer; - }; + Intent.prototype.events = $util.emptyArray; /** - * Encodes the specified SentimentAnalysisRequestConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Intent trainingPhrases. + * @member {Array.} trainingPhrases + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Intent.prototype.trainingPhrases = $util.emptyArray; /** - * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Intent action. + * @member {string} action + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.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.v2beta1.SentimentAnalysisRequestConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.analyzeQueryTextSentiment = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Intent.prototype.action = ""; /** - * Decodes a SentimentAnalysisRequestConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Intent outputContexts. + * @member {Array.} outputContexts + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Intent.prototype.outputContexts = $util.emptyArray; /** - * Verifies a SentimentAnalysisRequestConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Intent resetContexts. + * @member {boolean} resetContexts + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) - if (typeof message.analyzeQueryTextSentiment !== "boolean") - return "analyzeQueryTextSentiment: boolean expected"; - return null; - }; + Intent.prototype.resetContexts = false; /** - * Creates a SentimentAnalysisRequestConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} SentimentAnalysisRequestConfig + * Intent parameters. + * @member {Array.} parameters + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig(); - if (object.analyzeQueryTextSentiment != null) - message.analyzeQueryTextSentiment = Boolean(object.analyzeQueryTextSentiment); - return message; - }; + Intent.prototype.parameters = $util.emptyArray; /** - * Creates a plain object from a SentimentAnalysisRequestConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig} message SentimentAnalysisRequestConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Intent messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - SentimentAnalysisRequestConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.analyzeQueryTextSentiment = false; - if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) - object.analyzeQueryTextSentiment = message.analyzeQueryTextSentiment; - return object; - }; + Intent.prototype.messages = $util.emptyArray; /** - * Converts this SentimentAnalysisRequestConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig + * Intent defaultResponsePlatforms. + * @member {Array.} defaultResponsePlatforms + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance - * @returns {Object.} JSON object */ - SentimentAnalysisRequestConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SentimentAnalysisRequestConfig; - })(); - - v2beta1.SentimentAnalysisResult = (function() { + Intent.prototype.defaultResponsePlatforms = $util.emptyArray; /** - * Properties of a SentimentAnalysisResult. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISentimentAnalysisResult - * @property {google.cloud.dialogflow.v2beta1.ISentiment|null} [queryTextSentiment] SentimentAnalysisResult queryTextSentiment + * Intent rootFollowupIntentName. + * @member {string} rootFollowupIntentName + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ + Intent.prototype.rootFollowupIntentName = ""; /** - * Constructs a new SentimentAnalysisResult. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SentimentAnalysisResult. - * @implements ISentimentAnalysisResult - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult=} [properties] Properties to set + * Intent parentFollowupIntentName. + * @member {string} parentFollowupIntentName + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @instance */ - function SentimentAnalysisResult(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]]; - } + Intent.prototype.parentFollowupIntentName = ""; /** - * SentimentAnalysisResult queryTextSentiment. - * @member {google.cloud.dialogflow.v2beta1.ISentiment|null|undefined} queryTextSentiment - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * Intent followupIntentInfo. + * @member {Array.} followupIntentInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance */ - SentimentAnalysisResult.prototype.queryTextSentiment = null; + Intent.prototype.followupIntentInfo = $util.emptyArray; /** - * Creates a new SentimentAnalysisResult instance using the specified properties. + * Creates a new Intent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult instance + * @param {google.cloud.dialogflow.v2beta1.IIntent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent instance */ - SentimentAnalysisResult.create = function create(properties) { - return new SentimentAnalysisResult(properties); + Intent.create = function create(properties) { + return new Intent(properties); }; /** - * Encodes the specified SentimentAnalysisResult message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentAnalysisResult.encode = function encode(message, writer) { + Intent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.queryTextSentiment != null && Object.hasOwnProperty.call(message, "queryTextSentiment")) - $root.google.cloud.dialogflow.v2beta1.Sentiment.encode(message.queryTextSentiment, writer.uint32(/* id 1, wireType 2 =*/10).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.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.priority); + if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isFallback); + if (message.mlEnabled != null && Object.hasOwnProperty.call(message, "mlEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.mlEnabled); + if (message.webhookState != null && Object.hasOwnProperty.call(message, "webhookState")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.webhookState); + if (message.inputContextNames != null && message.inputContextNames.length) + for (var i = 0; i < message.inputContextNames.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.inputContextNames[i]); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.events[i]); + if (message.trainingPhrases != null && message.trainingPhrases.length) + for (var i = 0; i < message.trainingPhrases.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.action); + if (message.outputContexts != null && message.outputContexts.length) + for (var i = 0; i < message.outputContexts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Context.encode(message.outputContexts[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.resetContexts != null && Object.hasOwnProperty.call(message, "resetContexts")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.resetContexts); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.encode(message.messages[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.defaultResponsePlatforms != null && message.defaultResponsePlatforms.length) { + writer.uint32(/* id 15, wireType 2 =*/122).fork(); + for (var i = 0; i < message.defaultResponsePlatforms.length; ++i) + writer.int32(message.defaultResponsePlatforms[i]); + writer.ldelim(); + } + if (message.rootFollowupIntentName != null && Object.hasOwnProperty.call(message, "rootFollowupIntentName")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.rootFollowupIntentName); + if (message.parentFollowupIntentName != null && Object.hasOwnProperty.call(message, "parentFollowupIntentName")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.parentFollowupIntentName); + if (message.followupIntentInfo != null && message.followupIntentInfo.length) + for (var i = 0; i < message.followupIntentInfo.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.encode(message.followupIntentInfo[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.mlDisabled != null && Object.hasOwnProperty.call(message, "mlDisabled")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.mlDisabled); + if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.liveAgentHandoff); + if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.endInteraction); return writer; }; /** - * Encodes the specified SentimentAnalysisResult message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.verify|verify} messages. + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @static - * @param {google.cloud.dialogflow.v2beta1.ISentimentAnalysisResult} message SentimentAnalysisResult message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentAnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + Intent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SentimentAnalysisResult message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent * @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) { + 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.v2beta1.SentimentAnalysisResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 6: + message.webhookState = reader.int32(); + break; + case 3: + message.priority = reader.int32(); + break; + case 4: + message.isFallback = reader.bool(); + break; + case 5: + message.mlEnabled = reader.bool(); + break; + case 19: + message.mlDisabled = reader.bool(); + break; + case 20: + message.liveAgentHandoff = reader.bool(); + break; + case 21: + message.endInteraction = reader.bool(); + break; + case 7: + if (!(message.inputContextNames && message.inputContextNames.length)) + message.inputContextNames = []; + message.inputContextNames.push(reader.string()); + break; + case 8: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push(reader.string()); + break; + case 9: + if (!(message.trainingPhrases && message.trainingPhrases.length)) + message.trainingPhrases = []; + message.trainingPhrases.push($root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.decode(reader, reader.uint32())); + break; + case 10: + message.action = reader.string(); + break; + case 11: + if (!(message.outputContexts && message.outputContexts.length)) + message.outputContexts = []; + message.outputContexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); + break; + case 12: + message.resetContexts = reader.bool(); + break; + case 13: + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.dialogflow.v2beta1.Intent.Parameter.decode(reader, reader.uint32())); + break; + case 14: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.decode(reader, reader.uint32())); + break; + case 15: + if (!(message.defaultResponsePlatforms && message.defaultResponsePlatforms.length)) + message.defaultResponsePlatforms = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.defaultResponsePlatforms.push(reader.int32()); + } else + message.defaultResponsePlatforms.push(reader.int32()); + break; + case 16: + message.rootFollowupIntentName = reader.string(); + break; + case 17: + message.parentFollowupIntentName = reader.string(); + break; + case 18: + if (!(message.followupIntentInfo && message.followupIntentInfo.length)) + message.followupIntentInfo = []; + message.followupIntentInfo.push($root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -101237,3709 +99429,6651 @@ }; /** - * Decodes a SentimentAnalysisResult 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.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult + * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent * @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) { + Intent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SentimentAnalysisResult message. + * Verifies an Intent message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @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) { + Intent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.queryTextSentiment != null && message.hasOwnProperty("queryTextSentiment")) { - var error = $root.google.cloud.dialogflow.v2beta1.Sentiment.verify(message.queryTextSentiment); - if (error) - return "queryTextSentiment." + error; - } - return null; - }; - - /** - * Creates a SentimentAnalysisResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} SentimentAnalysisResult - */ - SentimentAnalysisResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult) + 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.webhookState != null && message.hasOwnProperty("webhookState")) + switch (message.webhookState) { + default: + return "webhookState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.mlEnabled != null && message.hasOwnProperty("mlEnabled")) + if (typeof message.mlEnabled !== "boolean") + return "mlEnabled: boolean expected"; + if (message.mlDisabled != null && message.hasOwnProperty("mlDisabled")) + if (typeof message.mlDisabled !== "boolean") + return "mlDisabled: boolean expected"; + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) + if (typeof message.liveAgentHandoff !== "boolean") + return "liveAgentHandoff: boolean expected"; + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) + if (typeof message.endInteraction !== "boolean") + return "endInteraction: boolean expected"; + if (message.inputContextNames != null && message.hasOwnProperty("inputContextNames")) { + if (!Array.isArray(message.inputContextNames)) + return "inputContextNames: array expected"; + for (var i = 0; i < message.inputContextNames.length; ++i) + if (!$util.isString(message.inputContextNames[i])) + return "inputContextNames: string[] expected"; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) + if (!$util.isString(message.events[i])) + return "events: 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.v2beta1.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); + if (error) + return "trainingPhrases." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.outputContexts != null && message.hasOwnProperty("outputContexts")) { + if (!Array.isArray(message.outputContexts)) + return "outputContexts: array expected"; + for (var i = 0; i < message.outputContexts.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.outputContexts[i]); + if (error) + return "outputContexts." + error; + } + } + if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) + if (typeof message.resetContexts !== "boolean") + return "resetContexts: boolean 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.v2beta1.Intent.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + 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.v2beta1.Intent.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.defaultResponsePlatforms != null && message.hasOwnProperty("defaultResponsePlatforms")) { + if (!Array.isArray(message.defaultResponsePlatforms)) + return "defaultResponsePlatforms: array expected"; + for (var i = 0; i < message.defaultResponsePlatforms.length; ++i) + switch (message.defaultResponsePlatforms[i]) { + default: + return "defaultResponsePlatforms: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 10: + case 11: + break; + } + } + if (message.rootFollowupIntentName != null && message.hasOwnProperty("rootFollowupIntentName")) + if (!$util.isString(message.rootFollowupIntentName)) + return "rootFollowupIntentName: string expected"; + if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) + if (!$util.isString(message.parentFollowupIntentName)) + return "parentFollowupIntentName: string expected"; + if (message.followupIntentInfo != null && message.hasOwnProperty("followupIntentInfo")) { + if (!Array.isArray(message.followupIntentInfo)) + return "followupIntentInfo: array expected"; + for (var i = 0; i < message.followupIntentInfo.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify(message.followupIntentInfo[i]); + if (error) + return "followupIntentInfo." + error; + } + } + return null; + }; + + /** + * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent + */ + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult(); - if (object.queryTextSentiment != null) { - if (typeof object.queryTextSentiment !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.SentimentAnalysisResult.queryTextSentiment: object expected"); - message.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.fromObject(object.queryTextSentiment); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.webhookState) { + case "WEBHOOK_STATE_UNSPECIFIED": + case 0: + message.webhookState = 0; + break; + case "WEBHOOK_STATE_ENABLED": + case 1: + message.webhookState = 1; + break; + case "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING": + case 2: + message.webhookState = 2; + break; + } + if (object.priority != null) + message.priority = object.priority | 0; + if (object.isFallback != null) + message.isFallback = Boolean(object.isFallback); + if (object.mlEnabled != null) + message.mlEnabled = Boolean(object.mlEnabled); + if (object.mlDisabled != null) + message.mlDisabled = Boolean(object.mlDisabled); + if (object.liveAgentHandoff != null) + message.liveAgentHandoff = Boolean(object.liveAgentHandoff); + if (object.endInteraction != null) + message.endInteraction = Boolean(object.endInteraction); + if (object.inputContextNames) { + if (!Array.isArray(object.inputContextNames)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.inputContextNames: array expected"); + message.inputContextNames = []; + for (var i = 0; i < object.inputContextNames.length; ++i) + message.inputContextNames[i] = String(object.inputContextNames[i]); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) + message.events[i] = String(object.events[i]); + } + if (object.trainingPhrases) { + if (!Array.isArray(object.trainingPhrases)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.trainingPhrases: object expected"); + message.trainingPhrases[i] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); + } + } + if (object.action != null) + message.action = String(object.action); + if (object.outputContexts) { + if (!Array.isArray(object.outputContexts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.outputContexts: array expected"); + message.outputContexts = []; + for (var i = 0; i < object.outputContexts.length; ++i) { + if (typeof object.outputContexts[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.outputContexts: object expected"); + message.outputContexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.outputContexts[i]); + } + } + if (object.resetContexts != null) + message.resetContexts = Boolean(object.resetContexts); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.parameters: object expected"); + message.parameters[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.fromObject(object.parameters[i]); + } + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.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.v2beta1.Intent.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.fromObject(object.messages[i]); + } + } + if (object.defaultResponsePlatforms) { + if (!Array.isArray(object.defaultResponsePlatforms)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.defaultResponsePlatforms: array expected"); + message.defaultResponsePlatforms = []; + for (var i = 0; i < object.defaultResponsePlatforms.length; ++i) + switch (object.defaultResponsePlatforms[i]) { + default: + case "PLATFORM_UNSPECIFIED": + case 0: + message.defaultResponsePlatforms[i] = 0; + break; + case "FACEBOOK": + case 1: + message.defaultResponsePlatforms[i] = 1; + break; + case "SLACK": + case 2: + message.defaultResponsePlatforms[i] = 2; + break; + case "TELEGRAM": + case 3: + message.defaultResponsePlatforms[i] = 3; + break; + case "KIK": + case 4: + message.defaultResponsePlatforms[i] = 4; + break; + case "SKYPE": + case 5: + message.defaultResponsePlatforms[i] = 5; + break; + case "LINE": + case 6: + message.defaultResponsePlatforms[i] = 6; + break; + case "VIBER": + case 7: + message.defaultResponsePlatforms[i] = 7; + break; + case "ACTIONS_ON_GOOGLE": + case 8: + message.defaultResponsePlatforms[i] = 8; + break; + case "TELEPHONY": + case 10: + message.defaultResponsePlatforms[i] = 10; + break; + case "GOOGLE_HANGOUTS": + case 11: + message.defaultResponsePlatforms[i] = 11; + break; + } + } + if (object.rootFollowupIntentName != null) + message.rootFollowupIntentName = String(object.rootFollowupIntentName); + if (object.parentFollowupIntentName != null) + message.parentFollowupIntentName = String(object.parentFollowupIntentName); + if (object.followupIntentInfo) { + if (!Array.isArray(object.followupIntentInfo)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.followupIntentInfo: array expected"); + message.followupIntentInfo = []; + for (var i = 0; i < object.followupIntentInfo.length; ++i) { + if (typeof object.followupIntentInfo[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.followupIntentInfo: object expected"); + message.followupIntentInfo[i] = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.fromObject(object.followupIntentInfo[i]); + } } return message; }; /** - * Creates a plain object from a SentimentAnalysisResult 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.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @static - * @param {google.cloud.dialogflow.v2beta1.SentimentAnalysisResult} message SentimentAnalysisResult + * @param {google.cloud.dialogflow.v2beta1.Intent} message Intent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SentimentAnalysisResult.toObject = function toObject(message, options) { + Intent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.queryTextSentiment = null; - if (message.queryTextSentiment != null && message.hasOwnProperty("queryTextSentiment")) - object.queryTextSentiment = $root.google.cloud.dialogflow.v2beta1.Sentiment.toObject(message.queryTextSentiment, options); + if (options.arrays || options.defaults) { + object.inputContextNames = []; + object.events = []; + object.trainingPhrases = []; + object.outputContexts = []; + object.parameters = []; + object.messages = []; + object.defaultResponsePlatforms = []; + object.followupIntentInfo = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.priority = 0; + object.isFallback = false; + object.mlEnabled = false; + object.webhookState = options.enums === String ? "WEBHOOK_STATE_UNSPECIFIED" : 0; + object.action = ""; + object.resetContexts = false; + object.rootFollowupIntentName = ""; + object.parentFollowupIntentName = ""; + object.mlDisabled = false; + object.liveAgentHandoff = false; + object.endInteraction = 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.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.isFallback != null && message.hasOwnProperty("isFallback")) + object.isFallback = message.isFallback; + if (message.mlEnabled != null && message.hasOwnProperty("mlEnabled")) + object.mlEnabled = message.mlEnabled; + if (message.webhookState != null && message.hasOwnProperty("webhookState")) + object.webhookState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.WebhookState[message.webhookState] : message.webhookState; + if (message.inputContextNames && message.inputContextNames.length) { + object.inputContextNames = []; + for (var j = 0; j < message.inputContextNames.length; ++j) + object.inputContextNames[j] = message.inputContextNames[j]; + } + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = message.events[j]; + } + if (message.trainingPhrases && message.trainingPhrases.length) { + object.trainingPhrases = []; + for (var j = 0; j < message.trainingPhrases.length; ++j) + object.trainingPhrases[j] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.outputContexts && message.outputContexts.length) { + object.outputContexts = []; + for (var j = 0; j < message.outputContexts.length; ++j) + object.outputContexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.outputContexts[j], options); + } + if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) + object.resetContexts = message.resetContexts; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.toObject(message.parameters[j], 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.v2beta1.Intent.Message.toObject(message.messages[j], options); + } + if (message.defaultResponsePlatforms && message.defaultResponsePlatforms.length) { + object.defaultResponsePlatforms = []; + for (var j = 0; j < message.defaultResponsePlatforms.length; ++j) + object.defaultResponsePlatforms[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.defaultResponsePlatforms[j]] : message.defaultResponsePlatforms[j]; + } + if (message.rootFollowupIntentName != null && message.hasOwnProperty("rootFollowupIntentName")) + object.rootFollowupIntentName = message.rootFollowupIntentName; + if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) + object.parentFollowupIntentName = message.parentFollowupIntentName; + if (message.followupIntentInfo && message.followupIntentInfo.length) { + object.followupIntentInfo = []; + for (var j = 0; j < message.followupIntentInfo.length; ++j) + object.followupIntentInfo[j] = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.toObject(message.followupIntentInfo[j], options); + } + if (message.mlDisabled != null && message.hasOwnProperty("mlDisabled")) + object.mlDisabled = message.mlDisabled; + if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) + object.liveAgentHandoff = message.liveAgentHandoff; + if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) + object.endInteraction = message.endInteraction; return object; }; /** - * Converts this SentimentAnalysisResult to JSON. + * Converts this Intent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SentimentAnalysisResult + * @memberof google.cloud.dialogflow.v2beta1.Intent * @instance * @returns {Object.} JSON object */ - SentimentAnalysisResult.prototype.toJSON = function toJSON() { + Intent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SentimentAnalysisResult; - })(); - - v2beta1.Sentiment = (function() { - /** - * Properties of a Sentiment. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISentiment - * @property {number|null} [score] Sentiment score - * @property {number|null} [magnitude] Sentiment magnitude + * WebhookState enum. + * @name google.cloud.dialogflow.v2beta1.Intent.WebhookState + * @enum {number} + * @property {number} WEBHOOK_STATE_UNSPECIFIED=0 WEBHOOK_STATE_UNSPECIFIED value + * @property {number} WEBHOOK_STATE_ENABLED=1 WEBHOOK_STATE_ENABLED value + * @property {number} WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING=2 WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING value */ + Intent.WebhookState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEBHOOK_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEBHOOK_STATE_ENABLED"] = 1; + values[valuesById[2] = "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING"] = 2; + return values; + })(); - /** - * Constructs a new Sentiment. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Sentiment. - * @implements ISentiment - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISentiment=} [properties] Properties to set - */ - function Sentiment(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]]; - } + Intent.TrainingPhrase = (function() { - /** - * Sentiment score. - * @member {number} score - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @instance - */ - Sentiment.prototype.score = 0; + /** + * Properties of a TrainingPhrase. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @interface ITrainingPhrase + * @property {string|null} [name] TrainingPhrase name + * @property {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|null} [type] TrainingPhrase type + * @property {Array.|null} [parts] TrainingPhrase parts + * @property {number|null} [timesAddedCount] TrainingPhrase timesAddedCount + */ - /** - * Sentiment magnitude. - * @member {number} magnitude - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @instance - */ - Sentiment.prototype.magnitude = 0; + /** + * Constructs a new TrainingPhrase. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @classdesc Represents a TrainingPhrase. + * @implements ITrainingPhrase + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * Creates a new Sentiment instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentiment=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment instance - */ - Sentiment.create = function create(properties) { - return new Sentiment(properties); - }; + /** + * TrainingPhrase name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.name = ""; - /** - * Encodes the specified Sentiment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentiment} message Sentiment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sentiment.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); - return writer; - }; + /** + * TrainingPhrase type. + * @member {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type} type + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.type = 0; - /** - * Encodes the specified Sentiment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Sentiment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {google.cloud.dialogflow.v2beta1.ISentiment} message Sentiment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sentiment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * TrainingPhrase parts. + * @member {Array.} parts + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.parts = $util.emptyArray; - /** - * Decodes a Sentiment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sentiment.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.v2beta1.Sentiment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * TrainingPhrase timesAddedCount. + * @member {number} timesAddedCount + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @instance + */ + TrainingPhrase.prototype.timesAddedCount = 0; + + /** + * Creates a new TrainingPhrase instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase} TrainingPhrase instance + */ + TrainingPhrase.create = function create(properties) { + return new TrainingPhrase(properties); + }; + + /** + * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.v2beta1.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timesAddedCount != null && Object.hasOwnProperty.call(message, "timesAddedCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.timesAddedCount); + return writer; + }; + + /** + * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.v2beta1.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(); + }; + + /** + * Decodes a TrainingPhrase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.Intent.TrainingPhrase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push($root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); + break; + case 4: + message.timesAddedCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TrainingPhrase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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()); + }; + + /** + * Verifies a TrainingPhrase message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.v2beta1.Intent.TrainingPhrase.Part.verify(message.parts[i]); + if (error) + return "parts." + error; + } + } + if (message.timesAddedCount != null && message.hasOwnProperty("timesAddedCount")) + if (!$util.isInteger(message.timesAddedCount)) + return "timesAddedCount: integer expected"; + return null; + }; + + /** + * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase} TrainingPhrase + */ + TrainingPhrase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "EXAMPLE": case 1: - message.score = reader.float(); + message.type = 1; break; + case "TEMPLATE": case 2: - message.magnitude = reader.float(); - break; - default: - reader.skipType(tag & 7); + message.type = 2; break; } - } - return message; - }; - - /** - * Decodes a Sentiment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sentiment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Sentiment message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Sentiment.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"; - return null; - }; + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.TrainingPhrase.parts: object expected"); + message.parts[i] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); + } + } + if (object.timesAddedCount != null) + message.timesAddedCount = object.timesAddedCount | 0; + return message; + }; - /** - * Creates a Sentiment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Sentiment} Sentiment - */ - Sentiment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Sentiment) + /** + * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @static + * @param {google.cloud.dialogflow.v2beta1.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.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.timesAddedCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type[message.type] : message.type; + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); + } + if (message.timesAddedCount != null && message.hasOwnProperty("timesAddedCount")) + object.timesAddedCount = message.timesAddedCount; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Sentiment(); - 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 Sentiment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @static - * @param {google.cloud.dialogflow.v2beta1.Sentiment} message Sentiment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Sentiment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.score = 0; - object.magnitude = 0; - } - 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 Sentiment to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Sentiment - * @instance - * @returns {Object.} JSON object - */ - Sentiment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + }; - return Sentiment; - })(); + /** + * Converts this TrainingPhrase to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @instance + * @returns {Object.} JSON object + */ + TrainingPhrase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2beta1.Contexts = (function() { + /** + * Type enum. + * @name google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} EXAMPLE=1 EXAMPLE value + * @property {number} TEMPLATE=2 TEMPLATE value + */ + TrainingPhrase.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXAMPLE"] = 1; + values[valuesById[2] = "TEMPLATE"] = 2; + return values; + })(); - /** - * Constructs a new Contexts service. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Contexts - * @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 Contexts(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + TrainingPhrase.Part = (function() { - (Contexts.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Contexts; + /** + * Properties of a Part. + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @interface IPart + * @property {string|null} [text] Part text + * @property {string|null} [entityType] Part entityType + * @property {string|null} [alias] Part alias + * @property {boolean|null} [userDefined] Part userDefined + */ - /** - * Creates new Contexts service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @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 {Contexts} RPC service. Useful where requests and/or responses are streamed. - */ - Contexts.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Constructs a new Part. + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#listContexts}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef ListContextsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListContextsResponse} [response] ListContextsResponse - */ + /** + * Part text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.text = ""; - /** - * Calls ListContexts. - * @function listContexts - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} request ListContextsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.ListContextsCallback} callback Node-style callback called with the error, if any, and ListContextsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.listContexts = function listContexts(request, callback) { - return this.rpcCall(listContexts, $root.google.cloud.dialogflow.v2beta1.ListContextsRequest, $root.google.cloud.dialogflow.v2beta1.ListContextsResponse, request, callback); - }, "name", { value: "ListContexts" }); + /** + * Part entityType. + * @member {string} entityType + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.entityType = ""; - /** - * Calls ListContexts. - * @function listContexts - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} request ListContextsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Part alias. + * @member {string} alias + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.alias = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#getContext}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef GetContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context - */ + /** + * Part userDefined. + * @member {boolean} userDefined + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @instance + */ + Part.prototype.userDefined = false; - /** - * Calls GetContext. - * @function getContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} request GetContextRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.GetContextCallback} callback Node-style callback called with the error, if any, and Context - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.getContext = function getContext(request, callback) { - return this.rpcCall(getContext, $root.google.cloud.dialogflow.v2beta1.GetContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); - }, "name", { value: "GetContext" }); + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; - /** - * Calls GetContext. - * @function getContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} request GetContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.v2beta1.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.alias); + if (message.userDefined != null && Object.hasOwnProperty.call(message, "userDefined")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.userDefined); + return writer; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#createContext}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef CreateContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context - */ + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.v2beta1.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(); + }; - /** - * Calls CreateContext. - * @function createContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} request CreateContextRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.CreateContextCallback} callback Node-style callback called with the error, if any, and Context - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.createContext = function createContext(request, callback) { - return this.rpcCall(createContext, $root.google.cloud.dialogflow.v2beta1.CreateContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); - }, "name", { value: "CreateContext" }); + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.Intent.TrainingPhrase.Part(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.entityType = reader.string(); + break; + case 3: + message.alias = reader.string(); + break; + case 4: + message.userDefined = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls CreateContext. - * @function createContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} request CreateContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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()); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#updateContext}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef UpdateContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Context} [response] Context - */ + /** + * Verifies a Part message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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.entityType != null && message.hasOwnProperty("entityType")) + if (!$util.isString(message.entityType)) + return "entityType: string expected"; + if (message.alias != null && message.hasOwnProperty("alias")) + if (!$util.isString(message.alias)) + return "alias: string expected"; + if (message.userDefined != null && message.hasOwnProperty("userDefined")) + if (typeof message.userDefined !== "boolean") + return "userDefined: boolean expected"; + return null; + }; - /** - * Calls UpdateContext. - * @function updateContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} request UpdateContextRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.UpdateContextCallback} callback Node-style callback called with the error, if any, and Context - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.updateContext = function updateContext(request, callback) { - return this.rpcCall(updateContext, $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest, $root.google.cloud.dialogflow.v2beta1.Context, request, callback); - }, "name", { value: "UpdateContext" }); + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part(); + if (object.text != null) + message.text = String(object.text); + if (object.entityType != null) + message.entityType = String(object.entityType); + if (object.alias != null) + message.alias = String(object.alias); + if (object.userDefined != null) + message.userDefined = Boolean(object.userDefined); + return message; + }; - /** - * Calls UpdateContext. - * @function updateContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} request UpdateContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @static + * @param {google.cloud.dialogflow.v2beta1.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.entityType = ""; + object.alias = ""; + object.userDefined = false; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = message.entityType; + if (message.alias != null && message.hasOwnProperty("alias")) + object.alias = message.alias; + if (message.userDefined != null && message.hasOwnProperty("userDefined")) + object.userDefined = message.userDefined; + return object; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteContext}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef DeleteContextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls DeleteContext. - * @function deleteContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} request DeleteContextRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.DeleteContextCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.deleteContext = function deleteContext(request, callback) { - return this.rpcCall(deleteContext, $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteContext" }); + return Part; + })(); - /** - * Calls DeleteContext. - * @function deleteContext - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} request DeleteContextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return TrainingPhrase; + })(); - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Contexts#deleteAllContexts}. - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @typedef DeleteAllContextsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + Intent.Parameter = (function() { - /** - * Calls DeleteAllContexts. - * @function deleteAllContexts - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} request DeleteAllContextsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContextsCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Contexts.prototype.deleteAllContexts = function deleteAllContexts(request, callback) { - return this.rpcCall(deleteAllContexts, $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteAllContexts" }); + /** + * Properties of a Parameter. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @interface IParameter + * @property {string|null} [name] Parameter name + * @property {string|null} [displayName] Parameter displayName + * @property {string|null} [value] Parameter value + * @property {string|null} [defaultValue] Parameter defaultValue + * @property {string|null} [entityTypeDisplayName] Parameter entityTypeDisplayName + * @property {boolean|null} [mandatory] Parameter mandatory + * @property {Array.|null} [prompts] Parameter prompts + * @property {boolean|null} [isList] Parameter isList + */ - /** - * Calls DeleteAllContexts. - * @function deleteAllContexts - * @memberof google.cloud.dialogflow.v2beta1.Contexts - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} request DeleteAllContextsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new Parameter. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + this.prompts = []; + 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 Contexts; - })(); + /** + * Parameter name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.name = ""; - v2beta1.Context = (function() { + /** + * Parameter displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.displayName = ""; - /** - * Properties of a Context. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IContext - * @property {string|null} [name] Context name - * @property {number|null} [lifespanCount] Context lifespanCount - * @property {google.protobuf.IStruct|null} [parameters] Context parameters - */ + /** + * Parameter value. + * @member {string} value + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.value = ""; - /** - * Constructs a new Context. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Context. - * @implements IContext - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IContext=} [properties] Properties to set - */ - function Context(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 defaultValue. + * @member {string} defaultValue + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.defaultValue = ""; - /** - * Context name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Context - * @instance - */ - Context.prototype.name = ""; + /** + * Parameter entityTypeDisplayName. + * @member {string} entityTypeDisplayName + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.entityTypeDisplayName = ""; - /** - * Context lifespanCount. - * @member {number} lifespanCount - * @memberof google.cloud.dialogflow.v2beta1.Context - * @instance - */ - Context.prototype.lifespanCount = 0; + /** + * Parameter mandatory. + * @member {boolean} mandatory + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.mandatory = false; - /** - * Context parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.cloud.dialogflow.v2beta1.Context - * @instance - */ - Context.prototype.parameters = null; + /** + * Parameter prompts. + * @member {Array.} prompts + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.prompts = $util.emptyArray; - /** - * Creates a new Context instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {google.cloud.dialogflow.v2beta1.IContext=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Context} Context instance - */ - Context.create = function create(properties) { - return new Context(properties); - }; + /** + * Parameter isList. + * @member {boolean} isList + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + */ + Parameter.prototype.isList = false; - /** - * Encodes the specified Context message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {google.cloud.dialogflow.v2beta1.IContext} message Context message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Context.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.lifespanCount != null && Object.hasOwnProperty.call(message, "lifespanCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lifespanCount); - 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(); - return writer; - }; + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IParameter=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; - /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Context.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {google.cloud.dialogflow.v2beta1.IContext} message Context message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Context.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.v2beta1.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.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.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultValue); + if (message.entityTypeDisplayName != null && Object.hasOwnProperty.call(message, "entityTypeDisplayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.entityTypeDisplayName); + if (message.mandatory != null && Object.hasOwnProperty.call(message, "mandatory")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mandatory); + if (message.prompts != null && message.prompts.length) + for (var i = 0; i < message.prompts.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.prompts[i]); + if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isList); + return writer; + }; - /** - * Decodes a Context message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Context} Context - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Context.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.v2beta1.Context(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.lifespanCount = reader.int32(); - break; - case 3: - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.v2beta1.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(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.Intent.Parameter(); + 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.value = reader.string(); + break; + case 4: + message.defaultValue = reader.string(); + break; + case 5: + message.entityTypeDisplayName = reader.string(); + break; + case 6: + message.mandatory = reader.bool(); + break; + case 7: + if (!(message.prompts && message.prompts.length)) + message.prompts = []; + message.prompts.push(reader.string()); + break; + case 8: + message.isList = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a Context message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Context} Context - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Context.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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 Context message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Context.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.lifespanCount != null && message.hasOwnProperty("lifespanCount")) - if (!$util.isInteger(message.lifespanCount)) - return "lifespanCount: integer expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters); - if (error) - return "parameters." + error; - } - return null; - }; + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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.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.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.entityTypeDisplayName != null && message.hasOwnProperty("entityTypeDisplayName")) + if (!$util.isString(message.entityTypeDisplayName)) + return "entityTypeDisplayName: string expected"; + if (message.mandatory != null && message.hasOwnProperty("mandatory")) + if (typeof message.mandatory !== "boolean") + return "mandatory: boolean expected"; + if (message.prompts != null && message.hasOwnProperty("prompts")) { + if (!Array.isArray(message.prompts)) + return "prompts: array expected"; + for (var i = 0; i < message.prompts.length; ++i) + if (!$util.isString(message.prompts[i])) + return "prompts: string[] expected"; + } + if (message.isList != null && message.hasOwnProperty("isList")) + if (typeof message.isList !== "boolean") + return "isList: boolean expected"; + return null; + }; - /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Context} Context - */ - Context.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Context) + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Parameter) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Parameter(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.value != null) + message.value = String(object.value); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.entityTypeDisplayName != null) + message.entityTypeDisplayName = String(object.entityTypeDisplayName); + if (object.mandatory != null) + message.mandatory = Boolean(object.mandatory); + if (object.prompts) { + if (!Array.isArray(object.prompts)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Parameter.prompts: array expected"); + message.prompts = []; + for (var i = 0; i < object.prompts.length; ++i) + message.prompts[i] = String(object.prompts[i]); + } + if (object.isList != null) + message.isList = Boolean(object.isList); + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @static + * @param {google.cloud.dialogflow.v2beta1.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.arrays || options.defaults) + object.prompts = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.value = ""; + object.defaultValue = ""; + object.entityTypeDisplayName = ""; + object.mandatory = false; + object.isList = 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.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.entityTypeDisplayName != null && message.hasOwnProperty("entityTypeDisplayName")) + object.entityTypeDisplayName = message.entityTypeDisplayName; + if (message.mandatory != null && message.hasOwnProperty("mandatory")) + object.mandatory = message.mandatory; + if (message.prompts && message.prompts.length) { + object.prompts = []; + for (var j = 0; j < message.prompts.length; ++j) + object.prompts[j] = message.prompts[j]; + } + if (message.isList != null && message.hasOwnProperty("isList")) + object.isList = message.isList; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Context(); - if (object.name != null) - message.name = String(object.name); - if (object.lifespanCount != null) - message.lifespanCount = object.lifespanCount | 0; - if (object.parameters != null) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Context.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); - } - return message; - }; + }; - /** - * Creates a plain object from a Context message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Context - * @static - * @param {google.cloud.dialogflow.v2beta1.Context} message Context - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Context.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.lifespanCount = 0; - object.parameters = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lifespanCount != null && message.hasOwnProperty("lifespanCount")) - object.lifespanCount = message.lifespanCount; - if (message.parameters != null && message.hasOwnProperty("parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); - return object; - }; + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Context to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Context - * @instance - * @returns {Object.} JSON object - */ - Context.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Parameter; + })(); - return Context; - })(); + Intent.Message = (function() { - v2beta1.ListContextsRequest = (function() { + /** + * Properties of a Message. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @interface IMessage + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IText|null} [text] Message text + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Message image + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null} [quickReplies] Message quickReplies + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null} [card] Message card + * @property {google.protobuf.IStruct|null} [payload] Message payload + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null} [simpleResponses] Message simpleResponses + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null} [basicCard] Message basicCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null} [suggestions] Message suggestions + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null} [linkOutSuggestion] Message linkOutSuggestion + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null} [listSelect] Message listSelect + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null} [carouselSelect] Message carouselSelect + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null} [telephonyPlayAudio] Message telephonyPlayAudio + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null} [telephonySynthesizeSpeech] Message telephonySynthesizeSpeech + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null} [telephonyTransferCall] Message telephonyTransferCall + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null} [rbmText] Message rbmText + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null} [rbmStandaloneRichCard] Message rbmStandaloneRichCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null} [rbmCarouselRichCard] Message rbmCarouselRichCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null} [browseCarouselCard] Message browseCarouselCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null} [tableCard] Message tableCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null} [mediaContent] Message mediaContent + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.Platform|null} [platform] Message platform + */ - /** - * Properties of a ListContextsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListContextsRequest - * @property {string|null} [parent] ListContextsRequest parent - * @property {number|null} [pageSize] ListContextsRequest pageSize - * @property {string|null} [pageToken] ListContextsRequest pageToken - */ + /** + * Constructs a new Message. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage=} [properties] Properties to set + */ + function Message(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 ListContextsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListContextsRequest. - * @implements IListContextsRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest=} [properties] Properties to set - */ - function ListContextsRequest(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]]; - } + /** + * Message text. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IText|null|undefined} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.text = null; - /** - * ListContextsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @instance - */ - ListContextsRequest.prototype.parent = ""; + /** + * Message image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.image = null; - /** - * ListContextsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @instance - */ - ListContextsRequest.prototype.pageSize = 0; + /** + * Message quickReplies. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null|undefined} quickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.quickReplies = null; - /** - * ListContextsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @instance - */ - ListContextsRequest.prototype.pageToken = ""; + /** + * Message card. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null|undefined} card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.card = null; - /** - * Creates a new ListContextsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest instance - */ - ListContextsRequest.create = function create(properties) { - return new ListContextsRequest(properties); - }; + /** + * Message payload. + * @member {google.protobuf.IStruct|null|undefined} payload + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.payload = null; - /** - * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} message ListContextsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContextsRequest.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; - }; + /** + * Message simpleResponses. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null|undefined} simpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.simpleResponses = null; - /** - * Encodes the specified ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsRequest} message ListContextsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContextsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Message basicCard. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null|undefined} basicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.basicCard = null; - /** - * Decodes a ListContextsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContextsRequest.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.v2beta1.ListContextsRequest(); - 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; - }; + /** + * Message suggestions. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null|undefined} suggestions + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.suggestions = null; - /** - * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContextsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Message linkOutSuggestion. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null|undefined} linkOutSuggestion + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.linkOutSuggestion = null; - /** - * Verifies a ListContextsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContextsRequest.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; - }; + /** + * Message listSelect. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null|undefined} listSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.listSelect = null; - /** - * Creates a ListContextsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListContextsRequest} ListContextsRequest - */ - ListContextsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListContextsRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListContextsRequest(); - 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; - }; + /** + * Message carouselSelect. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null|undefined} carouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.carouselSelect = null; - /** - * Creates a plain object from a ListContextsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ListContextsRequest} message ListContextsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContextsRequest.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; - }; + /** + * Message telephonyPlayAudio. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null|undefined} telephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.telephonyPlayAudio = null; - /** - * Converts this ListContextsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListContextsRequest - * @instance - * @returns {Object.} JSON object - */ - ListContextsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Message telephonySynthesizeSpeech. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null|undefined} telephonySynthesizeSpeech + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.telephonySynthesizeSpeech = null; - return ListContextsRequest; - })(); + /** + * Message telephonyTransferCall. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null|undefined} telephonyTransferCall + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.telephonyTransferCall = null; - v2beta1.ListContextsResponse = (function() { + /** + * Message rbmText. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null|undefined} rbmText + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.rbmText = null; - /** - * Properties of a ListContextsResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListContextsResponse - * @property {Array.|null} [contexts] ListContextsResponse contexts - * @property {string|null} [nextPageToken] ListContextsResponse nextPageToken - */ + /** + * Message rbmStandaloneRichCard. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null|undefined} rbmStandaloneRichCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.rbmStandaloneRichCard = null; - /** - * Constructs a new ListContextsResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListContextsResponse. - * @implements IListContextsResponse - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse=} [properties] Properties to set - */ - function ListContextsResponse(properties) { - this.contexts = []; - 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]]; - } + /** + * Message rbmCarouselRichCard. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null|undefined} rbmCarouselRichCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.rbmCarouselRichCard = null; - /** - * ListContextsResponse contexts. - * @member {Array.} contexts - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @instance - */ - ListContextsResponse.prototype.contexts = $util.emptyArray; + /** + * Message browseCarouselCard. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null|undefined} browseCarouselCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.browseCarouselCard = null; - /** - * ListContextsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @instance - */ - ListContextsResponse.prototype.nextPageToken = ""; + /** + * Message tableCard. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null|undefined} tableCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.tableCard = null; - /** - * Creates a new ListContextsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse instance - */ - ListContextsResponse.create = function create(properties) { - return new ListContextsResponse(properties); - }; + /** + * Message mediaContent. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null|undefined} mediaContent + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.mediaContent = null; - /** - * Encodes the specified ListContextsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse} message ListContextsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContextsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contexts != null && message.contexts.length) - for (var i = 0; i < message.contexts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.contexts[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; - }; + /** + * Message platform. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.Platform} platform + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Message.prototype.platform = 0; - /** - * Encodes the specified ListContextsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListContextsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IListContextsResponse} message ListContextsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListContextsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a ListContextsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContextsResponse.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.v2beta1.ListContextsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.contexts && message.contexts.length)) - message.contexts = []; - message.contexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Message message. + * @member {"text"|"image"|"quickReplies"|"card"|"payload"|"simpleResponses"|"basicCard"|"suggestions"|"linkOutSuggestion"|"listSelect"|"carouselSelect"|"telephonyPlayAudio"|"telephonySynthesizeSpeech"|"telephonyTransferCall"|"rbmText"|"rbmStandaloneRichCard"|"rbmCarouselRichCard"|"browseCarouselCard"|"tableCard"|"mediaContent"|undefined} message + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + */ + Object.defineProperty(Message.prototype, "message", { + get: $util.oneOfGetter($oneOfFields = ["text", "image", "quickReplies", "card", "payload", "simpleResponses", "basicCard", "suggestions", "linkOutSuggestion", "listSelect", "carouselSelect", "telephonyPlayAudio", "telephonySynthesizeSpeech", "telephonyTransferCall", "rbmText", "rbmStandaloneRichCard", "rbmCarouselRichCard", "browseCarouselCard", "tableCard", "mediaContent"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a ListContextsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListContextsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; - /** - * Verifies a ListContextsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListContextsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contexts != null && message.hasOwnProperty("contexts")) { - if (!Array.isArray(message.contexts)) - return "contexts: array expected"; - for (var i = 0; i < message.contexts.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.contexts[i]); - if (error) - return "contexts." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Encodes the specified Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.quickReplies != null && Object.hasOwnProperty.call(message, "quickReplies")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.encode(message.quickReplies, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.card != null && Object.hasOwnProperty.call(message, "card")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.encode(message.card, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.platform); + if (message.simpleResponses != null && Object.hasOwnProperty.call(message, "simpleResponses")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.encode(message.simpleResponses, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.basicCard != null && Object.hasOwnProperty.call(message, "basicCard")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.encode(message.basicCard, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.suggestions != null && Object.hasOwnProperty.call(message, "suggestions")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.encode(message.suggestions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.linkOutSuggestion != null && Object.hasOwnProperty.call(message, "linkOutSuggestion")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.encode(message.linkOutSuggestion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.listSelect != null && Object.hasOwnProperty.call(message, "listSelect")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.encode(message.listSelect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.carouselSelect != null && Object.hasOwnProperty.call(message, "carouselSelect")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.encode(message.carouselSelect, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.telephonyPlayAudio != null && Object.hasOwnProperty.call(message, "telephonyPlayAudio")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.encode(message.telephonyPlayAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.telephonySynthesizeSpeech != null && Object.hasOwnProperty.call(message, "telephonySynthesizeSpeech")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.encode(message.telephonySynthesizeSpeech, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.rbmText != null && Object.hasOwnProperty.call(message, "rbmText")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.encode(message.rbmText, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.rbmStandaloneRichCard != null && Object.hasOwnProperty.call(message, "rbmStandaloneRichCard")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.encode(message.rbmStandaloneRichCard, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.rbmCarouselRichCard != null && Object.hasOwnProperty.call(message, "rbmCarouselRichCard")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.encode(message.rbmCarouselRichCard, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.browseCarouselCard != null && Object.hasOwnProperty.call(message, "browseCarouselCard")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.encode(message.browseCarouselCard, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.tableCard != null && Object.hasOwnProperty.call(message, "tableCard")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.encode(message.tableCard, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.mediaContent != null && Object.hasOwnProperty.call(message, "mediaContent")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.encode(message.mediaContent, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; - /** - * Creates a ListContextsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListContextsResponse} ListContextsResponse - */ - ListContextsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListContextsResponse) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListContextsResponse(); - if (object.contexts) { - if (!Array.isArray(object.contexts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListContextsResponse.contexts: array expected"); - message.contexts = []; - for (var i = 0; i < object.contexts.length; ++i) { - if (typeof object.contexts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListContextsResponse.contexts: object expected"); - message.contexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.contexts[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListContextsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.ListContextsResponse} message ListContextsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListContextsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contexts = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.contexts && message.contexts.length) { - object.contexts = []; - for (var j = 0; j < message.contexts.length; ++j) - object.contexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.contexts[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListContextsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListContextsResponse - * @instance - * @returns {Object.} JSON object - */ - ListContextsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListContextsResponse; - })(); - - v2beta1.GetContextRequest = (function() { - - /** - * Properties of a GetContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetContextRequest - * @property {string|null} [name] GetContextRequest name - */ - - /** - * Constructs a new GetContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetContextRequest. - * @implements IGetContextRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest=} [properties] Properties to set - */ - function GetContextRequest(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]]; - } - - /** - * GetContextRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @instance - */ - GetContextRequest.prototype.name = ""; - - /** - * Creates a new GetContextRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest instance - */ - GetContextRequest.create = function create(properties) { - return new GetContextRequest(properties); - }; - - /** - * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} message GetContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContextRequest.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 GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetContextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IGetContextRequest} message GetContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContextRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetContextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContextRequest.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.v2beta1.GetContextRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Message message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.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.v2beta1.Intent.Message(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.decode(reader, reader.uint32()); + break; + case 2: + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 3: + message.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.decode(reader, reader.uint32()); + break; + case 4: + message.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.decode(reader, reader.uint32()); + break; + case 5: + message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + case 7: + message.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.decode(reader, reader.uint32()); + break; + case 8: + message.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.decode(reader, reader.uint32()); + break; + case 9: + message.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.decode(reader, reader.uint32()); + break; + case 10: + message.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.decode(reader, reader.uint32()); + break; + case 11: + message.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.decode(reader, reader.uint32()); + break; + case 12: + message.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.decode(reader, reader.uint32()); + break; + case 13: + message.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.decode(reader, reader.uint32()); + break; + case 14: + message.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.decode(reader, reader.uint32()); + break; + case 15: + message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.decode(reader, reader.uint32()); + break; + case 18: + message.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.decode(reader, reader.uint32()); + break; + case 19: + message.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.decode(reader, reader.uint32()); + break; + case 20: + message.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.decode(reader, reader.uint32()); + break; + case 22: + message.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.decode(reader, reader.uint32()); + break; + case 23: + message.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.decode(reader, reader.uint32()); + break; + case 24: + message.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.decode(reader, reader.uint32()); + break; + case 6: + message.platform = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; - - /** - * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContextRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetContextRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetContextRequest.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 GetContextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetContextRequest} GetContextRequest - */ - GetContextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetContextRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetContextRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.GetContextRequest} message GetContextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetContextRequest.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 GetContextRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetContextRequest - * @instance - * @returns {Object.} JSON object - */ - GetContextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetContextRequest; - })(); - - v2beta1.CreateContextRequest = (function() { - - /** - * Properties of a CreateContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateContextRequest - * @property {string|null} [parent] CreateContextRequest parent - * @property {google.cloud.dialogflow.v2beta1.IContext|null} [context] CreateContextRequest context - */ - - /** - * Constructs a new CreateContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateContextRequest. - * @implements ICreateContextRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest=} [properties] Properties to set - */ - function CreateContextRequest(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]]; - } - - /** - * CreateContextRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @instance - */ - CreateContextRequest.prototype.parent = ""; - - /** - * CreateContextRequest context. - * @member {google.cloud.dialogflow.v2beta1.IContext|null|undefined} context - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @instance - */ - CreateContextRequest.prototype.context = null; - - /** - * Creates a new CreateContextRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest instance - */ - CreateContextRequest.create = function create(properties) { - return new CreateContextRequest(properties); - }; - - /** - * Encodes the specified CreateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} message CreateContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateContextRequest.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.context != null && Object.hasOwnProperty.call(message, "context")) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.context, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + return message; + }; - /** - * Encodes the specified CreateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateContextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateContextRequest} message CreateContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateContextRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a CreateContextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateContextRequest.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.v2beta1.CreateContextRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.context = $root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a Message message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Message.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.v2beta1.Intent.Message.Text.verify(message.text); + if (error) + return "text." + error; + } } - } - return message; - }; - - /** - * Decodes a CreateContextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateContextRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateContextRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateContextRequest.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.context != null && message.hasOwnProperty("context")) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.context); - if (error) - return "context." + error; - } - return null; - }; - - /** - * Creates a CreateContextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateContextRequest} CreateContextRequest - */ - CreateContextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateContextRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateContextRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.context != null) { - if (typeof object.context !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateContextRequest.context: object expected"); - message.context = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.context); - } - return message; - }; - - /** - * Creates a plain object from a CreateContextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.CreateContextRequest} message CreateContextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateContextRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.context = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.context != null && message.hasOwnProperty("context")) - object.context = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.context, options); - return object; - }; - - /** - * Converts this CreateContextRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateContextRequest - * @instance - * @returns {Object.} JSON object - */ - CreateContextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateContextRequest; - })(); - - v2beta1.UpdateContextRequest = (function() { - - /** - * Properties of an UpdateContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateContextRequest - * @property {google.cloud.dialogflow.v2beta1.IContext|null} [context] UpdateContextRequest context - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateContextRequest updateMask - */ - - /** - * Constructs a new UpdateContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateContextRequest. - * @implements IUpdateContextRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest=} [properties] Properties to set - */ - function UpdateContextRequest(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]]; - } - - /** - * UpdateContextRequest context. - * @member {google.cloud.dialogflow.v2beta1.IContext|null|undefined} context - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @instance - */ - UpdateContextRequest.prototype.context = null; - - /** - * UpdateContextRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @instance - */ - UpdateContextRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateContextRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest instance - */ - UpdateContextRequest.create = function create(properties) { - return new UpdateContextRequest(properties); - }; - - /** - * Encodes the specified UpdateContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} message UpdateContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateContextRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.context != null && Object.hasOwnProperty.call(message, "context")) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.context, 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 UpdateContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateContextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateContextRequest} message UpdateContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateContextRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + if (message.image != null && message.hasOwnProperty("image")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); + if (error) + return "image." + error; + } + } + if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify(message.quickReplies); + if (error) + return "quickReplies." + error; + } + } + if (message.card != null && message.hasOwnProperty("card")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify(message.card); + if (error) + return "card." + 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.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify(message.simpleResponses); + if (error) + return "simpleResponses." + error; + } + } + if (message.basicCard != null && message.hasOwnProperty("basicCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify(message.basicCard); + if (error) + return "basicCard." + error; + } + } + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify(message.suggestions); + if (error) + return "suggestions." + error; + } + } + if (message.linkOutSuggestion != null && message.hasOwnProperty("linkOutSuggestion")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify(message.linkOutSuggestion); + if (error) + return "linkOutSuggestion." + error; + } + } + if (message.listSelect != null && message.hasOwnProperty("listSelect")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify(message.listSelect); + if (error) + return "listSelect." + error; + } + } + if (message.carouselSelect != null && message.hasOwnProperty("carouselSelect")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify(message.carouselSelect); + if (error) + return "carouselSelect." + error; + } + } + if (message.telephonyPlayAudio != null && message.hasOwnProperty("telephonyPlayAudio")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify(message.telephonyPlayAudio); + if (error) + return "telephonyPlayAudio." + error; + } + } + if (message.telephonySynthesizeSpeech != null && message.hasOwnProperty("telephonySynthesizeSpeech")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify(message.telephonySynthesizeSpeech); + if (error) + return "telephonySynthesizeSpeech." + error; + } + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify(message.telephonyTransferCall); + if (error) + return "telephonyTransferCall." + error; + } + } + if (message.rbmText != null && message.hasOwnProperty("rbmText")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify(message.rbmText); + if (error) + return "rbmText." + error; + } + } + if (message.rbmStandaloneRichCard != null && message.hasOwnProperty("rbmStandaloneRichCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify(message.rbmStandaloneRichCard); + if (error) + return "rbmStandaloneRichCard." + error; + } + } + if (message.rbmCarouselRichCard != null && message.hasOwnProperty("rbmCarouselRichCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify(message.rbmCarouselRichCard); + if (error) + return "rbmCarouselRichCard." + error; + } + } + if (message.browseCarouselCard != null && message.hasOwnProperty("browseCarouselCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify(message.browseCarouselCard); + if (error) + return "browseCarouselCard." + error; + } + } + if (message.tableCard != null && message.hasOwnProperty("tableCard")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify(message.tableCard); + if (error) + return "tableCard." + error; + } + } + if (message.mediaContent != null && message.hasOwnProperty("mediaContent")) { + if (properties.message === 1) + return "message: multiple values"; + properties.message = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify(message.mediaContent); + if (error) + return "mediaContent." + error; + } + } + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { + default: + return "platform: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 10: + case 11: + break; + } + return null; + }; - /** - * Decodes an UpdateContextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateContextRequest.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.v2beta1.UpdateContextRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.text: object expected"); + message.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.fromObject(object.text); + } + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + if (object.quickReplies != null) { + if (typeof object.quickReplies !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.quickReplies: object expected"); + message.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.fromObject(object.quickReplies); + } + if (object.card != null) { + if (typeof object.card !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.card: object expected"); + message.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.fromObject(object.card); + } + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.payload: object expected"); + message.payload = $root.google.protobuf.Struct.fromObject(object.payload); + } + if (object.simpleResponses != null) { + if (typeof object.simpleResponses !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.simpleResponses: object expected"); + message.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.fromObject(object.simpleResponses); + } + if (object.basicCard != null) { + if (typeof object.basicCard !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.basicCard: object expected"); + message.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.fromObject(object.basicCard); + } + if (object.suggestions != null) { + if (typeof object.suggestions !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.suggestions: object expected"); + message.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.fromObject(object.suggestions); + } + if (object.linkOutSuggestion != null) { + if (typeof object.linkOutSuggestion !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.linkOutSuggestion: object expected"); + message.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.fromObject(object.linkOutSuggestion); + } + if (object.listSelect != null) { + if (typeof object.listSelect !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.listSelect: object expected"); + message.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.fromObject(object.listSelect); + } + if (object.carouselSelect != null) { + if (typeof object.carouselSelect !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.carouselSelect: object expected"); + message.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.fromObject(object.carouselSelect); + } + if (object.telephonyPlayAudio != null) { + if (typeof object.telephonyPlayAudio !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonyPlayAudio: object expected"); + message.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.fromObject(object.telephonyPlayAudio); + } + if (object.telephonySynthesizeSpeech != null) { + if (typeof object.telephonySynthesizeSpeech !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonySynthesizeSpeech: object expected"); + message.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.fromObject(object.telephonySynthesizeSpeech); + } + if (object.telephonyTransferCall != null) { + if (typeof object.telephonyTransferCall !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonyTransferCall: object expected"); + message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.fromObject(object.telephonyTransferCall); + } + if (object.rbmText != null) { + if (typeof object.rbmText !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmText: object expected"); + message.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.fromObject(object.rbmText); + } + if (object.rbmStandaloneRichCard != null) { + if (typeof object.rbmStandaloneRichCard !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmStandaloneRichCard: object expected"); + message.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.fromObject(object.rbmStandaloneRichCard); + } + if (object.rbmCarouselRichCard != null) { + if (typeof object.rbmCarouselRichCard !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmCarouselRichCard: object expected"); + message.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.fromObject(object.rbmCarouselRichCard); + } + if (object.browseCarouselCard != null) { + if (typeof object.browseCarouselCard !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.browseCarouselCard: object expected"); + message.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.fromObject(object.browseCarouselCard); + } + if (object.tableCard != null) { + if (typeof object.tableCard !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.tableCard: object expected"); + message.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.fromObject(object.tableCard); + } + if (object.mediaContent != null) { + if (typeof object.mediaContent !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.mediaContent: object expected"); + message.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.fromObject(object.mediaContent); + } + switch (object.platform) { + case "PLATFORM_UNSPECIFIED": + case 0: + message.platform = 0; + break; + case "FACEBOOK": case 1: - message.context = $root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32()); + message.platform = 1; break; + case "SLACK": case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.platform = 2; break; - default: - reader.skipType(tag & 7); + case "TELEGRAM": + case 3: + message.platform = 3; + break; + case "KIK": + case 4: + message.platform = 4; + break; + case "SKYPE": + case 5: + message.platform = 5; + break; + case "LINE": + case 6: + message.platform = 6; + break; + case "VIBER": + case 7: + message.platform = 7; + break; + case "ACTIONS_ON_GOOGLE": + case 8: + message.platform = 8; + break; + case "TELEPHONY": + case 10: + message.platform = 10; + break; + case "GOOGLE_HANGOUTS": + case 11: + message.platform = 11; break; } - } - return message; - }; - - /** - * Decodes an UpdateContextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateContextRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateContextRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateContextRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.context != null && message.hasOwnProperty("context")) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.context); - if (error) - return "context." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; + return message; + }; - /** - * Creates an UpdateContextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateContextRequest} UpdateContextRequest - */ - UpdateContextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest) + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message} message Message + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Message.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.platform = options.enums === String ? "PLATFORM_UNSPECIFIED" : 0; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.toObject(message.text, options); + if (options.oneofs) + object.message = "text"; + } + if (message.image != null && message.hasOwnProperty("image")) { + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + if (options.oneofs) + object.message = "image"; + } + if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { + object.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.toObject(message.quickReplies, options); + if (options.oneofs) + object.message = "quickReplies"; + } + if (message.card != null && message.hasOwnProperty("card")) { + object.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.toObject(message.card, options); + if (options.oneofs) + object.message = "card"; + } + 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.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.platform] : message.platform; + if (message.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { + object.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.toObject(message.simpleResponses, options); + if (options.oneofs) + object.message = "simpleResponses"; + } + if (message.basicCard != null && message.hasOwnProperty("basicCard")) { + object.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.toObject(message.basicCard, options); + if (options.oneofs) + object.message = "basicCard"; + } + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + object.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.toObject(message.suggestions, options); + if (options.oneofs) + object.message = "suggestions"; + } + if (message.linkOutSuggestion != null && message.hasOwnProperty("linkOutSuggestion")) { + object.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.toObject(message.linkOutSuggestion, options); + if (options.oneofs) + object.message = "linkOutSuggestion"; + } + if (message.listSelect != null && message.hasOwnProperty("listSelect")) { + object.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.toObject(message.listSelect, options); + if (options.oneofs) + object.message = "listSelect"; + } + if (message.carouselSelect != null && message.hasOwnProperty("carouselSelect")) { + object.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.toObject(message.carouselSelect, options); + if (options.oneofs) + object.message = "carouselSelect"; + } + if (message.telephonyPlayAudio != null && message.hasOwnProperty("telephonyPlayAudio")) { + object.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.toObject(message.telephonyPlayAudio, options); + if (options.oneofs) + object.message = "telephonyPlayAudio"; + } + if (message.telephonySynthesizeSpeech != null && message.hasOwnProperty("telephonySynthesizeSpeech")) { + object.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.toObject(message.telephonySynthesizeSpeech, options); + if (options.oneofs) + object.message = "telephonySynthesizeSpeech"; + } + if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { + object.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); + if (options.oneofs) + object.message = "telephonyTransferCall"; + } + if (message.rbmText != null && message.hasOwnProperty("rbmText")) { + object.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.toObject(message.rbmText, options); + if (options.oneofs) + object.message = "rbmText"; + } + if (message.rbmStandaloneRichCard != null && message.hasOwnProperty("rbmStandaloneRichCard")) { + object.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.toObject(message.rbmStandaloneRichCard, options); + if (options.oneofs) + object.message = "rbmStandaloneRichCard"; + } + if (message.rbmCarouselRichCard != null && message.hasOwnProperty("rbmCarouselRichCard")) { + object.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.toObject(message.rbmCarouselRichCard, options); + if (options.oneofs) + object.message = "rbmCarouselRichCard"; + } + if (message.browseCarouselCard != null && message.hasOwnProperty("browseCarouselCard")) { + object.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.toObject(message.browseCarouselCard, options); + if (options.oneofs) + object.message = "browseCarouselCard"; + } + if (message.tableCard != null && message.hasOwnProperty("tableCard")) { + object.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.toObject(message.tableCard, options); + if (options.oneofs) + object.message = "tableCard"; + } + if (message.mediaContent != null && message.hasOwnProperty("mediaContent")) { + object.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.toObject(message.mediaContent, options); + if (options.oneofs) + object.message = "mediaContent"; + } return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateContextRequest(); - if (object.context != null) { - if (typeof object.context !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateContextRequest.context: object expected"); - message.context = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.context); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateContextRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + }; - /** - * Creates a plain object from an UpdateContextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateContextRequest} message UpdateContextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateContextRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.context = null; - object.updateMask = null; - } - if (message.context != null && message.hasOwnProperty("context")) - object.context = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.context, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @instance + * @returns {Object.} JSON object + */ + Message.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateContextRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateContextRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateContextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Platform enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.Platform + * @enum {number} + * @property {number} PLATFORM_UNSPECIFIED=0 PLATFORM_UNSPECIFIED value + * @property {number} FACEBOOK=1 FACEBOOK value + * @property {number} SLACK=2 SLACK value + * @property {number} TELEGRAM=3 TELEGRAM value + * @property {number} KIK=4 KIK value + * @property {number} SKYPE=5 SKYPE value + * @property {number} LINE=6 LINE value + * @property {number} VIBER=7 VIBER value + * @property {number} ACTIONS_ON_GOOGLE=8 ACTIONS_ON_GOOGLE value + * @property {number} TELEPHONY=10 TELEPHONY value + * @property {number} GOOGLE_HANGOUTS=11 GOOGLE_HANGOUTS value + */ + Message.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLATFORM_UNSPECIFIED"] = 0; + values[valuesById[1] = "FACEBOOK"] = 1; + values[valuesById[2] = "SLACK"] = 2; + values[valuesById[3] = "TELEGRAM"] = 3; + values[valuesById[4] = "KIK"] = 4; + values[valuesById[5] = "SKYPE"] = 5; + values[valuesById[6] = "LINE"] = 6; + values[valuesById[7] = "VIBER"] = 7; + values[valuesById[8] = "ACTIONS_ON_GOOGLE"] = 8; + values[valuesById[10] = "TELEPHONY"] = 10; + values[valuesById[11] = "GOOGLE_HANGOUTS"] = 11; + return values; + })(); - return UpdateContextRequest; - })(); + Message.Text = (function() { - v2beta1.DeleteContextRequest = (function() { + /** + * Properties of a Text. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IText + * @property {Array.|null} [text] Text text + */ - /** - * Properties of a DeleteContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteContextRequest - * @property {string|null} [name] DeleteContextRequest name - */ + /** + * Constructs a new Text. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a Text. + * @implements IText + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.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 DeleteContextRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteContextRequest. - * @implements IDeleteContextRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest=} [properties] Properties to set - */ - function DeleteContextRequest(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]]; - } + /** + * Text text. + * @member {Array.} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @instance + */ + Text.prototype.text = $util.emptyArray; - /** - * DeleteContextRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @instance - */ - DeleteContextRequest.prototype.name = ""; + /** + * Creates a new Text instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Text} Text instance + */ + Text.create = function create(properties) { + return new Text(properties); + }; - /** - * Creates a new DeleteContextRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest instance - */ - DeleteContextRequest.create = function create(properties) { - return new DeleteContextRequest(properties); - }; + /** + * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.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]); + return writer; + }; - /** - * Encodes the specified DeleteContextRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} message DeleteContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContextRequest.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 Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.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(); + }; - /** - * Encodes the specified DeleteContextRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteContextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteContextRequest} message DeleteContextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteContextRequest.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.v2beta1.Intent.Message.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.v2beta1.Intent.Message.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.v2beta1.Intent.Message.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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a DeleteContextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContextRequest.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.v2beta1.DeleteContextRequest(); - 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 Text message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.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()); + }; - /** - * Decodes a DeleteContextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteContextRequest.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.v2beta1.Intent.Message.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"; + } + return null; + }; - /** - * Verifies a DeleteContextRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteContextRequest.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 Text message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Text} Text + */ + Text.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text(); + if (object.text) { + if (!Array.isArray(object.text)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Text.text: array expected"); + message.text = []; + for (var i = 0; i < object.text.length; ++i) + message.text[i] = String(object.text[i]); + } + return message; + }; - /** - * Creates a DeleteContextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteContextRequest} DeleteContextRequest - */ - DeleteContextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteContextRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Creates a plain object from a Text message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.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 (message.text && message.text.length) { + object.text = []; + for (var j = 0; j < message.text.length; ++j) + object.text[j] = message.text[j]; + } + return object; + }; - /** - * Creates a plain object from a DeleteContextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteContextRequest} message DeleteContextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteContextRequest.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 Text to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @instance + * @returns {Object.} JSON object + */ + Text.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DeleteContextRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteContextRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteContextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Text; + })(); - return DeleteContextRequest; - })(); + Message.Image = (function() { - v2beta1.DeleteAllContextsRequest = (function() { + /** + * Properties of an Image. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IImage + * @property {string|null} [imageUri] Image imageUri + * @property {string|null} [accessibilityText] Image accessibilityText + */ - /** - * Properties of a DeleteAllContextsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteAllContextsRequest - * @property {string|null} [parent] DeleteAllContextsRequest parent - */ + /** + * Constructs a new Image. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents an Image. + * @implements IImage + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage=} [properties] Properties to set + */ + function Image(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 DeleteAllContextsRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteAllContextsRequest. - * @implements IDeleteAllContextsRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest=} [properties] Properties to set - */ - function DeleteAllContextsRequest(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]]; - } + /** + * Image imageUri. + * @member {string} imageUri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @instance + */ + Image.prototype.imageUri = ""; - /** - * DeleteAllContextsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @instance - */ - DeleteAllContextsRequest.prototype.parent = ""; + /** + * Image accessibilityText. + * @member {string} accessibilityText + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @instance + */ + Image.prototype.accessibilityText = ""; - /** - * Creates a new DeleteAllContextsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest instance - */ - DeleteAllContextsRequest.create = function create(properties) { - return new DeleteAllContextsRequest(properties); - }; + /** + * Creates a new Image instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image instance + */ + Image.create = function create(properties) { + return new Image(properties); + }; - /** - * Encodes the specified DeleteAllContextsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} message DeleteAllContextsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAllContextsRequest.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); - return writer; - }; + /** + * Encodes the specified Image message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageUri); + if (message.accessibilityText != null && Object.hasOwnProperty.call(message, "accessibilityText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessibilityText); + return writer; + }; - /** - * Encodes the specified DeleteAllContextsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteAllContextsRequest} message DeleteAllContextsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAllContextsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage} message Image message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Image.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DeleteAllContextsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAllContextsRequest.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.v2beta1.DeleteAllContextsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes an Image message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.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.v2beta1.Intent.Message.Image(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.imageUri = reader.string(); + break; + case 2: + message.accessibilityText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a DeleteAllContextsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAllContextsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Image message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Image.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DeleteAllContextsRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAllContextsRequest.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"; - return null; - }; + /** + * Verifies an Image message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Image.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + if (!$util.isString(message.imageUri)) + return "imageUri: string expected"; + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + if (!$util.isString(message.accessibilityText)) + return "accessibilityText: string expected"; + return null; + }; - /** - * Creates a DeleteAllContextsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} DeleteAllContextsRequest - */ - DeleteAllContextsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; + /** + * Creates an Image message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + */ + Image.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image(); + if (object.imageUri != null) + message.imageUri = String(object.imageUri); + if (object.accessibilityText != null) + message.accessibilityText = String(object.accessibilityText); + return message; + }; - /** - * Creates a plain object from a DeleteAllContextsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest} message DeleteAllContextsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAllContextsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; + /** + * Creates a plain object from an Image message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Image} message Image + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Image.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.imageUri = ""; + object.accessibilityText = ""; + } + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + object.imageUri = message.imageUri; + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + object.accessibilityText = message.accessibilityText; + return object; + }; - /** - * Converts this DeleteAllContextsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAllContextsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Image to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @instance + * @returns {Object.} JSON object + */ + Image.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeleteAllContextsRequest; - })(); + return Image; + })(); - v2beta1.Intents = (function() { + Message.QuickReplies = (function() { - /** - * Constructs a new Intents service. - * @memberof google.cloud.dialogflow.v2beta1 - * @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; - - /** - * Creates new Intents service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.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. - */ - Intents.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Properties of a QuickReplies. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IQuickReplies + * @property {string|null} [title] QuickReplies title + * @property {Array.|null} [quickReplies] QuickReplies quickReplies + */ - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#listIntents}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef ListIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListIntentsResponse} [response] ListIntentsResponse - */ + /** + * Constructs a new QuickReplies. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a QuickReplies. + * @implements IQuickReplies + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies=} [properties] Properties to set + */ + function QuickReplies(properties) { + this.quickReplies = []; + 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 ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} request ListIntentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.ListIntentsCallback} callback Node-style callback called with the error, if any, and ListIntentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.listIntents = function listIntents(request, callback) { - return this.rpcCall(listIntents, $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest, $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse, request, callback); - }, "name", { value: "ListIntents" }); + /** + * QuickReplies title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @instance + */ + QuickReplies.prototype.title = ""; - /** - * Calls ListIntents. - * @function listIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} request ListIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * QuickReplies quickReplies. + * @member {Array.} quickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @instance + */ + QuickReplies.prototype.quickReplies = $util.emptyArray; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#getIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef GetIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent - */ + /** + * Creates a new QuickReplies instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies instance + */ + QuickReplies.create = function create(properties) { + return new QuickReplies(properties); + }; - /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} request GetIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.GetIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.getIntent = function getIntent(request, callback) { - return this.rpcCall(getIntent, $root.google.cloud.dialogflow.v2beta1.GetIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); - }, "name", { value: "GetIntent" }); + /** + * Encodes the specified QuickReplies message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies} message QuickReplies message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplies.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.quickReplies != null && message.quickReplies.length) + for (var i = 0; i < message.quickReplies.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.quickReplies[i]); + return writer; + }; - /** - * Calls GetIntent. - * @function getIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} request GetIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified QuickReplies message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies} message QuickReplies message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuickReplies.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#createIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef CreateIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent - */ + /** + * Decodes a QuickReplies message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplies.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.v2beta1.Intent.Message.QuickReplies(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + if (!(message.quickReplies && message.quickReplies.length)) + message.quickReplies = []; + message.quickReplies.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.CreateIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.createIntent = function createIntent(request, callback) { - return this.rpcCall(createIntent, $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); - }, "name", { value: "CreateIntent" }); + /** + * Decodes a QuickReplies message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuickReplies.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls CreateIntent. - * @function createIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} request CreateIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a QuickReplies message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuickReplies.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { + if (!Array.isArray(message.quickReplies)) + return "quickReplies: array expected"; + for (var i = 0; i < message.quickReplies.length; ++i) + if (!$util.isString(message.quickReplies[i])) + return "quickReplies: string[] expected"; + } + return null; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#updateIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef UpdateIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Intent} [response] Intent - */ + /** + * Creates a QuickReplies message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + */ + QuickReplies.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies(); + if (object.title != null) + message.title = String(object.title); + if (object.quickReplies) { + if (!Array.isArray(object.quickReplies)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.quickReplies: array expected"); + message.quickReplies = []; + for (var i = 0; i < object.quickReplies.length; ++i) + message.quickReplies[i] = String(object.quickReplies[i]); + } + return message; + }; - /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.UpdateIntentCallback} callback Node-style callback called with the error, if any, and Intent - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.updateIntent = function updateIntent(request, callback) { - return this.rpcCall(updateIntent, $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest, $root.google.cloud.dialogflow.v2beta1.Intent, request, callback); - }, "name", { value: "UpdateIntent" }); + /** + * Creates a plain object from a QuickReplies message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} message QuickReplies + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuickReplies.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quickReplies = []; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.quickReplies && message.quickReplies.length) { + object.quickReplies = []; + for (var j = 0; j < message.quickReplies.length; ++j) + object.quickReplies[j] = message.quickReplies[j]; + } + return object; + }; - /** - * Calls UpdateIntent. - * @function updateIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} request UpdateIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this QuickReplies to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @instance + * @returns {Object.} JSON object + */ + QuickReplies.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#deleteIntent}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef DeleteIntentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + return QuickReplies; + })(); - /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} request DeleteIntentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteIntentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIntent" }); + Message.Card = (function() { - /** - * Calls DeleteIntent. - * @function deleteIntent - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} request DeleteIntentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a Card. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ICard + * @property {string|null} [title] Card title + * @property {string|null} [subtitle] Card subtitle + * @property {string|null} [imageUri] Card imageUri + * @property {Array.|null} [buttons] Card buttons + */ - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchUpdateIntents}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef BatchUpdateIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Constructs a new Card. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a Card. + * @implements ICard + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard=} [properties] Properties to set + */ + function Card(properties) { + this.buttons = []; + 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 BatchUpdateIntents. - * @function batchUpdateIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} request BatchUpdateIntentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.batchUpdateIntents = function batchUpdateIntents(request, callback) { - return this.rpcCall(batchUpdateIntents, $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchUpdateIntents" }); + /** + * Card title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @instance + */ + Card.prototype.title = ""; - /** - * Calls BatchUpdateIntents. - * @function batchUpdateIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} request BatchUpdateIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Card subtitle. + * @member {string} subtitle + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @instance + */ + Card.prototype.subtitle = ""; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Intents#batchDeleteIntents}. - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @typedef BatchDeleteIntentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Card imageUri. + * @member {string} imageUri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @instance + */ + Card.prototype.imageUri = ""; - /** - * Calls BatchDeleteIntents. - * @function batchDeleteIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} request BatchDeleteIntentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Intents.prototype.batchDeleteIntents = function batchDeleteIntents(request, callback) { - return this.rpcCall(batchDeleteIntents, $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchDeleteIntents" }); + /** + * Card buttons. + * @member {Array.} buttons + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @instance + */ + Card.prototype.buttons = $util.emptyArray; - /** - * Calls BatchDeleteIntents. - * @function batchDeleteIntents - * @memberof google.cloud.dialogflow.v2beta1.Intents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} request BatchDeleteIntentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new Card instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card instance + */ + Card.create = function create(properties) { + return new Card(properties); + }; - return Intents; - })(); - - v2beta1.Intent = (function() { - - /** - * Properties of an Intent. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IIntent - * @property {string|null} [name] Intent name - * @property {string|null} [displayName] Intent displayName - * @property {google.cloud.dialogflow.v2beta1.Intent.WebhookState|null} [webhookState] Intent webhookState - * @property {number|null} [priority] Intent priority - * @property {boolean|null} [isFallback] Intent isFallback - * @property {boolean|null} [mlEnabled] Intent mlEnabled - * @property {boolean|null} [mlDisabled] Intent mlDisabled - * @property {boolean|null} [liveAgentHandoff] Intent liveAgentHandoff - * @property {boolean|null} [endInteraction] Intent endInteraction - * @property {Array.|null} [inputContextNames] Intent inputContextNames - * @property {Array.|null} [events] Intent events - * @property {Array.|null} [trainingPhrases] Intent trainingPhrases - * @property {string|null} [action] Intent action - * @property {Array.|null} [outputContexts] Intent outputContexts - * @property {boolean|null} [resetContexts] Intent resetContexts - * @property {Array.|null} [parameters] Intent parameters - * @property {Array.|null} [messages] Intent messages - * @property {Array.|null} [defaultResponsePlatforms] Intent defaultResponsePlatforms - * @property {string|null} [rootFollowupIntentName] Intent rootFollowupIntentName - * @property {string|null} [parentFollowupIntentName] Intent parentFollowupIntentName - * @property {Array.|null} [followupIntentInfo] Intent followupIntentInfo - */ + /** + * Encodes the specified Card message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard} message Card message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Card.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); + if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageUri); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.encode(message.buttons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new Intent. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an Intent. - * @implements IIntent - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IIntent=} [properties] Properties to set - */ - function Intent(properties) { - this.inputContextNames = []; - this.events = []; - this.trainingPhrases = []; - this.outputContexts = []; - this.parameters = []; - this.messages = []; - this.defaultResponsePlatforms = []; - this.followupIntentInfo = []; - 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 Card message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard} message Card message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Card.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Intent name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.name = ""; + /** + * Decodes a Card message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Card.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.v2beta1.Intent.Message.Card(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.subtitle = reader.string(); + break; + case 3: + message.imageUri = reader.string(); + break; + case 4: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Intent displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.displayName = ""; + /** + * Decodes a Card message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Card.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Intent webhookState. - * @member {google.cloud.dialogflow.v2beta1.Intent.WebhookState} webhookState - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.webhookState = 0; + /** + * Verifies a Card message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Card.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + if (!$util.isString(message.subtitle)) + return "subtitle: string expected"; + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + if (!$util.isString(message.imageUri)) + return "imageUri: string expected"; + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + return null; + }; - /** - * Intent priority. - * @member {number} priority - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.priority = 0; + /** + * Creates a Card message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + */ + Card.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card(); + if (object.title != null) + message.title = String(object.title); + if (object.subtitle != null) + message.subtitle = String(object.subtitle); + if (object.imageUri != null) + message.imageUri = String(object.imageUri); + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Card.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Card.buttons: object expected"); + message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.fromObject(object.buttons[i]); + } + } + return message; + }; - /** - * Intent isFallback. - * @member {boolean} isFallback - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.isFallback = false; + /** + * Creates a plain object from a Card message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card} message Card + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Card.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.title = ""; + object.subtitle = ""; + object.imageUri = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + object.subtitle = message.subtitle; + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + object.imageUri = message.imageUri; + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.toObject(message.buttons[j], options); + } + return object; + }; - /** - * Intent mlEnabled. - * @member {boolean} mlEnabled - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.mlEnabled = false; + /** + * Converts this Card to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @instance + * @returns {Object.} JSON object + */ + Card.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Intent mlDisabled. - * @member {boolean} mlDisabled - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.mlDisabled = false; + Card.Button = (function() { - /** - * Intent liveAgentHandoff. - * @member {boolean} liveAgentHandoff - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.liveAgentHandoff = false; + /** + * Properties of a Button. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @interface IButton + * @property {string|null} [text] Button text + * @property {string|null} [postback] Button postback + */ - /** - * Intent endInteraction. - * @member {boolean} endInteraction - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.endInteraction = false; + /** + * Constructs a new Button. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @classdesc Represents a Button. + * @implements IButton + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton=} [properties] Properties to set + */ + function Button(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]]; + } - /** - * Intent inputContextNames. - * @member {Array.} inputContextNames - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.inputContextNames = $util.emptyArray; + /** + * Button text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @instance + */ + Button.prototype.text = ""; - /** - * Intent events. - * @member {Array.} events - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.events = $util.emptyArray; + /** + * Button postback. + * @member {string} postback + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @instance + */ + Button.prototype.postback = ""; - /** - * Intent trainingPhrases. - * @member {Array.} trainingPhrases - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.trainingPhrases = $util.emptyArray; + /** + * Creates a new Button instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button instance + */ + Button.create = function create(properties) { + return new Button(properties); + }; - /** - * Intent action. - * @member {string} action - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.action = ""; + /** + * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.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.postback != null && Object.hasOwnProperty.call(message, "postback")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.postback); + return writer; + }; - /** - * Intent outputContexts. - * @member {Array.} outputContexts - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.outputContexts = $util.emptyArray; + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Intent resetContexts. - * @member {boolean} resetContexts - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.resetContexts = false; + /** + * Decodes a Button message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.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.v2beta1.Intent.Message.Card.Button(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.postback = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Intent parameters. - * @member {Array.} parameters - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.parameters = $util.emptyArray; + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Intent messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.messages = $util.emptyArray; + /** + * Verifies a Button message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Button.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.postback != null && message.hasOwnProperty("postback")) + if (!$util.isString(message.postback)) + return "postback: string expected"; + return null; + }; - /** - * Intent defaultResponsePlatforms. - * @member {Array.} defaultResponsePlatforms - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.defaultResponsePlatforms = $util.emptyArray; + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + */ + Button.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button(); + if (object.text != null) + message.text = String(object.text); + if (object.postback != null) + message.postback = String(object.postback); + return message; + }; - /** - * Intent rootFollowupIntentName. - * @member {string} rootFollowupIntentName - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.rootFollowupIntentName = ""; + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} message Button + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Button.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.postback = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.postback != null && message.hasOwnProperty("postback")) + object.postback = message.postback; + return object; + }; - /** - * Intent parentFollowupIntentName. - * @member {string} parentFollowupIntentName - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.parentFollowupIntentName = ""; + /** + * Converts this Button to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @instance + * @returns {Object.} JSON object + */ + Button.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Intent followupIntentInfo. - * @member {Array.} followupIntentInfo - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - */ - Intent.prototype.followupIntentInfo = $util.emptyArray; + return Button; + })(); - /** - * Creates a new Intent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {google.cloud.dialogflow.v2beta1.IIntent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent instance - */ - Intent.create = function create(properties) { - return new Intent(properties); - }; + return Card; + })(); - /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {google.cloud.dialogflow.v2beta1.IIntent} message Intent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} 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.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.priority); - if (message.isFallback != null && Object.hasOwnProperty.call(message, "isFallback")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isFallback); - if (message.mlEnabled != null && Object.hasOwnProperty.call(message, "mlEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.mlEnabled); - if (message.webhookState != null && Object.hasOwnProperty.call(message, "webhookState")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.webhookState); - if (message.inputContextNames != null && message.inputContextNames.length) - for (var i = 0; i < message.inputContextNames.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.inputContextNames[i]); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.events[i]); - if (message.trainingPhrases != null && message.trainingPhrases.length) - for (var i = 0; i < message.trainingPhrases.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.encode(message.trainingPhrases[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.action); - if (message.outputContexts != null && message.outputContexts.length) - for (var i = 0; i < message.outputContexts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Context.encode(message.outputContexts[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.resetContexts != null && Object.hasOwnProperty.call(message, "resetContexts")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.resetContexts); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.encode(message.parameters[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.encode(message.messages[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.defaultResponsePlatforms != null && message.defaultResponsePlatforms.length) { - writer.uint32(/* id 15, wireType 2 =*/122).fork(); - for (var i = 0; i < message.defaultResponsePlatforms.length; ++i) - writer.int32(message.defaultResponsePlatforms[i]); - writer.ldelim(); - } - if (message.rootFollowupIntentName != null && Object.hasOwnProperty.call(message, "rootFollowupIntentName")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.rootFollowupIntentName); - if (message.parentFollowupIntentName != null && Object.hasOwnProperty.call(message, "parentFollowupIntentName")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.parentFollowupIntentName); - if (message.followupIntentInfo != null && message.followupIntentInfo.length) - for (var i = 0; i < message.followupIntentInfo.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.encode(message.followupIntentInfo[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.mlDisabled != null && Object.hasOwnProperty.call(message, "mlDisabled")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.mlDisabled); - if (message.liveAgentHandoff != null && Object.hasOwnProperty.call(message, "liveAgentHandoff")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.liveAgentHandoff); - if (message.endInteraction != null && Object.hasOwnProperty.call(message, "endInteraction")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.endInteraction); - return writer; - }; + Message.SimpleResponse = (function() { - /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {google.cloud.dialogflow.v2beta1.IIntent} message Intent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a SimpleResponse. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ISimpleResponse + * @property {string|null} [textToSpeech] SimpleResponse textToSpeech + * @property {string|null} [ssml] SimpleResponse ssml + * @property {string|null} [displayText] SimpleResponse displayText + */ - /** - * Decodes an Intent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Intent} Intent - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent(); - 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 6: - message.webhookState = reader.int32(); - break; - case 3: - message.priority = reader.int32(); - break; - case 4: - message.isFallback = reader.bool(); - break; - case 5: - message.mlEnabled = reader.bool(); - break; - case 19: - message.mlDisabled = reader.bool(); - break; - case 20: - message.liveAgentHandoff = reader.bool(); - break; - case 21: - message.endInteraction = reader.bool(); - break; - case 7: - if (!(message.inputContextNames && message.inputContextNames.length)) - message.inputContextNames = []; - message.inputContextNames.push(reader.string()); - break; - case 8: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push(reader.string()); - break; - case 9: - if (!(message.trainingPhrases && message.trainingPhrases.length)) - message.trainingPhrases = []; - message.trainingPhrases.push($root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.decode(reader, reader.uint32())); - break; - case 10: - message.action = reader.string(); - break; - case 11: - if (!(message.outputContexts && message.outputContexts.length)) - message.outputContexts = []; - message.outputContexts.push($root.google.cloud.dialogflow.v2beta1.Context.decode(reader, reader.uint32())); - break; - case 12: - message.resetContexts = reader.bool(); - break; - case 13: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.dialogflow.v2beta1.Intent.Parameter.decode(reader, reader.uint32())); - break; - case 14: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.decode(reader, reader.uint32())); - break; - case 15: - if (!(message.defaultResponsePlatforms && message.defaultResponsePlatforms.length)) - message.defaultResponsePlatforms = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.defaultResponsePlatforms.push(reader.int32()); - } else - message.defaultResponsePlatforms.push(reader.int32()); - break; - case 16: - message.rootFollowupIntentName = reader.string(); - break; - case 17: - message.parentFollowupIntentName = reader.string(); - break; - case 18: - if (!(message.followupIntentInfo && message.followupIntentInfo.length)) - message.followupIntentInfo = []; - message.followupIntentInfo.push($root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new SimpleResponse. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a SimpleResponse. + * @implements ISimpleResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse=} [properties] Properties to set + */ + function SimpleResponse(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 an Intent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SimpleResponse textToSpeech. + * @member {string} textToSpeech + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @instance + */ + SimpleResponse.prototype.textToSpeech = ""; - /** - * Verifies an Intent message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @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) { - 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.webhookState != null && message.hasOwnProperty("webhookState")) - switch (message.webhookState) { - default: - return "webhookState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.mlEnabled != null && message.hasOwnProperty("mlEnabled")) - if (typeof message.mlEnabled !== "boolean") - return "mlEnabled: boolean expected"; - if (message.mlDisabled != null && message.hasOwnProperty("mlDisabled")) - if (typeof message.mlDisabled !== "boolean") - return "mlDisabled: boolean expected"; - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) - if (typeof message.liveAgentHandoff !== "boolean") - return "liveAgentHandoff: boolean expected"; - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) - if (typeof message.endInteraction !== "boolean") - return "endInteraction: boolean expected"; - if (message.inputContextNames != null && message.hasOwnProperty("inputContextNames")) { - if (!Array.isArray(message.inputContextNames)) - return "inputContextNames: array expected"; - for (var i = 0; i < message.inputContextNames.length; ++i) - if (!$util.isString(message.inputContextNames[i])) - return "inputContextNames: string[] expected"; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) - if (!$util.isString(message.events[i])) - return "events: 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.v2beta1.Intent.TrainingPhrase.verify(message.trainingPhrases[i]); - if (error) - return "trainingPhrases." + error; - } - } - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.outputContexts != null && message.hasOwnProperty("outputContexts")) { - if (!Array.isArray(message.outputContexts)) - return "outputContexts: array expected"; - for (var i = 0; i < message.outputContexts.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Context.verify(message.outputContexts[i]); - if (error) - return "outputContexts." + error; - } - } - if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) - if (typeof message.resetContexts !== "boolean") - return "resetContexts: boolean 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.v2beta1.Intent.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + 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.v2beta1.Intent.Message.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.defaultResponsePlatforms != null && message.hasOwnProperty("defaultResponsePlatforms")) { - if (!Array.isArray(message.defaultResponsePlatforms)) - return "defaultResponsePlatforms: array expected"; - for (var i = 0; i < message.defaultResponsePlatforms.length; ++i) - switch (message.defaultResponsePlatforms[i]) { - default: - return "defaultResponsePlatforms: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 10: - case 11: - break; - } - } - if (message.rootFollowupIntentName != null && message.hasOwnProperty("rootFollowupIntentName")) - if (!$util.isString(message.rootFollowupIntentName)) - return "rootFollowupIntentName: string expected"; - if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) - if (!$util.isString(message.parentFollowupIntentName)) - return "parentFollowupIntentName: string expected"; - if (message.followupIntentInfo != null && message.hasOwnProperty("followupIntentInfo")) { - if (!Array.isArray(message.followupIntentInfo)) - return "followupIntentInfo: array expected"; - for (var i = 0; i < message.followupIntentInfo.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify(message.followupIntentInfo[i]); - if (error) - return "followupIntentInfo." + error; - } - } - return null; - }; + /** + * SimpleResponse ssml. + * @member {string} ssml + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @instance + */ + SimpleResponse.prototype.ssml = ""; - /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent} Intent - */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.webhookState) { - case "WEBHOOK_STATE_UNSPECIFIED": - case 0: - message.webhookState = 0; - break; - case "WEBHOOK_STATE_ENABLED": - case 1: - message.webhookState = 1; - break; - case "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING": - case 2: - message.webhookState = 2; - break; - } - if (object.priority != null) - message.priority = object.priority | 0; - if (object.isFallback != null) - message.isFallback = Boolean(object.isFallback); - if (object.mlEnabled != null) - message.mlEnabled = Boolean(object.mlEnabled); - if (object.mlDisabled != null) - message.mlDisabled = Boolean(object.mlDisabled); - if (object.liveAgentHandoff != null) - message.liveAgentHandoff = Boolean(object.liveAgentHandoff); - if (object.endInteraction != null) - message.endInteraction = Boolean(object.endInteraction); - if (object.inputContextNames) { - if (!Array.isArray(object.inputContextNames)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.inputContextNames: array expected"); - message.inputContextNames = []; - for (var i = 0; i < object.inputContextNames.length; ++i) - message.inputContextNames[i] = String(object.inputContextNames[i]); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) - message.events[i] = String(object.events[i]); - } - if (object.trainingPhrases) { - if (!Array.isArray(object.trainingPhrases)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.trainingPhrases: object expected"); - message.trainingPhrases[i] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.fromObject(object.trainingPhrases[i]); - } - } - if (object.action != null) - message.action = String(object.action); - if (object.outputContexts) { - if (!Array.isArray(object.outputContexts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.outputContexts: array expected"); - message.outputContexts = []; - for (var i = 0; i < object.outputContexts.length; ++i) { - if (typeof object.outputContexts[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.outputContexts: object expected"); - message.outputContexts[i] = $root.google.cloud.dialogflow.v2beta1.Context.fromObject(object.outputContexts[i]); - } - } - if (object.resetContexts != null) - message.resetContexts = Boolean(object.resetContexts); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.parameters: object expected"); - message.parameters[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.fromObject(object.parameters[i]); - } - } - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.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.v2beta1.Intent.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.fromObject(object.messages[i]); - } - } - if (object.defaultResponsePlatforms) { - if (!Array.isArray(object.defaultResponsePlatforms)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.defaultResponsePlatforms: array expected"); - message.defaultResponsePlatforms = []; - for (var i = 0; i < object.defaultResponsePlatforms.length; ++i) - switch (object.defaultResponsePlatforms[i]) { - default: - case "PLATFORM_UNSPECIFIED": - case 0: - message.defaultResponsePlatforms[i] = 0; - break; - case "FACEBOOK": - case 1: - message.defaultResponsePlatforms[i] = 1; - break; - case "SLACK": - case 2: - message.defaultResponsePlatforms[i] = 2; - break; - case "TELEGRAM": - case 3: - message.defaultResponsePlatforms[i] = 3; - break; - case "KIK": - case 4: - message.defaultResponsePlatforms[i] = 4; - break; - case "SKYPE": - case 5: - message.defaultResponsePlatforms[i] = 5; - break; - case "LINE": - case 6: - message.defaultResponsePlatforms[i] = 6; - break; - case "VIBER": - case 7: - message.defaultResponsePlatforms[i] = 7; - break; - case "ACTIONS_ON_GOOGLE": - case 8: - message.defaultResponsePlatforms[i] = 8; - break; - case "TELEPHONY": - case 10: - message.defaultResponsePlatforms[i] = 10; - break; - case "GOOGLE_HANGOUTS": - case 11: - message.defaultResponsePlatforms[i] = 11; - break; + /** + * SimpleResponse displayText. + * @member {string} displayText + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @instance + */ + SimpleResponse.prototype.displayText = ""; + + /** + * Creates a new SimpleResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse instance + */ + SimpleResponse.create = function create(properties) { + return new SimpleResponse(properties); + }; + + /** + * Encodes the specified SimpleResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse} message SimpleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textToSpeech != null && Object.hasOwnProperty.call(message, "textToSpeech")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textToSpeech); + if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); + if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayText); + return writer; + }; + + /** + * Encodes the specified SimpleResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse} message SimpleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleResponse.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.v2beta1.Intent.Message.SimpleResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.textToSpeech = reader.string(); + break; + case 2: + message.ssml = reader.string(); + break; + case 3: + message.displayText = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.rootFollowupIntentName != null) - message.rootFollowupIntentName = String(object.rootFollowupIntentName); - if (object.parentFollowupIntentName != null) - message.parentFollowupIntentName = String(object.parentFollowupIntentName); - if (object.followupIntentInfo) { - if (!Array.isArray(object.followupIntentInfo)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.followupIntentInfo: array expected"); - message.followupIntentInfo = []; - for (var i = 0; i < object.followupIntentInfo.length; ++i) { - if (typeof object.followupIntentInfo[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.followupIntentInfo: object expected"); - message.followupIntentInfo[i] = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.fromObject(object.followupIntentInfo[i]); + return message; + }; + + /** + * Decodes a SimpleResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textToSpeech != null && message.hasOwnProperty("textToSpeech")) + if (!$util.isString(message.textToSpeech)) + return "textToSpeech: string expected"; + if (message.ssml != null && message.hasOwnProperty("ssml")) + if (!$util.isString(message.ssml)) + return "ssml: string expected"; + if (message.displayText != null && message.hasOwnProperty("displayText")) + if (!$util.isString(message.displayText)) + return "displayText: string expected"; + return null; + }; + + /** + * Creates a SimpleResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse + */ + SimpleResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse(); + if (object.textToSpeech != null) + message.textToSpeech = String(object.textToSpeech); + if (object.ssml != null) + message.ssml = String(object.ssml); + if (object.displayText != null) + message.displayText = String(object.displayText); + return message; + }; + + /** + * Creates a plain object from a SimpleResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} message SimpleResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.textToSpeech = ""; + object.ssml = ""; + object.displayText = ""; + } + if (message.textToSpeech != null && message.hasOwnProperty("textToSpeech")) + object.textToSpeech = message.textToSpeech; + if (message.ssml != null && message.hasOwnProperty("ssml")) + object.ssml = message.ssml; + if (message.displayText != null && message.hasOwnProperty("displayText")) + object.displayText = message.displayText; + return object; + }; + + /** + * Converts this SimpleResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse + * @instance + * @returns {Object.} JSON object + */ + SimpleResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimpleResponse; + })(); + + Message.SimpleResponses = (function() { + + /** + * Properties of a SimpleResponses. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ISimpleResponses + * @property {Array.|null} [simpleResponses] SimpleResponses simpleResponses + */ + + /** + * Constructs a new SimpleResponses. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a SimpleResponses. + * @implements ISimpleResponses + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses=} [properties] Properties to set + */ + function SimpleResponses(properties) { + this.simpleResponses = []; + 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 an Intent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent} message Intent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Intent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.inputContextNames = []; - object.events = []; - object.trainingPhrases = []; - object.outputContexts = []; - object.parameters = []; - object.messages = []; - object.defaultResponsePlatforms = []; - object.followupIntentInfo = []; - } - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.priority = 0; - object.isFallback = false; - object.mlEnabled = false; - object.webhookState = options.enums === String ? "WEBHOOK_STATE_UNSPECIFIED" : 0; - object.action = ""; - object.resetContexts = false; - object.rootFollowupIntentName = ""; - object.parentFollowupIntentName = ""; - object.mlDisabled = false; - object.liveAgentHandoff = false; - object.endInteraction = 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.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.isFallback != null && message.hasOwnProperty("isFallback")) - object.isFallback = message.isFallback; - if (message.mlEnabled != null && message.hasOwnProperty("mlEnabled")) - object.mlEnabled = message.mlEnabled; - if (message.webhookState != null && message.hasOwnProperty("webhookState")) - object.webhookState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.WebhookState[message.webhookState] : message.webhookState; - if (message.inputContextNames && message.inputContextNames.length) { - object.inputContextNames = []; - for (var j = 0; j < message.inputContextNames.length; ++j) - object.inputContextNames[j] = message.inputContextNames[j]; - } - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = message.events[j]; - } - if (message.trainingPhrases && message.trainingPhrases.length) { - object.trainingPhrases = []; - for (var j = 0; j < message.trainingPhrases.length; ++j) - object.trainingPhrases[j] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.toObject(message.trainingPhrases[j], options); - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.outputContexts && message.outputContexts.length) { - object.outputContexts = []; - for (var j = 0; j < message.outputContexts.length; ++j) - object.outputContexts[j] = $root.google.cloud.dialogflow.v2beta1.Context.toObject(message.outputContexts[j], options); - } - if (message.resetContexts != null && message.hasOwnProperty("resetContexts")) - object.resetContexts = message.resetContexts; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Parameter.toObject(message.parameters[j], 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.v2beta1.Intent.Message.toObject(message.messages[j], options); - } - if (message.defaultResponsePlatforms && message.defaultResponsePlatforms.length) { - object.defaultResponsePlatforms = []; - for (var j = 0; j < message.defaultResponsePlatforms.length; ++j) - object.defaultResponsePlatforms[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.defaultResponsePlatforms[j]] : message.defaultResponsePlatforms[j]; - } - if (message.rootFollowupIntentName != null && message.hasOwnProperty("rootFollowupIntentName")) - object.rootFollowupIntentName = message.rootFollowupIntentName; - if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) - object.parentFollowupIntentName = message.parentFollowupIntentName; - if (message.followupIntentInfo && message.followupIntentInfo.length) { - object.followupIntentInfo = []; - for (var j = 0; j < message.followupIntentInfo.length; ++j) - object.followupIntentInfo[j] = $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.toObject(message.followupIntentInfo[j], options); - } - if (message.mlDisabled != null && message.hasOwnProperty("mlDisabled")) - object.mlDisabled = message.mlDisabled; - if (message.liveAgentHandoff != null && message.hasOwnProperty("liveAgentHandoff")) - object.liveAgentHandoff = message.liveAgentHandoff; - if (message.endInteraction != null && message.hasOwnProperty("endInteraction")) - object.endInteraction = message.endInteraction; - return object; - }; + /** + * SimpleResponses simpleResponses. + * @member {Array.} simpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @instance + */ + SimpleResponses.prototype.simpleResponses = $util.emptyArray; + + /** + * Creates a new SimpleResponses instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses instance + */ + SimpleResponses.create = function create(properties) { + return new SimpleResponses(properties); + }; + + /** + * Encodes the specified SimpleResponses message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses} message SimpleResponses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleResponses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.simpleResponses != null && message.simpleResponses.length) + for (var i = 0; i < message.simpleResponses.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.encode(message.simpleResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimpleResponses message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses} message SimpleResponses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleResponses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleResponses message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleResponses.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.v2beta1.Intent.Message.SimpleResponses(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.simpleResponses && message.simpleResponses.length)) + message.simpleResponses = []; + message.simpleResponses.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleResponses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleResponses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleResponses message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleResponses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { + if (!Array.isArray(message.simpleResponses)) + return "simpleResponses: array expected"; + for (var i = 0; i < message.simpleResponses.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify(message.simpleResponses[i]); + if (error) + return "simpleResponses." + error; + } + } + return null; + }; + + /** + * Creates a SimpleResponses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses + */ + SimpleResponses.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses(); + if (object.simpleResponses) { + if (!Array.isArray(object.simpleResponses)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.simpleResponses: array expected"); + message.simpleResponses = []; + for (var i = 0; i < object.simpleResponses.length; ++i) { + if (typeof object.simpleResponses[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.simpleResponses: object expected"); + message.simpleResponses[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.fromObject(object.simpleResponses[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SimpleResponses message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} message SimpleResponses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleResponses.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.simpleResponses = []; + if (message.simpleResponses && message.simpleResponses.length) { + object.simpleResponses = []; + for (var j = 0; j < message.simpleResponses.length; ++j) + object.simpleResponses[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.toObject(message.simpleResponses[j], options); + } + return object; + }; + + /** + * Converts this SimpleResponses to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @instance + * @returns {Object.} JSON object + */ + SimpleResponses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimpleResponses; + })(); + + Message.BasicCard = (function() { + + /** + * Properties of a BasicCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IBasicCard + * @property {string|null} [title] BasicCard title + * @property {string|null} [subtitle] BasicCard subtitle + * @property {string|null} [formattedText] BasicCard formattedText + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] BasicCard image + * @property {Array.|null} [buttons] BasicCard buttons + */ + + /** + * Constructs a new BasicCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a BasicCard. + * @implements IBasicCard + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard=} [properties] Properties to set + */ + function BasicCard(properties) { + this.buttons = []; + 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]]; + } + + /** + * BasicCard title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + */ + BasicCard.prototype.title = ""; + + /** + * BasicCard subtitle. + * @member {string} subtitle + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + */ + BasicCard.prototype.subtitle = ""; + + /** + * BasicCard formattedText. + * @member {string} formattedText + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + */ + BasicCard.prototype.formattedText = ""; + + /** + * BasicCard image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + */ + BasicCard.prototype.image = null; + + /** + * BasicCard buttons. + * @member {Array.} buttons + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + */ + BasicCard.prototype.buttons = $util.emptyArray; + + /** + * Creates a new BasicCard instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard instance + */ + BasicCard.create = function create(properties) { + return new BasicCard(properties); + }; + + /** + * Encodes the specified BasicCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard} message BasicCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicCard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); + if (message.formattedText != null && Object.hasOwnProperty.call(message, "formattedText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.formattedText); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.encode(message.buttons[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BasicCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard} message BasicCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BasicCard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BasicCard message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicCard.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.v2beta1.Intent.Message.BasicCard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.subtitle = reader.string(); + break; + case 3: + message.formattedText = reader.string(); + break; + case 4: + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 5: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BasicCard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BasicCard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BasicCard message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BasicCard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + if (!$util.isString(message.subtitle)) + return "subtitle: string expected"; + if (message.formattedText != null && message.hasOwnProperty("formattedText")) + if (!$util.isString(message.formattedText)) + return "formattedText: string expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); + if (error) + return "image." + error; + } + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } + return null; + }; + + /** + * Creates a BasicCard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + */ + BasicCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard(); + if (object.title != null) + message.title = String(object.title); + if (object.subtitle != null) + message.subtitle = String(object.subtitle); + if (object.formattedText != null) + message.formattedText = String(object.formattedText); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.buttons: object expected"); + message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.fromObject(object.buttons[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BasicCard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} message BasicCard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BasicCard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buttons = []; + if (options.defaults) { + object.title = ""; + object.subtitle = ""; + object.formattedText = ""; + object.image = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + object.subtitle = message.subtitle; + if (message.formattedText != null && message.hasOwnProperty("formattedText")) + object.formattedText = message.formattedText; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.toObject(message.buttons[j], options); + } + return object; + }; + + /** + * Converts this BasicCard to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @instance + * @returns {Object.} JSON object + */ + BasicCard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + BasicCard.Button = (function() { + + /** + * Properties of a Button. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @interface IButton + * @property {string|null} [title] Button title + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null} [openUriAction] Button openUriAction + */ + + /** + * Constructs a new Button. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @classdesc Represents a Button. + * @implements IButton + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton=} [properties] Properties to set + */ + function Button(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]]; + } + + /** + * Button title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @instance + */ + Button.prototype.title = ""; + + /** + * Button openUriAction. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null|undefined} openUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @instance + */ + Button.prototype.openUriAction = null; + + /** + * Creates a new Button instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button instance + */ + Button.create = function create(properties) { + return new Button(properties); + }; + + /** + * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.openUriAction != null && Object.hasOwnProperty.call(message, "openUriAction")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.encode(message.openUriAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton} message Button message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Button.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Button message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.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.v2beta1.Intent.Message.BasicCard.Button(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Button message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Button.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Button message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Button.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify(message.openUriAction); + if (error) + return "openUriAction." + error; + } + return null; + }; + + /** + * Creates a Button message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + */ + Button.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button(); + if (object.title != null) + message.title = String(object.title); + if (object.openUriAction != null) { + if (typeof object.openUriAction !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.openUriAction: object expected"); + message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.fromObject(object.openUriAction); + } + return message; + }; + + /** + * Creates a plain object from a Button message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} message Button + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Button.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.openUriAction = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) + object.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.toObject(message.openUriAction, options); + return object; + }; + + /** + * Converts this Button to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @instance + * @returns {Object.} JSON object + */ + Button.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Button.OpenUriAction = (function() { + + /** + * Properties of an OpenUriAction. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @interface IOpenUriAction + * @property {string|null} [uri] OpenUriAction uri + */ + + /** + * Constructs a new OpenUriAction. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @classdesc Represents an OpenUriAction. + * @implements IOpenUriAction + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction=} [properties] Properties to set + */ + function OpenUriAction(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]]; + } + + /** + * OpenUriAction uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @instance + */ + OpenUriAction.prototype.uri = ""; + + /** + * Creates a new OpenUriAction instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction instance + */ + OpenUriAction.create = function create(properties) { + return new OpenUriAction(properties); + }; + + /** + * Encodes the specified OpenUriAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction} message OpenUriAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenUriAction.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); + return writer; + }; + + /** + * Encodes the specified OpenUriAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction} message OpenUriAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpenUriAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpenUriAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenUriAction.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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.uri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpenUriAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpenUriAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpenUriAction message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpenUriAction.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"; + return null; + }; + + /** + * Creates an OpenUriAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction + */ + OpenUriAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an OpenUriAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} message OpenUriAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenUriAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this OpenUriAction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @instance + * @returns {Object.} JSON object + */ + OpenUriAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OpenUriAction; + })(); + + return Button; + })(); + + return BasicCard; + })(); + + Message.Suggestion = (function() { + + /** + * Properties of a Suggestion. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ISuggestion + * @property {string|null} [title] Suggestion title + */ + + /** + * Constructs a new Suggestion. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a Suggestion. + * @implements ISuggestion + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion=} [properties] Properties to set + */ + function Suggestion(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]]; + } + + /** + * Suggestion title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @instance + */ + Suggestion.prototype.title = ""; + + /** + * Creates a new Suggestion instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion instance + */ + Suggestion.create = function create(properties) { + return new Suggestion(properties); + }; + + /** + * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + return writer; + }; + + /** + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.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.v2beta1.Intent.Message.Suggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Suggestion message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Suggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion + */ + Suggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion(); + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} message Suggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Suggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.title = ""; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this Suggestion to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion + * @instance + * @returns {Object.} JSON object + */ + Suggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Suggestion; + })(); + + Message.Suggestions = (function() { + + /** + * Properties of a Suggestions. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ISuggestions + * @property {Array.|null} [suggestions] Suggestions suggestions + */ + + /** + * Constructs a new Suggestions. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a Suggestions. + * @implements ISuggestions + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions=} [properties] Properties to set + */ + function Suggestions(properties) { + this.suggestions = []; + 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]]; + } + + /** + * Suggestions suggestions. + * @member {Array.} suggestions + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @instance + */ + Suggestions.prototype.suggestions = $util.emptyArray; + + /** + * Creates a new Suggestions instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions instance + */ + Suggestions.create = function create(properties) { + return new Suggestions(properties); + }; + + /** + * Encodes the specified Suggestions message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions} message Suggestions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Suggestions message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions} message Suggestions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Suggestions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestions.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.v2beta1.Intent.Message.Suggestions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Suggestions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Suggestions message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Suggestions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify(message.suggestions[i]); + if (error) + return "suggestions." + error; + } + } + return null; + }; + + /** + * Creates a Suggestions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions + */ + Suggestions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.suggestions: object expected"); + message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.fromObject(object.suggestions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Suggestions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} message Suggestions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Suggestions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.toObject(message.suggestions[j], options); + } + return object; + }; + + /** + * Converts this Suggestions to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions + * @instance + * @returns {Object.} JSON object + */ + Suggestions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Suggestions; + })(); + + Message.LinkOutSuggestion = (function() { + + /** + * Properties of a LinkOutSuggestion. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ILinkOutSuggestion + * @property {string|null} [destinationName] LinkOutSuggestion destinationName + * @property {string|null} [uri] LinkOutSuggestion uri + */ + + /** + * Constructs a new LinkOutSuggestion. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a LinkOutSuggestion. + * @implements ILinkOutSuggestion + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion=} [properties] Properties to set + */ + function LinkOutSuggestion(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]]; + } + + /** + * LinkOutSuggestion destinationName. + * @member {string} destinationName + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @instance + */ + LinkOutSuggestion.prototype.destinationName = ""; + + /** + * LinkOutSuggestion uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @instance + */ + LinkOutSuggestion.prototype.uri = ""; + + /** + * Creates a new LinkOutSuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion instance + */ + LinkOutSuggestion.create = function create(properties) { + return new LinkOutSuggestion(properties); + }; + + /** + * Encodes the specified LinkOutSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion} message LinkOutSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinkOutSuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationName != null && Object.hasOwnProperty.call(message, "destinationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + return writer; + }; + + /** + * Encodes the specified LinkOutSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion} message LinkOutSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinkOutSuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LinkOutSuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinkOutSuggestion.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.v2beta1.Intent.Message.LinkOutSuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.destinationName = reader.string(); + break; + case 2: + message.uri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LinkOutSuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinkOutSuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LinkOutSuggestion message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LinkOutSuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.destinationName != null && message.hasOwnProperty("destinationName")) + if (!$util.isString(message.destinationName)) + return "destinationName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a LinkOutSuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion + */ + LinkOutSuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion(); + if (object.destinationName != null) + message.destinationName = String(object.destinationName); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a LinkOutSuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} message LinkOutSuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LinkOutSuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.destinationName = ""; + object.uri = ""; + } + if (message.destinationName != null && message.hasOwnProperty("destinationName")) + object.destinationName = message.destinationName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this LinkOutSuggestion to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * @instance + * @returns {Object.} JSON object + */ + LinkOutSuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LinkOutSuggestion; + })(); + + Message.ListSelect = (function() { + + /** + * Properties of a ListSelect. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IListSelect + * @property {string|null} [title] ListSelect title + * @property {Array.|null} [items] ListSelect items + * @property {string|null} [subtitle] ListSelect subtitle + */ + + /** + * Constructs a new ListSelect. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a ListSelect. + * @implements IListSelect + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect=} [properties] Properties to set + */ + function ListSelect(properties) { + this.items = []; + 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]]; + } + + /** + * ListSelect title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @instance + */ + ListSelect.prototype.title = ""; + + /** + * ListSelect items. + * @member {Array.} items + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @instance + */ + ListSelect.prototype.items = $util.emptyArray; + + /** + * ListSelect subtitle. + * @member {string} subtitle + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @instance + */ + ListSelect.prototype.subtitle = ""; + + /** + * Creates a new ListSelect instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect instance + */ + ListSelect.create = function create(properties) { + return new ListSelect(properties); + }; + + /** + * Encodes the specified ListSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect} message ListSelect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSelect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.encode(message.items[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subtitle); + return writer; + }; + + /** + * Encodes the specified ListSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect} message ListSelect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSelect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSelect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSelect.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.v2beta1.Intent.Message.ListSelect(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.decode(reader, reader.uint32())); + break; + case 3: + message.subtitle = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSelect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSelect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSelect message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSelect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify(message.items[i]); + if (error) + return "items." + error; + } + } + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + if (!$util.isString(message.subtitle)) + return "subtitle: string expected"; + return null; + }; + + /** + * Creates a ListSelect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + */ + ListSelect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect(); + if (object.title != null) + message.title = String(object.title); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.items: object expected"); + message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.fromObject(object.items[i]); + } + } + if (object.subtitle != null) + message.subtitle = String(object.subtitle); + return message; + }; + + /** + * Creates a plain object from a ListSelect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} message ListSelect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSelect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (options.defaults) { + object.title = ""; + object.subtitle = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.toObject(message.items[j], options); + } + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + object.subtitle = message.subtitle; + return object; + }; + + /** + * Converts this ListSelect to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @instance + * @returns {Object.} JSON object + */ + ListSelect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ListSelect.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @interface IItem + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null} [info] Item info + * @property {string|null} [title] Item title + * @property {string|null} [description] Item description + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Item image + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem=} [properties] Properties to set + */ + function Item(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]]; + } + + /** + * Item info. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null|undefined} info + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @instance + */ + Item.prototype.info = null; + + /** + * Item title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @instance + */ + Item.prototype.title = ""; + + /** + * Item description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @instance + */ + Item.prototype.description = ""; + + /** + * Item image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @instance + */ + Item.prototype.image = null; + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.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.v2beta1.Intent.Message.ListSelect.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.decode(reader, reader.uint32()); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.info != null && message.hasOwnProperty("info")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify(message.info); + if (error) + return "info." + error; + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item(); + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.info: object expected"); + message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.fromObject(object.info); + } + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.info = null; + object.title = ""; + object.description = ""; + object.image = null; + } + if (message.info != null && message.hasOwnProperty("info")) + object.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.toObject(message.info, options); + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Item; + })(); + + return ListSelect; + })(); + + Message.CarouselSelect = (function() { + + /** + * Properties of a CarouselSelect. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ICarouselSelect + * @property {Array.|null} [items] CarouselSelect items + */ + + /** + * Constructs a new CarouselSelect. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a CarouselSelect. + * @implements ICarouselSelect + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect=} [properties] Properties to set + */ + function CarouselSelect(properties) { + this.items = []; + 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]]; + } + + /** + * CarouselSelect items. + * @member {Array.} items + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @instance + */ + CarouselSelect.prototype.items = $util.emptyArray; + + /** + * Creates a new CarouselSelect instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect instance + */ + CarouselSelect.create = function create(properties) { + return new CarouselSelect(properties); + }; + + /** + * Encodes the specified CarouselSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect} message CarouselSelect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarouselSelect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CarouselSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect} message CarouselSelect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CarouselSelect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CarouselSelect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarouselSelect.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.v2beta1.Intent.Message.CarouselSelect(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CarouselSelect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CarouselSelect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CarouselSelect message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CarouselSelect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a CarouselSelect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + */ + CarouselSelect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.items: object expected"); + message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CarouselSelect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} message CarouselSelect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CarouselSelect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this CarouselSelect to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @instance + * @returns {Object.} JSON object + */ + CarouselSelect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CarouselSelect.Item = (function() { + + /** + * Properties of an Item. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @interface IItem + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null} [info] Item info + * @property {string|null} [title] Item title + * @property {string|null} [description] Item description + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Item image + */ + + /** + * Constructs a new Item. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @classdesc Represents an Item. + * @implements IItem + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem=} [properties] Properties to set + */ + function Item(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]]; + } + + /** + * Item info. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null|undefined} info + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @instance + */ + Item.prototype.info = null; + + /** + * Item title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @instance + */ + Item.prototype.title = ""; + + /** + * Item description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @instance + */ + Item.prototype.description = ""; + + /** + * Item image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @instance + */ + Item.prototype.image = null; + + /** + * Creates a new Item instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item instance + */ + Item.create = function create(properties) { + return new Item(properties); + }; + + /** + * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem} message Item message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Item.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Item message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.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.v2beta1.Intent.Message.CarouselSelect.Item(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.decode(reader, reader.uint32()); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Item message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Item.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Item message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Item.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.info != null && message.hasOwnProperty("info")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify(message.info); + if (error) + return "info." + error; + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); + if (error) + return "image." + error; + } + return null; + }; + + /** + * Creates an Item message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item + */ + Item.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item(); + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.info: object expected"); + message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.fromObject(object.info); + } + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + return message; + }; + + /** + * Creates a plain object from an Item message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} message Item + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Item.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.info = null; + object.title = ""; + object.description = ""; + object.image = null; + } + if (message.info != null && message.hasOwnProperty("info")) + object.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.toObject(message.info, options); + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + return object; + }; + + /** + * Converts this Item to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item + * @instance + * @returns {Object.} JSON object + */ + Item.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Item; + })(); - /** - * Converts this Intent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @instance - * @returns {Object.} JSON object - */ - Intent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return CarouselSelect; + })(); - /** - * WebhookState enum. - * @name google.cloud.dialogflow.v2beta1.Intent.WebhookState - * @enum {number} - * @property {number} WEBHOOK_STATE_UNSPECIFIED=0 WEBHOOK_STATE_UNSPECIFIED value - * @property {number} WEBHOOK_STATE_ENABLED=1 WEBHOOK_STATE_ENABLED value - * @property {number} WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING=2 WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING value - */ - Intent.WebhookState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEBHOOK_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "WEBHOOK_STATE_ENABLED"] = 1; - values[valuesById[2] = "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING"] = 2; - return values; - })(); + Message.SelectItemInfo = (function() { - Intent.TrainingPhrase = (function() { + /** + * Properties of a SelectItemInfo. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ISelectItemInfo + * @property {string|null} [key] SelectItemInfo key + * @property {Array.|null} [synonyms] SelectItemInfo synonyms + */ - /** - * Properties of a TrainingPhrase. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @interface ITrainingPhrase - * @property {string|null} [name] TrainingPhrase name - * @property {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type|null} [type] TrainingPhrase type - * @property {Array.|null} [parts] TrainingPhrase parts - * @property {number|null} [timesAddedCount] TrainingPhrase timesAddedCount - */ + /** + * Constructs a new SelectItemInfo. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a SelectItemInfo. + * @implements ISelectItemInfo + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo=} [properties] Properties to set + */ + function SelectItemInfo(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 TrainingPhrase. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @classdesc Represents a TrainingPhrase. - * @implements ITrainingPhrase - * @constructor - * @param {google.cloud.dialogflow.v2beta1.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]]; - } + /** + * SelectItemInfo key. + * @member {string} key + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @instance + */ + SelectItemInfo.prototype.key = ""; - /** - * TrainingPhrase name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.name = ""; + /** + * SelectItemInfo synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @instance + */ + SelectItemInfo.prototype.synonyms = $util.emptyArray; - /** - * TrainingPhrase type. - * @member {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type} type - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.type = 0; + /** + * Creates a new SelectItemInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo instance + */ + SelectItemInfo.create = function create(properties) { + return new SelectItemInfo(properties); + }; - /** - * TrainingPhrase parts. - * @member {Array.} parts - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.parts = $util.emptyArray; + /** + * Encodes the specified SelectItemInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo} message SelectItemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectItemInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + 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; + }; - /** - * TrainingPhrase timesAddedCount. - * @member {number} timesAddedCount - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @instance - */ - TrainingPhrase.prototype.timesAddedCount = 0; + /** + * Encodes the specified SelectItemInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo} message SelectItemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectItemInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new TrainingPhrase instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.ITrainingPhrase=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase} TrainingPhrase instance - */ - TrainingPhrase.create = function create(properties) { - return new TrainingPhrase(properties); - }; + /** + * Decodes a SelectItemInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectItemInfo.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.v2beta1.Intent.Message.SelectItemInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = 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; + }; - /** - * Encodes the specified TrainingPhrase message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.v2beta1.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.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.parts != null && message.parts.length) - for (var i = 0; i < message.parts.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.encode(message.parts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timesAddedCount != null && Object.hasOwnProperty.call(message, "timesAddedCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.timesAddedCount); - return writer; - }; + /** + * Decodes a SelectItemInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectItemInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified TrainingPhrase message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.v2beta1.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(); - }; + /** + * Verifies a SelectItemInfo message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectItemInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: 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; + }; - /** - * Decodes a TrainingPhrase message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.Intent.TrainingPhrase(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - if (!(message.parts && message.parts.length)) - message.parts = []; - message.parts.push($root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.decode(reader, reader.uint32())); - break; - case 4: - message.timesAddedCount = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Creates a SelectItemInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + */ + SelectItemInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo(); + if (object.key != null) + message.key = String(object.key); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.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 a SelectItemInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} message SelectItemInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectItemInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.synonyms = []; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + 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 SelectItemInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @instance + * @returns {Object.} JSON object + */ + SelectItemInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SelectItemInfo; + })(); + + Message.TelephonyPlayAudio = (function() { + + /** + * Properties of a TelephonyPlayAudio. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ITelephonyPlayAudio + * @property {string|null} [audioUri] TelephonyPlayAudio audioUri + */ + + /** + * Constructs a new TelephonyPlayAudio. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a TelephonyPlayAudio. + * @implements ITelephonyPlayAudio + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio=} [properties] Properties to set + */ + function TelephonyPlayAudio(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 TrainingPhrase message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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()); - }; + /** + * TelephonyPlayAudio audioUri. + * @member {string} audioUri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @instance + */ + TelephonyPlayAudio.prototype.audioUri = ""; - /** - * Verifies a TrainingPhrase message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.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.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.v2beta1.Intent.TrainingPhrase.Part.verify(message.parts[i]); - if (error) - return "parts." + error; + /** + * Creates a new TelephonyPlayAudio instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio instance + */ + TelephonyPlayAudio.create = function create(properties) { + return new TelephonyPlayAudio(properties); + }; + + /** + * Encodes the specified TelephonyPlayAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio} message TelephonyPlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyPlayAudio.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); + return writer; + }; + + /** + * Encodes the specified TelephonyPlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio} message TelephonyPlayAudio message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyPlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TelephonyPlayAudio message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyPlayAudio.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.v2beta1.Intent.Message.TelephonyPlayAudio(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.audioUri = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (message.timesAddedCount != null && message.hasOwnProperty("timesAddedCount")) - if (!$util.isInteger(message.timesAddedCount)) - return "timesAddedCount: integer expected"; - return null; - }; + return message; + }; - /** - * Creates a TrainingPhrase message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase} TrainingPhrase - */ - TrainingPhrase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "EXAMPLE": - case 1: - message.type = 1; - break; - case "TEMPLATE": - case 2: - message.type = 2; - break; - } - if (object.parts) { - if (!Array.isArray(object.parts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.Intent.TrainingPhrase.parts: object expected"); - message.parts[i] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.fromObject(object.parts[i]); - } - } - if (object.timesAddedCount != null) - message.timesAddedCount = object.timesAddedCount | 0; - return message; - }; + /** + * Decodes a TelephonyPlayAudio message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyPlayAudio.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a TrainingPhrase message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @static - * @param {google.cloud.dialogflow.v2beta1.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.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.timesAddedCount = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type[message.type] : message.type; - if (message.parts && message.parts.length) { - object.parts = []; - for (var j = 0; j < message.parts.length; ++j) - object.parts[j] = $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.toObject(message.parts[j], options); - } - if (message.timesAddedCount != null && message.hasOwnProperty("timesAddedCount")) - object.timesAddedCount = message.timesAddedCount; - return object; - }; + /** + * Verifies a TelephonyPlayAudio message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelephonyPlayAudio.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"; + return null; + }; - /** - * Converts this TrainingPhrase to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @instance - * @returns {Object.} JSON object - */ - TrainingPhrase.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a TelephonyPlayAudio message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + */ + TelephonyPlayAudio.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + return message; + }; - /** - * Type enum. - * @name google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} EXAMPLE=1 EXAMPLE value - * @property {number} TEMPLATE=2 TEMPLATE value - */ - TrainingPhrase.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXAMPLE"] = 1; - values[valuesById[2] = "TEMPLATE"] = 2; - return values; + /** + * Creates a plain object from a TelephonyPlayAudio message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} message TelephonyPlayAudio + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelephonyPlayAudio.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.audioUri = ""; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + return object; + }; + + /** + * Converts this TelephonyPlayAudio to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @instance + * @returns {Object.} JSON object + */ + TelephonyPlayAudio.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TelephonyPlayAudio; })(); - TrainingPhrase.Part = (function() { + Message.TelephonySynthesizeSpeech = (function() { /** - * Properties of a Part. - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @interface IPart - * @property {string|null} [text] Part text - * @property {string|null} [entityType] Part entityType - * @property {string|null} [alias] Part alias - * @property {boolean|null} [userDefined] Part userDefined + * Properties of a TelephonySynthesizeSpeech. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ITelephonySynthesizeSpeech + * @property {string|null} [text] TelephonySynthesizeSpeech text + * @property {string|null} [ssml] TelephonySynthesizeSpeech ssml */ /** - * Constructs a new Part. - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase - * @classdesc Represents a Part. - * @implements IPart + * Constructs a new TelephonySynthesizeSpeech. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a TelephonySynthesizeSpeech. + * @implements ITelephonySynthesizeSpeech * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech=} [properties] Properties to set */ - function Part(properties) { + function TelephonySynthesizeSpeech(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104947,100 +106081,94 @@ } /** - * Part text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * TelephonySynthesizeSpeech text. + * @member {string|null|undefined} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @instance */ - Part.prototype.text = ""; + TelephonySynthesizeSpeech.prototype.text = null; /** - * Part entityType. - * @member {string} entityType - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * TelephonySynthesizeSpeech ssml. + * @member {string|null|undefined} ssml + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @instance */ - Part.prototype.entityType = ""; + TelephonySynthesizeSpeech.prototype.ssml = null; - /** - * Part alias. - * @member {string} alias - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part - * @instance - */ - Part.prototype.alias = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Part userDefined. - * @member {boolean} userDefined - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * TelephonySynthesizeSpeech source. + * @member {"text"|"ssml"|undefined} source + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @instance */ - Part.prototype.userDefined = false; + Object.defineProperty(TelephonySynthesizeSpeech.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Part instance using the specified properties. + * Creates a new TelephonySynthesizeSpeech instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech instance */ - Part.create = function create(properties) { - return new Part(properties); + TelephonySynthesizeSpeech.create = function create(properties) { + return new TelephonySynthesizeSpeech(properties); }; /** - * Encodes the specified Part message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. + * Encodes the specified TelephonySynthesizeSpeech message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech} message TelephonySynthesizeSpeech message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Part.encode = function encode(message, writer) { + TelephonySynthesizeSpeech.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityType); - if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.alias); - if (message.userDefined != null && Object.hasOwnProperty.call(message, "userDefined")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.userDefined); + if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); return writer; }; /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.verify|verify} messages. + * Encodes the specified TelephonySynthesizeSpeech message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.IPart} message Part message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech} message TelephonySynthesizeSpeech message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Part.encodeDelimited = function encodeDelimited(message, writer) { + TelephonySynthesizeSpeech.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Part message from the specified reader or buffer. + * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech * @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) { + TelephonySynthesizeSpeech.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.v2beta1.Intent.TrainingPhrase.Part(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -105048,13 +106176,212 @@ message.text = reader.string(); break; case 2: - message.entityType = reader.string(); + message.ssml = reader.string(); break; - case 3: - message.alias = reader.string(); + default: + reader.skipType(tag & 7); break; - case 4: - message.userDefined = reader.bool(); + } + } + return message; + }; + + /** + * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonySynthesizeSpeech.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TelephonySynthesizeSpeech message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TelephonySynthesizeSpeech.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"; + } + return null; + }; + + /** + * Creates a TelephonySynthesizeSpeech message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech + */ + TelephonySynthesizeSpeech.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech(); + if (object.text != null) + message.text = String(object.text); + if (object.ssml != null) + message.ssml = String(object.ssml); + return message; + }; + + /** + * Creates a plain object from a TelephonySynthesizeSpeech message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} message TelephonySynthesizeSpeech + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TelephonySynthesizeSpeech.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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"; + } + return object; + }; + + /** + * Converts this TelephonySynthesizeSpeech to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech + * @instance + * @returns {Object.} JSON object + */ + TelephonySynthesizeSpeech.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TelephonySynthesizeSpeech; + })(); + + Message.TelephonyTransferCall = (function() { + + /** + * Properties of a TelephonyTransferCall. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface ITelephonyTransferCall + * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber + */ + + /** + * Constructs a new TelephonyTransferCall. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a TelephonyTransferCall. + * @implements ITelephonyTransferCall + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall=} [properties] Properties to set + */ + function TelephonyTransferCall(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]]; + } + + /** + * TelephonyTransferCall phoneNumber. + * @member {string} phoneNumber + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall + * @instance + */ + TelephonyTransferCall.prototype.phoneNumber = ""; + + /** + * Creates a new TelephonyTransferCall instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall instance + */ + TelephonyTransferCall.create = function create(properties) { + return new TelephonyTransferCall(properties); + }; + + /** + * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); + return writer; + }; + + /** + * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TelephonyTransferCall message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TelephonyTransferCall.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.v2beta1.Intent.Message.TelephonyTransferCall(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.phoneNumber = reader.string(); break; default: reader.skipType(tag & 7); @@ -105065,1462 +106392,912 @@ }; /** - * Decodes a Part message from the specified reader or buffer, length delimited. + * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall * @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) { + TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Part message. + * Verifies a TelephonyTransferCall message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall * @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) { + TelephonyTransferCall.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.entityType != null && message.hasOwnProperty("entityType")) - if (!$util.isString(message.entityType)) - return "entityType: string expected"; - if (message.alias != null && message.hasOwnProperty("alias")) - if (!$util.isString(message.alias)) - return "alias: string expected"; - if (message.userDefined != null && message.hasOwnProperty("userDefined")) - if (typeof message.userDefined !== "boolean") - return "userDefined: boolean expected"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; return null; }; /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. + * Creates a TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} Part + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part) + TelephonyTransferCall.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part(); - if (object.text != null) - message.text = String(object.text); - if (object.entityType != null) - message.entityType = String(object.entityType); - if (object.alias != null) - message.alias = String(object.alias); - if (object.userDefined != null) - message.userDefined = Boolean(object.userDefined); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); return message; }; /** - * Creates a plain object from a Part message. Also converts values to other types if specified. + * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part} message Part + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} message TelephonyTransferCall * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Part.toObject = function toObject(message, options) { + TelephonyTransferCall.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.text = ""; - object.entityType = ""; - object.alias = ""; - object.userDefined = false; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = message.entityType; - if (message.alias != null && message.hasOwnProperty("alias")) - object.alias = message.alias; - if (message.userDefined != null && message.hasOwnProperty("userDefined")) - object.userDefined = message.userDefined; + if (options.defaults) + object.phoneNumber = ""; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = message.phoneNumber; return object; }; /** - * Converts this Part to JSON. + * Converts this TelephonyTransferCall to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall * @instance * @returns {Object.} JSON object */ - Part.prototype.toJSON = function toJSON() { + TelephonyTransferCall.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Part; + return TelephonyTransferCall; })(); - return TrainingPhrase; - })(); - - Intent.Parameter = (function() { - - /** - * Properties of a Parameter. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @interface IParameter - * @property {string|null} [name] Parameter name - * @property {string|null} [displayName] Parameter displayName - * @property {string|null} [value] Parameter value - * @property {string|null} [defaultValue] Parameter defaultValue - * @property {string|null} [entityTypeDisplayName] Parameter entityTypeDisplayName - * @property {boolean|null} [mandatory] Parameter mandatory - * @property {Array.|null} [prompts] Parameter prompts - * @property {boolean|null} [isList] Parameter isList - */ - - /** - * Constructs a new Parameter. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - this.prompts = []; - 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 name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.name = ""; - - /** - * Parameter displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.displayName = ""; - - /** - * Parameter value. - * @member {string} value - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.value = ""; - - /** - * Parameter defaultValue. - * @member {string} defaultValue - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.defaultValue = ""; - - /** - * Parameter entityTypeDisplayName. - * @member {string} entityTypeDisplayName - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.entityTypeDisplayName = ""; - - /** - * Parameter mandatory. - * @member {boolean} mandatory - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.mandatory = false; - - /** - * Parameter prompts. - * @member {Array.} prompts - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.prompts = $util.emptyArray; - - /** - * Parameter isList. - * @member {boolean} isList - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - */ - Parameter.prototype.isList = false; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IParameter=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Parameter.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.v2beta1.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.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.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.defaultValue); - if (message.entityTypeDisplayName != null && Object.hasOwnProperty.call(message, "entityTypeDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.entityTypeDisplayName); - if (message.mandatory != null && Object.hasOwnProperty.call(message, "mandatory")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.mandatory); - if (message.prompts != null && message.prompts.length) - for (var i = 0; i < message.prompts.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.prompts[i]); - if (message.isList != null && Object.hasOwnProperty.call(message, "isList")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.isList); - return writer; - }; - - /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Parameter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.v2beta1.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(); - }; - - /** - * Decodes a Parameter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.Intent.Parameter(); - 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.value = reader.string(); - break; - case 4: - message.defaultValue = reader.string(); - break; - case 5: - message.entityTypeDisplayName = reader.string(); - break; - case 6: - message.mandatory = reader.bool(); - break; - case 7: - if (!(message.prompts && message.prompts.length)) - message.prompts = []; - message.prompts.push(reader.string()); - break; - case 8: - message.isList = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Message.RbmText = (function() { - /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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()); - }; + /** + * Properties of a RbmText. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IRbmText + * @property {string|null} [text] RbmText text + * @property {Array.|null} [rbmSuggestion] RbmText rbmSuggestion + */ - /** - * Verifies a Parameter message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.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.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.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.entityTypeDisplayName != null && message.hasOwnProperty("entityTypeDisplayName")) - if (!$util.isString(message.entityTypeDisplayName)) - return "entityTypeDisplayName: string expected"; - if (message.mandatory != null && message.hasOwnProperty("mandatory")) - if (typeof message.mandatory !== "boolean") - return "mandatory: boolean expected"; - if (message.prompts != null && message.hasOwnProperty("prompts")) { - if (!Array.isArray(message.prompts)) - return "prompts: array expected"; - for (var i = 0; i < message.prompts.length; ++i) - if (!$util.isString(message.prompts[i])) - return "prompts: string[] expected"; + /** + * Constructs a new RbmText. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a RbmText. + * @implements IRbmText + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText=} [properties] Properties to set + */ + function RbmText(properties) { + this.rbmSuggestion = []; + 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.isList != null && message.hasOwnProperty("isList")) - if (typeof message.isList !== "boolean") - return "isList: 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.v2beta1.Intent.Parameter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Parameter} Parameter - */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Parameter) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Parameter(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.value != null) - message.value = String(object.value); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.entityTypeDisplayName != null) - message.entityTypeDisplayName = String(object.entityTypeDisplayName); - if (object.mandatory != null) - message.mandatory = Boolean(object.mandatory); - if (object.prompts) { - if (!Array.isArray(object.prompts)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Parameter.prompts: array expected"); - message.prompts = []; - for (var i = 0; i < object.prompts.length; ++i) - message.prompts[i] = String(object.prompts[i]); - } - if (object.isList != null) - message.isList = Boolean(object.isList); - return message; - }; + /** + * RbmText text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @instance + */ + RbmText.prototype.text = ""; - /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @static - * @param {google.cloud.dialogflow.v2beta1.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.arrays || options.defaults) - object.prompts = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.value = ""; - object.defaultValue = ""; - object.entityTypeDisplayName = ""; - object.mandatory = false; - object.isList = 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.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.entityTypeDisplayName != null && message.hasOwnProperty("entityTypeDisplayName")) - object.entityTypeDisplayName = message.entityTypeDisplayName; - if (message.mandatory != null && message.hasOwnProperty("mandatory")) - object.mandatory = message.mandatory; - if (message.prompts && message.prompts.length) { - object.prompts = []; - for (var j = 0; j < message.prompts.length; ++j) - object.prompts[j] = message.prompts[j]; - } - if (message.isList != null && message.hasOwnProperty("isList")) - object.isList = message.isList; - return object; - }; + /** + * RbmText rbmSuggestion. + * @member {Array.} rbmSuggestion + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @instance + */ + RbmText.prototype.rbmSuggestion = $util.emptyArray; - /** - * Converts this Parameter to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Parameter - * @instance - * @returns {Object.} JSON object - */ - Parameter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new RbmText instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText instance + */ + RbmText.create = function create(properties) { + return new RbmText(properties); + }; - return Parameter; - })(); + /** + * Encodes the specified RbmText message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText} message RbmText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmText.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.rbmSuggestion != null && message.rbmSuggestion.length) + for (var i = 0; i < message.rbmSuggestion.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.encode(message.rbmSuggestion[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - Intent.Message = (function() { + /** + * Encodes the specified RbmText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText} message RbmText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a Message. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @interface IMessage - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IText|null} [text] Message text - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Message image - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null} [quickReplies] Message quickReplies - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null} [card] Message card - * @property {google.protobuf.IStruct|null} [payload] Message payload - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null} [simpleResponses] Message simpleResponses - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null} [basicCard] Message basicCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null} [suggestions] Message suggestions - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null} [linkOutSuggestion] Message linkOutSuggestion - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null} [listSelect] Message listSelect - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null} [carouselSelect] Message carouselSelect - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null} [telephonyPlayAudio] Message telephonyPlayAudio - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null} [telephonySynthesizeSpeech] Message telephonySynthesizeSpeech - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null} [telephonyTransferCall] Message telephonyTransferCall - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null} [rbmText] Message rbmText - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null} [rbmStandaloneRichCard] Message rbmStandaloneRichCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null} [rbmCarouselRichCard] Message rbmCarouselRichCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null} [browseCarouselCard] Message browseCarouselCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null} [tableCard] Message tableCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null} [mediaContent] Message mediaContent - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.Platform|null} [platform] Message platform - */ + /** + * Decodes a RbmText message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmText.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.v2beta1.Intent.Message.RbmText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + if (!(message.rbmSuggestion && message.rbmSuggestion.length)) + message.rbmSuggestion = []; + message.rbmSuggestion.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new Message. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @classdesc Represents a Message. - * @implements IMessage - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage=} [properties] Properties to set - */ - function Message(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]]; - } + /** + * Decodes a RbmText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Message text. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IText|null|undefined} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.text = null; + /** + * Verifies a RbmText message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmText.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.rbmSuggestion != null && message.hasOwnProperty("rbmSuggestion")) { + if (!Array.isArray(message.rbmSuggestion)) + return "rbmSuggestion: array expected"; + for (var i = 0; i < message.rbmSuggestion.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify(message.rbmSuggestion[i]); + if (error) + return "rbmSuggestion." + error; + } + } + return null; + }; - /** - * Message image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.image = null; + /** + * Creates a RbmText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText + */ + RbmText.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText(); + if (object.text != null) + message.text = String(object.text); + if (object.rbmSuggestion) { + if (!Array.isArray(object.rbmSuggestion)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.rbmSuggestion: array expected"); + message.rbmSuggestion = []; + for (var i = 0; i < object.rbmSuggestion.length; ++i) { + if (typeof object.rbmSuggestion[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.rbmSuggestion: object expected"); + message.rbmSuggestion[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.fromObject(object.rbmSuggestion[i]); + } + } + return message; + }; - /** - * Message quickReplies. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies|null|undefined} quickReplies - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.quickReplies = null; + /** + * Creates a plain object from a RbmText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} message RbmText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rbmSuggestion = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.rbmSuggestion && message.rbmSuggestion.length) { + object.rbmSuggestion = []; + for (var j = 0; j < message.rbmSuggestion.length; ++j) + object.rbmSuggestion[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.toObject(message.rbmSuggestion[j], options); + } + return object; + }; - /** - * Message card. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ICard|null|undefined} card - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.card = null; + /** + * Converts this RbmText to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText + * @instance + * @returns {Object.} JSON object + */ + RbmText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Message payload. - * @member {google.protobuf.IStruct|null|undefined} payload - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.payload = null; + return RbmText; + })(); - /** - * Message simpleResponses. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses|null|undefined} simpleResponses - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.simpleResponses = null; + Message.RbmCarouselCard = (function() { - /** - * Message basicCard. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard|null|undefined} basicCard - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.basicCard = null; + /** + * Properties of a RbmCarouselCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IRbmCarouselCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|null} [cardWidth] RbmCarouselCard cardWidth + * @property {Array.|null} [cardContents] RbmCarouselCard cardContents + */ - /** - * Message suggestions. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions|null|undefined} suggestions - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.suggestions = null; + /** + * Constructs a new RbmCarouselCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a RbmCarouselCard. + * @implements IRbmCarouselCard + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard=} [properties] Properties to set + */ + function RbmCarouselCard(properties) { + this.cardContents = []; + 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]]; + } - /** - * Message linkOutSuggestion. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion|null|undefined} linkOutSuggestion - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.linkOutSuggestion = null; + /** + * RbmCarouselCard cardWidth. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth} cardWidth + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @instance + */ + RbmCarouselCard.prototype.cardWidth = 0; - /** - * Message listSelect. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect|null|undefined} listSelect - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.listSelect = null; + /** + * RbmCarouselCard cardContents. + * @member {Array.} cardContents + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @instance + */ + RbmCarouselCard.prototype.cardContents = $util.emptyArray; - /** - * Message carouselSelect. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect|null|undefined} carouselSelect - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.carouselSelect = null; + /** + * Creates a new RbmCarouselCard instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard instance + */ + RbmCarouselCard.create = function create(properties) { + return new RbmCarouselCard(properties); + }; - /** - * Message telephonyPlayAudio. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio|null|undefined} telephonyPlayAudio - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.telephonyPlayAudio = null; + /** + * Encodes the specified RbmCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard} message RbmCarouselCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmCarouselCard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardWidth != null && Object.hasOwnProperty.call(message, "cardWidth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cardWidth); + if (message.cardContents != null && message.cardContents.length) + for (var i = 0; i < message.cardContents.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.encode(message.cardContents[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Message telephonySynthesizeSpeech. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech|null|undefined} telephonySynthesizeSpeech - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.telephonySynthesizeSpeech = null; + /** + * Encodes the specified RbmCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard} message RbmCarouselCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmCarouselCard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Message telephonyTransferCall. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall|null|undefined} telephonyTransferCall - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.telephonyTransferCall = null; + /** + * Decodes a RbmCarouselCard message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmCarouselCard.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.v2beta1.Intent.Message.RbmCarouselCard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cardWidth = reader.int32(); + break; + case 2: + if (!(message.cardContents && message.cardContents.length)) + message.cardContents = []; + message.cardContents.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Message rbmText. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText|null|undefined} rbmText - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.rbmText = null; + /** + * Decodes a RbmCarouselCard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmCarouselCard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Message rbmStandaloneRichCard. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard|null|undefined} rbmStandaloneRichCard - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.rbmStandaloneRichCard = null; + /** + * Verifies a RbmCarouselCard message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmCarouselCard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardWidth != null && message.hasOwnProperty("cardWidth")) + switch (message.cardWidth) { + default: + return "cardWidth: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.cardContents != null && message.hasOwnProperty("cardContents")) { + if (!Array.isArray(message.cardContents)) + return "cardContents: array expected"; + for (var i = 0; i < message.cardContents.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify(message.cardContents[i]); + if (error) + return "cardContents." + error; + } + } + return null; + }; - /** - * Message rbmCarouselRichCard. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard|null|undefined} rbmCarouselRichCard - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.rbmCarouselRichCard = null; + /** + * Creates a RbmCarouselCard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard + */ + RbmCarouselCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard(); + switch (object.cardWidth) { + case "CARD_WIDTH_UNSPECIFIED": + case 0: + message.cardWidth = 0; + break; + case "SMALL": + case 1: + message.cardWidth = 1; + break; + case "MEDIUM": + case 2: + message.cardWidth = 2; + break; + } + if (object.cardContents) { + if (!Array.isArray(object.cardContents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.cardContents: array expected"); + message.cardContents = []; + for (var i = 0; i < object.cardContents.length; ++i) { + if (typeof object.cardContents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.cardContents: object expected"); + message.cardContents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.fromObject(object.cardContents[i]); + } + } + return message; + }; - /** - * Message browseCarouselCard. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard|null|undefined} browseCarouselCard - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.browseCarouselCard = null; + /** + * Creates a plain object from a RbmCarouselCard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} message RbmCarouselCard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmCarouselCard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cardContents = []; + if (options.defaults) + object.cardWidth = options.enums === String ? "CARD_WIDTH_UNSPECIFIED" : 0; + if (message.cardWidth != null && message.hasOwnProperty("cardWidth")) + object.cardWidth = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth[message.cardWidth] : message.cardWidth; + if (message.cardContents && message.cardContents.length) { + object.cardContents = []; + for (var j = 0; j < message.cardContents.length; ++j) + object.cardContents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.toObject(message.cardContents[j], options); + } + return object; + }; - /** - * Message tableCard. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard|null|undefined} tableCard - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.tableCard = null; + /** + * Converts this RbmCarouselCard to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard + * @instance + * @returns {Object.} JSON object + */ + RbmCarouselCard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Message mediaContent. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent|null|undefined} mediaContent - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.mediaContent = null; + /** + * CardWidth enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth + * @enum {number} + * @property {number} CARD_WIDTH_UNSPECIFIED=0 CARD_WIDTH_UNSPECIFIED value + * @property {number} SMALL=1 SMALL value + * @property {number} MEDIUM=2 MEDIUM value + */ + RbmCarouselCard.CardWidth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CARD_WIDTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "SMALL"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + return values; + })(); - /** - * Message platform. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.Platform} platform - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Message.prototype.platform = 0; + return RbmCarouselCard; + })(); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Message.RbmStandaloneCard = (function() { - /** - * Message message. - * @member {"text"|"image"|"quickReplies"|"card"|"payload"|"simpleResponses"|"basicCard"|"suggestions"|"linkOutSuggestion"|"listSelect"|"carouselSelect"|"telephonyPlayAudio"|"telephonySynthesizeSpeech"|"telephonyTransferCall"|"rbmText"|"rbmStandaloneRichCard"|"rbmCarouselRichCard"|"browseCarouselCard"|"tableCard"|"mediaContent"|undefined} message - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - */ - Object.defineProperty(Message.prototype, "message", { - get: $util.oneOfGetter($oneOfFields = ["text", "image", "quickReplies", "card", "payload", "simpleResponses", "basicCard", "suggestions", "linkOutSuggestion", "listSelect", "carouselSelect", "telephonyPlayAudio", "telephonySynthesizeSpeech", "telephonyTransferCall", "rbmText", "rbmStandaloneRichCard", "rbmCarouselRichCard", "browseCarouselCard", "tableCard", "mediaContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a RbmStandaloneCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @interface IRbmStandaloneCard + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|null} [cardOrientation] RbmStandaloneCard cardOrientation + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|null} [thumbnailImageAlignment] RbmStandaloneCard thumbnailImageAlignment + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null} [cardContent] RbmStandaloneCard cardContent + */ - /** - * Creates a new Message instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message instance - */ - Message.create = function create(properties) { - return new Message(properties); - }; + /** + * Constructs a new RbmStandaloneCard. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message + * @classdesc Represents a RbmStandaloneCard. + * @implements IRbmStandaloneCard + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard=} [properties] Properties to set + */ + function RbmStandaloneCard(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 Message message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage} message Message message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Message.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.quickReplies != null && Object.hasOwnProperty.call(message, "quickReplies")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.encode(message.quickReplies, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.card != null && Object.hasOwnProperty.call(message, "card")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.encode(message.card, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.platform); - if (message.simpleResponses != null && Object.hasOwnProperty.call(message, "simpleResponses")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.encode(message.simpleResponses, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.basicCard != null && Object.hasOwnProperty.call(message, "basicCard")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.encode(message.basicCard, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.suggestions != null && Object.hasOwnProperty.call(message, "suggestions")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.encode(message.suggestions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.linkOutSuggestion != null && Object.hasOwnProperty.call(message, "linkOutSuggestion")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.encode(message.linkOutSuggestion, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.listSelect != null && Object.hasOwnProperty.call(message, "listSelect")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.encode(message.listSelect, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.carouselSelect != null && Object.hasOwnProperty.call(message, "carouselSelect")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.encode(message.carouselSelect, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.telephonyPlayAudio != null && Object.hasOwnProperty.call(message, "telephonyPlayAudio")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.encode(message.telephonyPlayAudio, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.telephonySynthesizeSpeech != null && Object.hasOwnProperty.call(message, "telephonySynthesizeSpeech")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.encode(message.telephonySynthesizeSpeech, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.telephonyTransferCall != null && Object.hasOwnProperty.call(message, "telephonyTransferCall")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.encode(message.telephonyTransferCall, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.rbmText != null && Object.hasOwnProperty.call(message, "rbmText")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.encode(message.rbmText, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.rbmStandaloneRichCard != null && Object.hasOwnProperty.call(message, "rbmStandaloneRichCard")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.encode(message.rbmStandaloneRichCard, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.rbmCarouselRichCard != null && Object.hasOwnProperty.call(message, "rbmCarouselRichCard")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.encode(message.rbmCarouselRichCard, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.browseCarouselCard != null && Object.hasOwnProperty.call(message, "browseCarouselCard")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.encode(message.browseCarouselCard, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.tableCard != null && Object.hasOwnProperty.call(message, "tableCard")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.encode(message.tableCard, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.mediaContent != null && Object.hasOwnProperty.call(message, "mediaContent")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.encode(message.mediaContent, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - return writer; - }; + /** + * RbmStandaloneCard cardOrientation. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation} cardOrientation + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @instance + */ + RbmStandaloneCard.prototype.cardOrientation = 0; - /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IMessage} message Message message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Message.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * RbmStandaloneCard thumbnailImageAlignment. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment} thumbnailImageAlignment + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @instance + */ + RbmStandaloneCard.prototype.thumbnailImageAlignment = 0; - /** - * Decodes a Message message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Message.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.v2beta1.Intent.Message(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.decode(reader, reader.uint32()); - break; - case 2: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 3: - message.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.decode(reader, reader.uint32()); - break; - case 4: - message.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.decode(reader, reader.uint32()); - break; - case 5: - message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - case 7: - message.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.decode(reader, reader.uint32()); - break; - case 8: - message.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.decode(reader, reader.uint32()); - break; - case 9: - message.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.decode(reader, reader.uint32()); - break; - case 10: - message.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.decode(reader, reader.uint32()); - break; - case 11: - message.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.decode(reader, reader.uint32()); - break; - case 12: - message.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.decode(reader, reader.uint32()); - break; - case 13: - message.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.decode(reader, reader.uint32()); - break; - case 14: - message.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.decode(reader, reader.uint32()); - break; - case 15: - message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.decode(reader, reader.uint32()); - break; - case 18: - message.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.decode(reader, reader.uint32()); - break; - case 19: - message.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.decode(reader, reader.uint32()); - break; - case 20: - message.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.decode(reader, reader.uint32()); - break; - case 22: - message.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.decode(reader, reader.uint32()); - break; - case 23: - message.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.decode(reader, reader.uint32()); - break; - case 24: - message.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.decode(reader, reader.uint32()); - break; - case 6: - message.platform = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * RbmStandaloneCard cardContent. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null|undefined} cardContent + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @instance + */ + RbmStandaloneCard.prototype.cardContent = null; - /** - * Decodes a Message message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Message.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new RbmStandaloneCard instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard instance + */ + RbmStandaloneCard.create = function create(properties) { + return new RbmStandaloneCard(properties); + }; - /** - * Verifies a Message message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Message.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.v2beta1.Intent.Message.Text.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.image != null && message.hasOwnProperty("image")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - } - if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify(message.quickReplies); - if (error) - return "quickReplies." + error; - } - } - if (message.card != null && message.hasOwnProperty("card")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify(message.card); - if (error) - return "card." + 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.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify(message.simpleResponses); - if (error) - return "simpleResponses." + error; - } - } - if (message.basicCard != null && message.hasOwnProperty("basicCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify(message.basicCard); - if (error) - return "basicCard." + error; - } - } - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify(message.suggestions); - if (error) - return "suggestions." + error; - } - } - if (message.linkOutSuggestion != null && message.hasOwnProperty("linkOutSuggestion")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify(message.linkOutSuggestion); - if (error) - return "linkOutSuggestion." + error; - } - } - if (message.listSelect != null && message.hasOwnProperty("listSelect")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify(message.listSelect); - if (error) - return "listSelect." + error; - } - } - if (message.carouselSelect != null && message.hasOwnProperty("carouselSelect")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify(message.carouselSelect); - if (error) - return "carouselSelect." + error; - } - } - if (message.telephonyPlayAudio != null && message.hasOwnProperty("telephonyPlayAudio")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify(message.telephonyPlayAudio); - if (error) - return "telephonyPlayAudio." + error; - } - } - if (message.telephonySynthesizeSpeech != null && message.hasOwnProperty("telephonySynthesizeSpeech")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify(message.telephonySynthesizeSpeech); - if (error) - return "telephonySynthesizeSpeech." + error; - } - } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify(message.telephonyTransferCall); - if (error) - return "telephonyTransferCall." + error; - } - } - if (message.rbmText != null && message.hasOwnProperty("rbmText")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify(message.rbmText); - if (error) - return "rbmText." + error; - } - } - if (message.rbmStandaloneRichCard != null && message.hasOwnProperty("rbmStandaloneRichCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify(message.rbmStandaloneRichCard); - if (error) - return "rbmStandaloneRichCard." + error; - } - } - if (message.rbmCarouselRichCard != null && message.hasOwnProperty("rbmCarouselRichCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify(message.rbmCarouselRichCard); - if (error) - return "rbmCarouselRichCard." + error; - } - } - if (message.browseCarouselCard != null && message.hasOwnProperty("browseCarouselCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify(message.browseCarouselCard); - if (error) - return "browseCarouselCard." + error; + /** + * Encodes the specified RbmStandaloneCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard} message RbmStandaloneCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmStandaloneCard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cardOrientation != null && Object.hasOwnProperty.call(message, "cardOrientation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cardOrientation); + if (message.thumbnailImageAlignment != null && Object.hasOwnProperty.call(message, "thumbnailImageAlignment")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.thumbnailImageAlignment); + if (message.cardContent != null && Object.hasOwnProperty.call(message, "cardContent")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.encode(message.cardContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RbmStandaloneCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard} message RbmStandaloneCard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmStandaloneCard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RbmStandaloneCard message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmStandaloneCard.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.v2beta1.Intent.Message.RbmStandaloneCard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cardOrientation = reader.int32(); + break; + case 2: + message.thumbnailImageAlignment = reader.int32(); + break; + case 3: + message.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - if (message.tableCard != null && message.hasOwnProperty("tableCard")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify(message.tableCard); + return message; + }; + + /** + * Decodes a RbmStandaloneCard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmStandaloneCard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RbmStandaloneCard message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmStandaloneCard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cardOrientation != null && message.hasOwnProperty("cardOrientation")) + switch (message.cardOrientation) { + default: + return "cardOrientation: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.thumbnailImageAlignment != null && message.hasOwnProperty("thumbnailImageAlignment")) + switch (message.thumbnailImageAlignment) { + default: + return "thumbnailImageAlignment: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.cardContent != null && message.hasOwnProperty("cardContent")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify(message.cardContent); if (error) - return "tableCard." + error; + return "cardContent." + error; } - } - if (message.mediaContent != null && message.hasOwnProperty("mediaContent")) { - if (properties.message === 1) - return "message: multiple values"; - properties.message = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify(message.mediaContent); - if (error) - return "mediaContent." + error; + return null; + }; + + /** + * Creates a RbmStandaloneCard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard + */ + RbmStandaloneCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard(); + switch (object.cardOrientation) { + case "CARD_ORIENTATION_UNSPECIFIED": + case 0: + message.cardOrientation = 0; + break; + case "HORIZONTAL": + case 1: + message.cardOrientation = 1; + break; + case "VERTICAL": + case 2: + message.cardOrientation = 2; + break; } - } - if (message.platform != null && message.hasOwnProperty("platform")) - switch (message.platform) { - default: - return "platform: enum value expected"; + switch (object.thumbnailImageAlignment) { + case "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED": case 0: + message.thumbnailImageAlignment = 0; + break; + case "LEFT": case 1: + message.thumbnailImageAlignment = 1; + break; + case "RIGHT": case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 10: - case 11: + message.thumbnailImageAlignment = 2; break; } - return null; - }; + if (object.cardContent != null) { + if (typeof object.cardContent !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.cardContent: object expected"); + message.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.fromObject(object.cardContent); + } + return message; + }; - /** - * Creates a Message message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message} Message - */ - Message.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message) + /** + * Creates a plain object from a RbmStandaloneCard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} message RbmStandaloneCard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmStandaloneCard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cardOrientation = options.enums === String ? "CARD_ORIENTATION_UNSPECIFIED" : 0; + object.thumbnailImageAlignment = options.enums === String ? "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" : 0; + object.cardContent = null; + } + if (message.cardOrientation != null && message.hasOwnProperty("cardOrientation")) + object.cardOrientation = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation[message.cardOrientation] : message.cardOrientation; + if (message.thumbnailImageAlignment != null && message.hasOwnProperty("thumbnailImageAlignment")) + object.thumbnailImageAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment[message.thumbnailImageAlignment] : message.thumbnailImageAlignment; + if (message.cardContent != null && message.hasOwnProperty("cardContent")) + object.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.toObject(message.cardContent, options); return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.text: object expected"); - message.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.fromObject(object.text); - } - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - if (object.quickReplies != null) { - if (typeof object.quickReplies !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.quickReplies: object expected"); - message.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.fromObject(object.quickReplies); - } - if (object.card != null) { - if (typeof object.card !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.card: object expected"); - message.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.fromObject(object.card); - } - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.payload: object expected"); - message.payload = $root.google.protobuf.Struct.fromObject(object.payload); - } - if (object.simpleResponses != null) { - if (typeof object.simpleResponses !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.simpleResponses: object expected"); - message.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.fromObject(object.simpleResponses); - } - if (object.basicCard != null) { - if (typeof object.basicCard !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.basicCard: object expected"); - message.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.fromObject(object.basicCard); - } - if (object.suggestions != null) { - if (typeof object.suggestions !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.suggestions: object expected"); - message.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.fromObject(object.suggestions); - } - if (object.linkOutSuggestion != null) { - if (typeof object.linkOutSuggestion !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.linkOutSuggestion: object expected"); - message.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.fromObject(object.linkOutSuggestion); - } - if (object.listSelect != null) { - if (typeof object.listSelect !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.listSelect: object expected"); - message.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.fromObject(object.listSelect); - } - if (object.carouselSelect != null) { - if (typeof object.carouselSelect !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.carouselSelect: object expected"); - message.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.fromObject(object.carouselSelect); - } - if (object.telephonyPlayAudio != null) { - if (typeof object.telephonyPlayAudio !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonyPlayAudio: object expected"); - message.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.fromObject(object.telephonyPlayAudio); - } - if (object.telephonySynthesizeSpeech != null) { - if (typeof object.telephonySynthesizeSpeech !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonySynthesizeSpeech: object expected"); - message.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.fromObject(object.telephonySynthesizeSpeech); - } - if (object.telephonyTransferCall != null) { - if (typeof object.telephonyTransferCall !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.telephonyTransferCall: object expected"); - message.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.fromObject(object.telephonyTransferCall); - } - if (object.rbmText != null) { - if (typeof object.rbmText !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmText: object expected"); - message.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.fromObject(object.rbmText); - } - if (object.rbmStandaloneRichCard != null) { - if (typeof object.rbmStandaloneRichCard !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmStandaloneRichCard: object expected"); - message.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.fromObject(object.rbmStandaloneRichCard); - } - if (object.rbmCarouselRichCard != null) { - if (typeof object.rbmCarouselRichCard !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.rbmCarouselRichCard: object expected"); - message.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.fromObject(object.rbmCarouselRichCard); - } - if (object.browseCarouselCard != null) { - if (typeof object.browseCarouselCard !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.browseCarouselCard: object expected"); - message.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.fromObject(object.browseCarouselCard); - } - if (object.tableCard != null) { - if (typeof object.tableCard !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.tableCard: object expected"); - message.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.fromObject(object.tableCard); - } - if (object.mediaContent != null) { - if (typeof object.mediaContent !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.mediaContent: object expected"); - message.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.fromObject(object.mediaContent); - } - switch (object.platform) { - case "PLATFORM_UNSPECIFIED": - case 0: - message.platform = 0; - break; - case "FACEBOOK": - case 1: - message.platform = 1; - break; - case "SLACK": - case 2: - message.platform = 2; - break; - case "TELEGRAM": - case 3: - message.platform = 3; - break; - case "KIK": - case 4: - message.platform = 4; - break; - case "SKYPE": - case 5: - message.platform = 5; - break; - case "LINE": - case 6: - message.platform = 6; - break; - case "VIBER": - case 7: - message.platform = 7; - break; - case "ACTIONS_ON_GOOGLE": - case 8: - message.platform = 8; - break; - case "TELEPHONY": - case 10: - message.platform = 10; - break; - case "GOOGLE_HANGOUTS": - case 11: - message.platform = 11; - break; - } - return message; - }; + }; - /** - * Creates a plain object from a Message message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message} message Message - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Message.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.platform = options.enums === String ? "PLATFORM_UNSPECIFIED" : 0; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text.toObject(message.text, options); - if (options.oneofs) - object.message = "text"; - } - if (message.image != null && message.hasOwnProperty("image")) { - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - if (options.oneofs) - object.message = "image"; - } - if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { - object.quickReplies = $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.toObject(message.quickReplies, options); - if (options.oneofs) - object.message = "quickReplies"; - } - if (message.card != null && message.hasOwnProperty("card")) { - object.card = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.toObject(message.card, options); - if (options.oneofs) - object.message = "card"; - } - 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.platform != null && message.hasOwnProperty("platform")) - object.platform = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.platform] : message.platform; - if (message.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { - object.simpleResponses = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.toObject(message.simpleResponses, options); - if (options.oneofs) - object.message = "simpleResponses"; - } - if (message.basicCard != null && message.hasOwnProperty("basicCard")) { - object.basicCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.toObject(message.basicCard, options); - if (options.oneofs) - object.message = "basicCard"; - } - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - object.suggestions = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.toObject(message.suggestions, options); - if (options.oneofs) - object.message = "suggestions"; - } - if (message.linkOutSuggestion != null && message.hasOwnProperty("linkOutSuggestion")) { - object.linkOutSuggestion = $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.toObject(message.linkOutSuggestion, options); - if (options.oneofs) - object.message = "linkOutSuggestion"; - } - if (message.listSelect != null && message.hasOwnProperty("listSelect")) { - object.listSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.toObject(message.listSelect, options); - if (options.oneofs) - object.message = "listSelect"; - } - if (message.carouselSelect != null && message.hasOwnProperty("carouselSelect")) { - object.carouselSelect = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.toObject(message.carouselSelect, options); - if (options.oneofs) - object.message = "carouselSelect"; - } - if (message.telephonyPlayAudio != null && message.hasOwnProperty("telephonyPlayAudio")) { - object.telephonyPlayAudio = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.toObject(message.telephonyPlayAudio, options); - if (options.oneofs) - object.message = "telephonyPlayAudio"; - } - if (message.telephonySynthesizeSpeech != null && message.hasOwnProperty("telephonySynthesizeSpeech")) { - object.telephonySynthesizeSpeech = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.toObject(message.telephonySynthesizeSpeech, options); - if (options.oneofs) - object.message = "telephonySynthesizeSpeech"; - } - if (message.telephonyTransferCall != null && message.hasOwnProperty("telephonyTransferCall")) { - object.telephonyTransferCall = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.toObject(message.telephonyTransferCall, options); - if (options.oneofs) - object.message = "telephonyTransferCall"; - } - if (message.rbmText != null && message.hasOwnProperty("rbmText")) { - object.rbmText = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.toObject(message.rbmText, options); - if (options.oneofs) - object.message = "rbmText"; - } - if (message.rbmStandaloneRichCard != null && message.hasOwnProperty("rbmStandaloneRichCard")) { - object.rbmStandaloneRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.toObject(message.rbmStandaloneRichCard, options); - if (options.oneofs) - object.message = "rbmStandaloneRichCard"; - } - if (message.rbmCarouselRichCard != null && message.hasOwnProperty("rbmCarouselRichCard")) { - object.rbmCarouselRichCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.toObject(message.rbmCarouselRichCard, options); - if (options.oneofs) - object.message = "rbmCarouselRichCard"; - } - if (message.browseCarouselCard != null && message.hasOwnProperty("browseCarouselCard")) { - object.browseCarouselCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.toObject(message.browseCarouselCard, options); - if (options.oneofs) - object.message = "browseCarouselCard"; - } - if (message.tableCard != null && message.hasOwnProperty("tableCard")) { - object.tableCard = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.toObject(message.tableCard, options); - if (options.oneofs) - object.message = "tableCard"; - } - if (message.mediaContent != null && message.hasOwnProperty("mediaContent")) { - object.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.toObject(message.mediaContent, options); - if (options.oneofs) - object.message = "mediaContent"; - } - return object; - }; + /** + * Converts this RbmStandaloneCard to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard + * @instance + * @returns {Object.} JSON object + */ + RbmStandaloneCard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Message to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @instance - * @returns {Object.} JSON object - */ - Message.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CardOrientation enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation + * @enum {number} + * @property {number} CARD_ORIENTATION_UNSPECIFIED=0 CARD_ORIENTATION_UNSPECIFIED value + * @property {number} HORIZONTAL=1 HORIZONTAL value + * @property {number} VERTICAL=2 VERTICAL value + */ + RbmStandaloneCard.CardOrientation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CARD_ORIENTATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "HORIZONTAL"] = 1; + values[valuesById[2] = "VERTICAL"] = 2; + return values; + })(); - /** - * Platform enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.Platform - * @enum {number} - * @property {number} PLATFORM_UNSPECIFIED=0 PLATFORM_UNSPECIFIED value - * @property {number} FACEBOOK=1 FACEBOOK value - * @property {number} SLACK=2 SLACK value - * @property {number} TELEGRAM=3 TELEGRAM value - * @property {number} KIK=4 KIK value - * @property {number} SKYPE=5 SKYPE value - * @property {number} LINE=6 LINE value - * @property {number} VIBER=7 VIBER value - * @property {number} ACTIONS_ON_GOOGLE=8 ACTIONS_ON_GOOGLE value - * @property {number} TELEPHONY=10 TELEPHONY value - * @property {number} GOOGLE_HANGOUTS=11 GOOGLE_HANGOUTS value - */ - Message.Platform = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PLATFORM_UNSPECIFIED"] = 0; - values[valuesById[1] = "FACEBOOK"] = 1; - values[valuesById[2] = "SLACK"] = 2; - values[valuesById[3] = "TELEGRAM"] = 3; - values[valuesById[4] = "KIK"] = 4; - values[valuesById[5] = "SKYPE"] = 5; - values[valuesById[6] = "LINE"] = 6; - values[valuesById[7] = "VIBER"] = 7; - values[valuesById[8] = "ACTIONS_ON_GOOGLE"] = 8; - values[valuesById[10] = "TELEPHONY"] = 10; - values[valuesById[11] = "GOOGLE_HANGOUTS"] = 11; - return values; + /** + * ThumbnailImageAlignment enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment + * @enum {number} + * @property {number} THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED=0 THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED value + * @property {number} LEFT=1 LEFT value + * @property {number} RIGHT=2 RIGHT value + */ + RbmStandaloneCard.ThumbnailImageAlignment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEFT"] = 1; + values[valuesById[2] = "RIGHT"] = 2; + return values; + })(); + + return RbmStandaloneCard; })(); - Message.Text = (function() { + Message.RbmCardContent = (function() { /** - * Properties of a Text. + * Properties of a RbmCardContent. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IText - * @property {Array.|null} [text] Text text + * @interface IRbmCardContent + * @property {string|null} [title] RbmCardContent title + * @property {string|null} [description] RbmCardContent description + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null} [media] RbmCardContent media + * @property {Array.|null} [suggestions] RbmCardContent suggestions */ /** - * Constructs a new Text. + * Constructs a new RbmCardContent. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a Text. - * @implements IText + * @classdesc Represents a RbmCardContent. + * @implements IRbmCardContent * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IText=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent=} [properties] Properties to set */ - function Text(properties) { - this.text = []; + function RbmCardContent(properties) { + this.suggestions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106528,202 +107305,550 @@ } /** - * Text text. - * @member {Array.} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * RbmCardContent title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent * @instance */ - Text.prototype.text = $util.emptyArray; + RbmCardContent.prototype.title = ""; /** - * Creates a new Text instance using the specified properties. + * RbmCardContent description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @instance + */ + RbmCardContent.prototype.description = ""; + + /** + * RbmCardContent media. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null|undefined} media + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @instance + */ + RbmCardContent.prototype.media = null; + + /** + * RbmCardContent suggestions. + * @member {Array.} suggestions + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @instance + */ + RbmCardContent.prototype.suggestions = $util.emptyArray; + + /** + * Creates a new RbmCardContent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Text} Text instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent instance */ - Text.create = function create(properties) { - return new Text(properties); + RbmCardContent.create = function create(properties) { + return new RbmCardContent(properties); }; /** - * Encodes the specified Text message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. + * Encodes the specified RbmCardContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent} message RbmCardContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encode = function encode(message, writer) { + RbmCardContent.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.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.media != null && Object.hasOwnProperty.call(message, "media")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.encode(message.media, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.encode(message.suggestions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Text message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Text.verify|verify} messages. + * Encodes the specified RbmCardContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IText} message Text message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent} message RbmCardContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Text.encodeDelimited = function encodeDelimited(message, writer) { + RbmCardContent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Text message from the specified reader or buffer. + * Decodes a RbmCardContent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Text} Text + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent * @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) { + RbmCardContent.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.v2beta1.Intent.Message.Text(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent(); 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()); + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RbmCardContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmCardContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RbmCardContent message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmCardContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.media != null && message.hasOwnProperty("media")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify(message.media); + if (error) + return "media." + error; + } + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify(message.suggestions[i]); + if (error) + return "suggestions." + error; + } + } + return null; + }; + + /** + * Creates a RbmCardContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent + */ + RbmCardContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.media != null) { + if (typeof object.media !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.media: object expected"); + message.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.fromObject(object.media); + } + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.suggestions: object expected"); + message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.fromObject(object.suggestions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RbmCardContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} message RbmCardContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmCardContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestions = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.media = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.media != null && message.hasOwnProperty("media")) + object.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.toObject(message.media, options); + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.toObject(message.suggestions[j], options); + } + return object; + }; + + /** + * Converts this RbmCardContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @instance + * @returns {Object.} JSON object + */ + RbmCardContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + RbmCardContent.RbmMedia = (function() { + + /** + * Properties of a RbmMedia. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @interface IRbmMedia + * @property {string|null} [fileUri] RbmMedia fileUri + * @property {string|null} [thumbnailUri] RbmMedia thumbnailUri + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|null} [height] RbmMedia height + */ + + /** + * Constructs a new RbmMedia. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent + * @classdesc Represents a RbmMedia. + * @implements IRbmMedia + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia=} [properties] Properties to set + */ + function RbmMedia(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]]; + } + + /** + * RbmMedia fileUri. + * @member {string} fileUri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @instance + */ + RbmMedia.prototype.fileUri = ""; + + /** + * RbmMedia thumbnailUri. + * @member {string} thumbnailUri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @instance + */ + RbmMedia.prototype.thumbnailUri = ""; + + /** + * RbmMedia height. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height} height + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @instance + */ + RbmMedia.prototype.height = 0; + + /** + * Creates a new RbmMedia instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia instance + */ + RbmMedia.create = function create(properties) { + return new RbmMedia(properties); + }; + + /** + * Encodes the specified RbmMedia message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia} message RbmMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmMedia.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUri != null && Object.hasOwnProperty.call(message, "fileUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileUri); + if (message.thumbnailUri != null && Object.hasOwnProperty.call(message, "thumbnailUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thumbnailUri); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height); + return writer; + }; + + /** + * Encodes the specified RbmMedia message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia} message RbmMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmMedia.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RbmMedia message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmMedia.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.v2beta1.Intent.Message.RbmCardContent.RbmMedia(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fileUri = reader.string(); + break; + case 2: + message.thumbnailUri = reader.string(); + break; + case 3: + message.height = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RbmMedia message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmMedia.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RbmMedia message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmMedia.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + if (!$util.isString(message.fileUri)) + return "fileUri: string expected"; + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + if (!$util.isString(message.thumbnailUri)) + return "thumbnailUri: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + switch (message.height) { + default: + return "height: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a RbmMedia message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia + */ + RbmMedia.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia(); + if (object.fileUri != null) + message.fileUri = String(object.fileUri); + if (object.thumbnailUri != null) + message.thumbnailUri = String(object.thumbnailUri); + switch (object.height) { + case "HEIGHT_UNSPECIFIED": + case 0: + message.height = 0; + break; + case "SHORT": + case 1: + message.height = 1; break; - default: - reader.skipType(tag & 7); + case "MEDIUM": + case 2: + message.height = 2; + break; + case "TALL": + case 3: + message.height = 3; break; } - } - return message; - }; - - /** - * Decodes a Text message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.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.v2beta1.Intent.Message.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"; - } - return null; - }; + return message; + }; - /** - * Creates a Text message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Text} Text - */ - Text.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text) + /** + * Creates a plain object from a RbmMedia message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} message RbmMedia + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmMedia.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fileUri = ""; + object.thumbnailUri = ""; + object.height = options.enums === String ? "HEIGHT_UNSPECIFIED" : 0; + } + if (message.fileUri != null && message.hasOwnProperty("fileUri")) + object.fileUri = message.fileUri; + if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) + object.thumbnailUri = message.thumbnailUri; + if (message.height != null && message.hasOwnProperty("height")) + object.height = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height[message.height] : message.height; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Text(); - if (object.text) { - if (!Array.isArray(object.text)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Text.text: array expected"); - message.text = []; - for (var i = 0; i < object.text.length; ++i) - message.text[i] = String(object.text[i]); - } - return message; - }; + }; - /** - * Creates a plain object from a Text message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.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 (message.text && message.text.length) { - object.text = []; - for (var j = 0; j < message.text.length; ++j) - object.text[j] = message.text[j]; - } - return object; - }; + /** + * Converts this RbmMedia to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia + * @instance + * @returns {Object.} JSON object + */ + RbmMedia.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Text to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Text - * @instance - * @returns {Object.} JSON object - */ - Text.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Height enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height + * @enum {number} + * @property {number} HEIGHT_UNSPECIFIED=0 HEIGHT_UNSPECIFIED value + * @property {number} SHORT=1 SHORT value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} TALL=3 TALL value + */ + RbmMedia.Height = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEIGHT_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHORT"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "TALL"] = 3; + return values; + })(); - return Text; + return RbmMedia; + })(); + + return RbmCardContent; })(); - Message.Image = (function() { + Message.RbmSuggestion = (function() { /** - * Properties of an Image. + * Properties of a RbmSuggestion. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IImage - * @property {string|null} [imageUri] Image imageUri - * @property {string|null} [accessibilityText] Image accessibilityText + * @interface IRbmSuggestion + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null} [reply] RbmSuggestion reply + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null} [action] RbmSuggestion action */ /** - * Constructs a new Image. + * Constructs a new RbmSuggestion. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents an Image. - * @implements IImage + * @classdesc Represents a RbmSuggestion. + * @implements IRbmSuggestion * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion=} [properties] Properties to set */ - function Image(properties) { + function RbmSuggestion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106731,88 +107856,102 @@ } /** - * Image imageUri. - * @member {string} imageUri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * RbmSuggestion reply. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null|undefined} reply + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @instance */ - Image.prototype.imageUri = ""; + RbmSuggestion.prototype.reply = null; /** - * Image accessibilityText. - * @member {string} accessibilityText - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * RbmSuggestion action. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null|undefined} action + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @instance */ - Image.prototype.accessibilityText = ""; + RbmSuggestion.prototype.action = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new Image instance using the specified properties. + * RbmSuggestion suggestion. + * @member {"reply"|"action"|undefined} suggestion + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion + * @instance + */ + Object.defineProperty(RbmSuggestion.prototype, "suggestion", { + get: $util.oneOfGetter($oneOfFields = ["reply", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RbmSuggestion instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion instance */ - Image.create = function create(properties) { - return new Image(properties); + RbmSuggestion.create = function create(properties) { + return new RbmSuggestion(properties); }; /** - * Encodes the specified Image message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * Encodes the specified RbmSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage} message Image message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion} message RbmSuggestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encode = function encode(message, writer) { + RbmSuggestion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageUri); - if (message.accessibilityText != null && Object.hasOwnProperty.call(message, "accessibilityText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.accessibilityText); + if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.encode(message.reply, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.encode(message.action, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify|verify} messages. + * Encodes the specified RbmSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IImage} message Image message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion} message RbmSuggestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Image.encodeDelimited = function encodeDelimited(message, writer) { + RbmSuggestion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Image message from the specified reader or buffer. + * Decodes a RbmSuggestion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decode = function decode(reader, length) { + RbmSuggestion.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.v2beta1.Intent.Message.Image(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.imageUri = reader.string(); + message.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.decode(reader, reader.uint32()); break; case 2: - message.accessibilityText = reader.string(); + message.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -106823,118 +107962,138 @@ }; /** - * Decodes an Image message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Image.decodeDelimited = function decodeDelimited(reader) { + RbmSuggestion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Image message. + * Verifies a RbmSuggestion message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Image.verify = function verify(message) { + RbmSuggestion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - if (!$util.isString(message.imageUri)) - return "imageUri: string expected"; - if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) - if (!$util.isString(message.accessibilityText)) - return "accessibilityText: string expected"; + var properties = {}; + if (message.reply != null && message.hasOwnProperty("reply")) { + properties.suggestion = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify(message.reply); + if (error) + return "reply." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.suggestion === 1) + return "suggestion: multiple values"; + properties.suggestion = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify(message.action); + if (error) + return "action." + error; + } + } return null; }; /** - * Creates an Image message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Image} Image + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion */ - Image.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image) + RbmSuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image(); - if (object.imageUri != null) - message.imageUri = String(object.imageUri); - if (object.accessibilityText != null) - message.accessibilityText = String(object.accessibilityText); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion(); + if (object.reply != null) { + if (typeof object.reply !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.reply: object expected"); + message.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.fromObject(object.reply); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.action: object expected"); + message.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.fromObject(object.action); + } return message; }; /** - * Creates a plain object from an Image message. Also converts values to other types if specified. + * Creates a plain object from a RbmSuggestion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Image} message Image + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} message RbmSuggestion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Image.toObject = function toObject(message, options) { + RbmSuggestion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.imageUri = ""; - object.accessibilityText = ""; + if (message.reply != null && message.hasOwnProperty("reply")) { + object.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.toObject(message.reply, options); + if (options.oneofs) + object.suggestion = "reply"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.toObject(message.action, options); + if (options.oneofs) + object.suggestion = "action"; } - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - object.imageUri = message.imageUri; - if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) - object.accessibilityText = message.accessibilityText; return object; }; /** - * Converts this Image to JSON. + * Converts this RbmSuggestion to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion * @instance * @returns {Object.} JSON object */ - Image.prototype.toJSON = function toJSON() { + RbmSuggestion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Image; + return RbmSuggestion; })(); - Message.QuickReplies = (function() { + Message.RbmSuggestedReply = (function() { /** - * Properties of a QuickReplies. + * Properties of a RbmSuggestedReply. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IQuickReplies - * @property {string|null} [title] QuickReplies title - * @property {Array.|null} [quickReplies] QuickReplies quickReplies + * @interface IRbmSuggestedReply + * @property {string|null} [text] RbmSuggestedReply text + * @property {string|null} [postbackData] RbmSuggestedReply postbackData */ /** - * Constructs a new QuickReplies. + * Constructs a new RbmSuggestedReply. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a QuickReplies. - * @implements IQuickReplies + * @classdesc Represents a RbmSuggestedReply. + * @implements IRbmSuggestedReply * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply=} [properties] Properties to set */ - function QuickReplies(properties) { - this.quickReplies = []; + function RbmSuggestedReply(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106942,91 +108101,88 @@ } /** - * QuickReplies title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * RbmSuggestedReply text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @instance */ - QuickReplies.prototype.title = ""; + RbmSuggestedReply.prototype.text = ""; /** - * QuickReplies quickReplies. - * @member {Array.} quickReplies - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * RbmSuggestedReply postbackData. + * @member {string} postbackData + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @instance */ - QuickReplies.prototype.quickReplies = $util.emptyArray; + RbmSuggestedReply.prototype.postbackData = ""; /** - * Creates a new QuickReplies instance using the specified properties. + * Creates a new RbmSuggestedReply instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply instance */ - QuickReplies.create = function create(properties) { - return new QuickReplies(properties); + RbmSuggestedReply.create = function create(properties) { + return new RbmSuggestedReply(properties); }; /** - * Encodes the specified QuickReplies message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * Encodes the specified RbmSuggestedReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies} message QuickReplies message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply} message RbmSuggestedReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuickReplies.encode = function encode(message, writer) { + RbmSuggestedReply.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.quickReplies != null && message.quickReplies.length) - for (var i = 0; i < message.quickReplies.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.quickReplies[i]); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.postbackData != null && Object.hasOwnProperty.call(message, "postbackData")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.postbackData); return writer; }; /** - * Encodes the specified QuickReplies message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.verify|verify} messages. + * Encodes the specified RbmSuggestedReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IQuickReplies} message QuickReplies message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply} message RbmSuggestedReply message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuickReplies.encodeDelimited = function encodeDelimited(message, writer) { + RbmSuggestedReply.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QuickReplies message from the specified reader or buffer. + * Decodes a RbmSuggestedReply message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuickReplies.decode = function decode(reader, length) { + RbmSuggestedReply.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.v2beta1.Intent.Message.QuickReplies(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.text = reader.string(); break; case 2: - if (!(message.quickReplies && message.quickReplies.length)) - message.quickReplies = []; - message.quickReplies.push(reader.string()); + message.postbackData = reader.string(); break; default: reader.skipType(tag & 7); @@ -107037,132 +108193,120 @@ }; /** - * Decodes a QuickReplies message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestedReply message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuickReplies.decodeDelimited = function decodeDelimited(reader) { + RbmSuggestedReply.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QuickReplies message. + * Verifies a RbmSuggestedReply message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QuickReplies.verify = function verify(message) { + RbmSuggestedReply.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.quickReplies != null && message.hasOwnProperty("quickReplies")) { - if (!Array.isArray(message.quickReplies)) - return "quickReplies: array expected"; - for (var i = 0; i < message.quickReplies.length; ++i) - if (!$util.isString(message.quickReplies[i])) - return "quickReplies: string[] expected"; - } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.postbackData != null && message.hasOwnProperty("postbackData")) + if (!$util.isString(message.postbackData)) + return "postbackData: string expected"; return null; }; /** - * Creates a QuickReplies message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestedReply message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} QuickReplies + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply */ - QuickReplies.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies) + RbmSuggestedReply.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies(); - if (object.title != null) - message.title = String(object.title); - if (object.quickReplies) { - if (!Array.isArray(object.quickReplies)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.quickReplies: array expected"); - message.quickReplies = []; - for (var i = 0; i < object.quickReplies.length; ++i) - message.quickReplies[i] = String(object.quickReplies[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply(); + if (object.text != null) + message.text = String(object.text); + if (object.postbackData != null) + message.postbackData = String(object.postbackData); return message; }; /** - * Creates a plain object from a QuickReplies message. Also converts values to other types if specified. + * Creates a plain object from a RbmSuggestedReply message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies} message QuickReplies + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} message RbmSuggestedReply * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QuickReplies.toObject = function toObject(message, options) { + RbmSuggestedReply.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.quickReplies = []; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.quickReplies && message.quickReplies.length) { - object.quickReplies = []; - for (var j = 0; j < message.quickReplies.length; ++j) - object.quickReplies[j] = message.quickReplies[j]; + if (options.defaults) { + object.text = ""; + object.postbackData = ""; } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.postbackData != null && message.hasOwnProperty("postbackData")) + object.postbackData = message.postbackData; return object; }; /** - * Converts this QuickReplies to JSON. + * Converts this RbmSuggestedReply to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply * @instance * @returns {Object.} JSON object */ - QuickReplies.prototype.toJSON = function toJSON() { + RbmSuggestedReply.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return QuickReplies; + return RbmSuggestedReply; })(); - Message.Card = (function() { + Message.RbmSuggestedAction = (function() { /** - * Properties of a Card. + * Properties of a RbmSuggestedAction. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ICard - * @property {string|null} [title] Card title - * @property {string|null} [subtitle] Card subtitle - * @property {string|null} [imageUri] Card imageUri - * @property {Array.|null} [buttons] Card buttons + * @interface IRbmSuggestedAction + * @property {string|null} [text] RbmSuggestedAction text + * @property {string|null} [postbackData] RbmSuggestedAction postbackData + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null} [dial] RbmSuggestedAction dial + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null} [openUrl] RbmSuggestedAction openUrl + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null} [shareLocation] RbmSuggestedAction shareLocation */ /** - * Constructs a new Card. + * Constructs a new RbmSuggestedAction. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a Card. - * @implements ICard + * @classdesc Represents a RbmSuggestedAction. + * @implements IRbmSuggestedAction * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction=} [properties] Properties to set */ - function Card(properties) { - this.buttons = []; + function RbmSuggestedAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107170,117 +108314,141 @@ } /** - * Card title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * RbmSuggestedAction text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @instance */ - Card.prototype.title = ""; + RbmSuggestedAction.prototype.text = ""; /** - * Card subtitle. - * @member {string} subtitle - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * RbmSuggestedAction postbackData. + * @member {string} postbackData + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @instance */ - Card.prototype.subtitle = ""; + RbmSuggestedAction.prototype.postbackData = ""; /** - * Card imageUri. - * @member {string} imageUri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * RbmSuggestedAction dial. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null|undefined} dial + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @instance */ - Card.prototype.imageUri = ""; + RbmSuggestedAction.prototype.dial = null; /** - * Card buttons. - * @member {Array.} buttons - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * RbmSuggestedAction openUrl. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null|undefined} openUrl + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @instance */ - Card.prototype.buttons = $util.emptyArray; + RbmSuggestedAction.prototype.openUrl = null; /** - * Creates a new Card instance using the specified properties. + * RbmSuggestedAction shareLocation. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null|undefined} shareLocation + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @instance + */ + RbmSuggestedAction.prototype.shareLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RbmSuggestedAction action. + * @member {"dial"|"openUrl"|"shareLocation"|undefined} action + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @instance + */ + Object.defineProperty(RbmSuggestedAction.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["dial", "openUrl", "shareLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RbmSuggestedAction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction instance */ - Card.create = function create(properties) { - return new Card(properties); + RbmSuggestedAction.create = function create(properties) { + return new RbmSuggestedAction(properties); }; /** - * Encodes the specified Card message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * Encodes the specified RbmSuggestedAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard} message Card message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction} message RbmSuggestedAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Card.encode = function encode(message, writer) { + RbmSuggestedAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); - if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageUri); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.encode(message.buttons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.postbackData != null && Object.hasOwnProperty.call(message, "postbackData")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.postbackData); + if (message.dial != null && Object.hasOwnProperty.call(message, "dial")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.encode(message.dial, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.openUrl != null && Object.hasOwnProperty.call(message, "openUrl")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.encode(message.openUrl, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.shareLocation != null && Object.hasOwnProperty.call(message, "shareLocation")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.encode(message.shareLocation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified Card message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.verify|verify} messages. + * Encodes the specified RbmSuggestedAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICard} message Card message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction} message RbmSuggestedAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Card.encodeDelimited = function encodeDelimited(message, writer) { + RbmSuggestedAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Card message from the specified reader or buffer. + * Decodes a RbmSuggestedAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Card.decode = function decode(reader, length) { + RbmSuggestedAction.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.v2beta1.Intent.Message.Card(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.text = reader.string(); break; case 2: - message.subtitle = reader.string(); + message.postbackData = reader.string(); break; case 3: - message.imageUri = reader.string(); + message.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.decode(reader, reader.uint32()); break; case 4: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.decode(reader, reader.uint32())); + message.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.decode(reader, reader.uint32()); + break; + case 5: + message.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -107291,148 +108459,359 @@ }; /** - * Decodes a Card message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestedAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Card.decodeDelimited = function decodeDelimited(reader) { + RbmSuggestedAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Card message. + * Verifies a RbmSuggestedAction message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Card.verify = function verify(message) { + RbmSuggestedAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - if (!$util.isString(message.subtitle)) - return "subtitle: string expected"; - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - if (!$util.isString(message.imageUri)) - return "imageUri: string expected"; - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify(message.buttons[i]); + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.postbackData != null && message.hasOwnProperty("postbackData")) + if (!$util.isString(message.postbackData)) + return "postbackData: string expected"; + if (message.dial != null && message.hasOwnProperty("dial")) { + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify(message.dial); if (error) - return "buttons." + error; + return "dial." + error; + } + } + if (message.openUrl != null && message.hasOwnProperty("openUrl")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify(message.openUrl); + if (error) + return "openUrl." + error; + } + } + if (message.shareLocation != null && message.hasOwnProperty("shareLocation")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify(message.shareLocation); + if (error) + return "shareLocation." + error; } } return null; }; /** - * Creates a Card message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestedAction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card} Card + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction */ - Card.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card) + RbmSuggestedAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card(); - if (object.title != null) - message.title = String(object.title); - if (object.subtitle != null) - message.subtitle = String(object.subtitle); - if (object.imageUri != null) - message.imageUri = String(object.imageUri); - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Card.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Card.buttons: object expected"); - message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.fromObject(object.buttons[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction(); + if (object.text != null) + message.text = String(object.text); + if (object.postbackData != null) + message.postbackData = String(object.postbackData); + if (object.dial != null) { + if (typeof object.dial !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.dial: object expected"); + message.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.fromObject(object.dial); + } + if (object.openUrl != null) { + if (typeof object.openUrl !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.openUrl: object expected"); + message.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.fromObject(object.openUrl); + } + if (object.shareLocation != null) { + if (typeof object.shareLocation !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.shareLocation: object expected"); + message.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.fromObject(object.shareLocation); } return message; }; /** - * Creates a plain object from a Card message. Also converts values to other types if specified. + * Creates a plain object from a RbmSuggestedAction message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card} message Card + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} message RbmSuggestedAction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Card.toObject = function toObject(message, options) { + RbmSuggestedAction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.buttons = []; if (options.defaults) { - object.title = ""; - object.subtitle = ""; - object.imageUri = ""; + object.text = ""; + object.postbackData = ""; } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - object.subtitle = message.subtitle; - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - object.imageUri = message.imageUri; - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.toObject(message.buttons[j], options); + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.postbackData != null && message.hasOwnProperty("postbackData")) + object.postbackData = message.postbackData; + if (message.dial != null && message.hasOwnProperty("dial")) { + object.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.toObject(message.dial, options); + if (options.oneofs) + object.action = "dial"; + } + if (message.openUrl != null && message.hasOwnProperty("openUrl")) { + object.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.toObject(message.openUrl, options); + if (options.oneofs) + object.action = "openUrl"; + } + if (message.shareLocation != null && message.hasOwnProperty("shareLocation")) { + object.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.toObject(message.shareLocation, options); + if (options.oneofs) + object.action = "shareLocation"; } return object; }; /** - * Converts this Card to JSON. + * Converts this RbmSuggestedAction to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction * @instance * @returns {Object.} JSON object */ - Card.prototype.toJSON = function toJSON() { + RbmSuggestedAction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Card.Button = (function() { + RbmSuggestedAction.RbmSuggestedActionDial = (function() { + + /** + * Properties of a RbmSuggestedActionDial. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @interface IRbmSuggestedActionDial + * @property {string|null} [phoneNumber] RbmSuggestedActionDial phoneNumber + */ + + /** + * Constructs a new RbmSuggestedActionDial. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @classdesc Represents a RbmSuggestedActionDial. + * @implements IRbmSuggestedActionDial + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial=} [properties] Properties to set + */ + function RbmSuggestedActionDial(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]]; + } + + /** + * RbmSuggestedActionDial phoneNumber. + * @member {string} phoneNumber + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @instance + */ + RbmSuggestedActionDial.prototype.phoneNumber = ""; + + /** + * Creates a new RbmSuggestedActionDial instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial instance + */ + RbmSuggestedActionDial.create = function create(properties) { + return new RbmSuggestedActionDial(properties); + }; + + /** + * Encodes the specified RbmSuggestedActionDial message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial} message RbmSuggestedActionDial message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmSuggestedActionDial.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); + return writer; + }; + + /** + * Encodes the specified RbmSuggestedActionDial message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial} message RbmSuggestedActionDial message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmSuggestedActionDial.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RbmSuggestedActionDial message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmSuggestedActionDial.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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.phoneNumber = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RbmSuggestedActionDial message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmSuggestedActionDial.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RbmSuggestedActionDial message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmSuggestedActionDial.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; + return null; + }; + + /** + * Creates a RbmSuggestedActionDial message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial + */ + RbmSuggestedActionDial.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); + return message; + }; + + /** + * Creates a plain object from a RbmSuggestedActionDial message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} message RbmSuggestedActionDial + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmSuggestedActionDial.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.phoneNumber = ""; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = message.phoneNumber; + return object; + }; + + /** + * Converts this RbmSuggestedActionDial to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial + * @instance + * @returns {Object.} JSON object + */ + RbmSuggestedActionDial.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RbmSuggestedActionDial; + })(); + + RbmSuggestedAction.RbmSuggestedActionOpenUri = (function() { /** - * Properties of a Button. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card - * @interface IButton - * @property {string|null} [text] Button text - * @property {string|null} [postback] Button postback + * Properties of a RbmSuggestedActionOpenUri. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @interface IRbmSuggestedActionOpenUri + * @property {string|null} [uri] RbmSuggestedActionOpenUri uri */ /** - * Constructs a new Button. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card - * @classdesc Represents a Button. - * @implements IButton + * Constructs a new RbmSuggestedActionOpenUri. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @classdesc Represents a RbmSuggestedActionOpenUri. + * @implements IRbmSuggestedActionOpenUri * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri=} [properties] Properties to set */ - function Button(properties) { + function RbmSuggestedActionOpenUri(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107440,88 +108819,75 @@ } /** - * Button text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button - * @instance - */ - Button.prototype.text = ""; - - /** - * Button postback. - * @member {string} postback - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * RbmSuggestedActionOpenUri uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @instance */ - Button.prototype.postback = ""; + RbmSuggestedActionOpenUri.prototype.uri = ""; /** - * Creates a new Button instance using the specified properties. + * Creates a new RbmSuggestedActionOpenUri instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri instance */ - Button.create = function create(properties) { - return new Button(properties); + RbmSuggestedActionOpenUri.create = function create(properties) { + return new RbmSuggestedActionOpenUri(properties); }; /** - * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * Encodes the specified RbmSuggestedActionOpenUri message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton} message Button message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encode = function encode(message, writer) { + RbmSuggestedActionOpenUri.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.postback != null && Object.hasOwnProperty.call(message, "postback")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.postback); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.verify|verify} messages. + * Encodes the specified RbmSuggestedActionOpenUri message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.IButton} message Button message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encodeDelimited = function encodeDelimited(message, writer) { + RbmSuggestedActionOpenUri.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Button message from the specified reader or buffer. + * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decode = function decode(reader, length) { + RbmSuggestedActionOpenUri.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.v2beta1.Intent.Message.Card.Button(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.text = reader.string(); - break; - case 2: - message.postback = reader.string(); + message.uri = reader.string(); break; default: reader.skipType(tag & 7); @@ -107532,352 +108898,272 @@ }; /** - * Decodes a Button message from the specified reader or buffer, length delimited. + * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decodeDelimited = function decodeDelimited(reader) { + RbmSuggestedActionOpenUri.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Button message. + * Verifies a RbmSuggestedActionOpenUri message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Button.verify = function verify(message) { + RbmSuggestedActionOpenUri.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.postback != null && message.hasOwnProperty("postback")) - if (!$util.isString(message.postback)) - return "postback: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a Button message from a plain object. Also converts values to their respective internal types. + * Creates a RbmSuggestedActionOpenUri message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri */ - Button.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button) + RbmSuggestedActionOpenUri.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button(); - if (object.text != null) - message.text = String(object.text); - if (object.postback != null) - message.postback = String(object.postback); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a Button message. Also converts values to other types if specified. + * Creates a plain object from a RbmSuggestedActionOpenUri message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button} message Button + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Button.toObject = function toObject(message, options) { + RbmSuggestedActionOpenUri.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.text = ""; - object.postback = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.postback != null && message.hasOwnProperty("postback")) - object.postback = message.postback; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this Button to JSON. + * Converts this RbmSuggestedActionOpenUri to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri * @instance * @returns {Object.} JSON object */ - Button.prototype.toJSON = function toJSON() { + RbmSuggestedActionOpenUri.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Button; + return RbmSuggestedActionOpenUri; })(); - return Card; - })(); - - Message.SimpleResponse = (function() { - - /** - * Properties of a SimpleResponse. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ISimpleResponse - * @property {string|null} [textToSpeech] SimpleResponse textToSpeech - * @property {string|null} [ssml] SimpleResponse ssml - * @property {string|null} [displayText] SimpleResponse displayText - */ - - /** - * Constructs a new SimpleResponse. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a SimpleResponse. - * @implements ISimpleResponse - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse=} [properties] Properties to set - */ - function SimpleResponse(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]]; - } - - /** - * SimpleResponse textToSpeech. - * @member {string} textToSpeech - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @instance - */ - SimpleResponse.prototype.textToSpeech = ""; + RbmSuggestedAction.RbmSuggestedActionShareLocation = (function() { - /** - * SimpleResponse ssml. - * @member {string} ssml - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @instance - */ - SimpleResponse.prototype.ssml = ""; + /** + * Properties of a RbmSuggestedActionShareLocation. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @interface IRbmSuggestedActionShareLocation + */ - /** - * SimpleResponse displayText. - * @member {string} displayText - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @instance - */ - SimpleResponse.prototype.displayText = ""; + /** + * Constructs a new RbmSuggestedActionShareLocation. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction + * @classdesc Represents a RbmSuggestedActionShareLocation. + * @implements IRbmSuggestedActionShareLocation + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation=} [properties] Properties to set + */ + function RbmSuggestedActionShareLocation(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 SimpleResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse instance - */ - SimpleResponse.create = function create(properties) { - return new SimpleResponse(properties); - }; + /** + * Creates a new RbmSuggestedActionShareLocation instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation instance + */ + RbmSuggestedActionShareLocation.create = function create(properties) { + return new RbmSuggestedActionShareLocation(properties); + }; - /** - * Encodes the specified SimpleResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse} message SimpleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.textToSpeech != null && Object.hasOwnProperty.call(message, "textToSpeech")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.textToSpeech); - if (message.ssml != null && Object.hasOwnProperty.call(message, "ssml")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ssml); - if (message.displayText != null && Object.hasOwnProperty.call(message, "displayText")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayText); - return writer; - }; + /** + * Encodes the specified RbmSuggestedActionShareLocation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmSuggestedActionShareLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified SimpleResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponse} message SimpleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified RbmSuggestedActionShareLocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RbmSuggestedActionShareLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SimpleResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleResponse.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.v2beta1.Intent.Message.SimpleResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.textToSpeech = reader.string(); - break; - case 2: - message.ssml = reader.string(); - break; - case 3: - message.displayText = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmSuggestedActionShareLocation.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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a SimpleResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RbmSuggestedActionShareLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SimpleResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimpleResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.textToSpeech != null && message.hasOwnProperty("textToSpeech")) - if (!$util.isString(message.textToSpeech)) - return "textToSpeech: string expected"; - if (message.ssml != null && message.hasOwnProperty("ssml")) - if (!$util.isString(message.ssml)) - return "ssml: string expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) - if (!$util.isString(message.displayText)) - return "displayText: string expected"; - return null; - }; + /** + * Verifies a RbmSuggestedActionShareLocation message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RbmSuggestedActionShareLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a SimpleResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} SimpleResponse - */ - SimpleResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse(); - if (object.textToSpeech != null) - message.textToSpeech = String(object.textToSpeech); - if (object.ssml != null) - message.ssml = String(object.ssml); - if (object.displayText != null) - message.displayText = String(object.displayText); - return message; - }; + /** + * Creates a RbmSuggestedActionShareLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation + */ + RbmSuggestedActionShareLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation) + return object; + return new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation(); + }; - /** - * Creates a plain object from a SimpleResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse} message SimpleResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.textToSpeech = ""; - object.ssml = ""; - object.displayText = ""; - } - if (message.textToSpeech != null && message.hasOwnProperty("textToSpeech")) - object.textToSpeech = message.textToSpeech; - if (message.ssml != null && message.hasOwnProperty("ssml")) - object.ssml = message.ssml; - if (message.displayText != null && message.hasOwnProperty("displayText")) - object.displayText = message.displayText; - return object; - }; + /** + * Creates a plain object from a RbmSuggestedActionShareLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RbmSuggestedActionShareLocation.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RbmSuggestedActionShareLocation to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation + * @instance + * @returns {Object.} JSON object + */ + RbmSuggestedActionShareLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this SimpleResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse - * @instance - * @returns {Object.} JSON object - */ - SimpleResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return RbmSuggestedActionShareLocation; + })(); - return SimpleResponse; + return RbmSuggestedAction; })(); - Message.SimpleResponses = (function() { + Message.MediaContent = (function() { /** - * Properties of a SimpleResponses. + * Properties of a MediaContent. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ISimpleResponses - * @property {Array.|null} [simpleResponses] SimpleResponses simpleResponses + * @interface IMediaContent + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|null} [mediaType] MediaContent mediaType + * @property {Array.|null} [mediaObjects] MediaContent mediaObjects */ /** - * Constructs a new SimpleResponses. + * Constructs a new MediaContent. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a SimpleResponses. - * @implements ISimpleResponses + * @classdesc Represents a MediaContent. + * @implements IMediaContent * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent=} [properties] Properties to set */ - function SimpleResponses(properties) { - this.simpleResponses = []; + function MediaContent(properties) { + this.mediaObjects = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -107885,78 +109171,91 @@ } /** - * SimpleResponses simpleResponses. - * @member {Array.} simpleResponses - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * MediaContent mediaType. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType} mediaType + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @instance */ - SimpleResponses.prototype.simpleResponses = $util.emptyArray; + MediaContent.prototype.mediaType = 0; /** - * Creates a new SimpleResponses instance using the specified properties. + * MediaContent mediaObjects. + * @member {Array.} mediaObjects + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @instance + */ + MediaContent.prototype.mediaObjects = $util.emptyArray; + + /** + * Creates a new MediaContent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent instance */ - SimpleResponses.create = function create(properties) { - return new SimpleResponses(properties); + MediaContent.create = function create(properties) { + return new MediaContent(properties); }; /** - * Encodes the specified SimpleResponses message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * Encodes the specified MediaContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses} message SimpleResponses message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent} message MediaContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimpleResponses.encode = function encode(message, writer) { + MediaContent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.simpleResponses != null && message.simpleResponses.length) - for (var i = 0; i < message.simpleResponses.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.encode(message.simpleResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mediaType); + if (message.mediaObjects != null && message.mediaObjects.length) + for (var i = 0; i < message.mediaObjects.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.encode(message.mediaObjects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SimpleResponses message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.verify|verify} messages. + * Encodes the specified MediaContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISimpleResponses} message SimpleResponses message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent} message MediaContent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimpleResponses.encodeDelimited = function encodeDelimited(message, writer) { + MediaContent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SimpleResponses message from the specified reader or buffer. + * Decodes a MediaContent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimpleResponses.decode = function decode(reader, length) { + MediaContent.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.v2beta1.Intent.Message.SimpleResponses(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.simpleResponses && message.simpleResponses.length)) - message.simpleResponses = []; - message.simpleResponses.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.decode(reader, reader.uint32())); + message.mediaType = reader.int32(); + break; + case 2: + if (!(message.mediaObjects && message.mediaObjects.length)) + message.mediaObjects = []; + message.mediaObjects.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -107967,129 +109266,475 @@ }; /** - * Decodes a SimpleResponses message from the specified reader or buffer, length delimited. + * Decodes a MediaContent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimpleResponses.decodeDelimited = function decodeDelimited(reader) { + MediaContent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SimpleResponses message. + * Verifies a MediaContent message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SimpleResponses.verify = function verify(message) { + MediaContent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { - if (!Array.isArray(message.simpleResponses)) - return "simpleResponses: array expected"; - for (var i = 0; i < message.simpleResponses.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.verify(message.simpleResponses[i]); + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + switch (message.mediaType) { + default: + return "mediaType: enum value expected"; + case 0: + case 1: + break; + } + if (message.mediaObjects != null && message.hasOwnProperty("mediaObjects")) { + if (!Array.isArray(message.mediaObjects)) + return "mediaObjects: array expected"; + for (var i = 0; i < message.mediaObjects.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify(message.mediaObjects[i]); if (error) - return "simpleResponses." + error; + return "mediaObjects." + error; + } + } + return null; + }; + + /** + * Creates a MediaContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent + */ + MediaContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent(); + switch (object.mediaType) { + case "RESPONSE_MEDIA_TYPE_UNSPECIFIED": + case 0: + message.mediaType = 0; + break; + case "AUDIO": + case 1: + message.mediaType = 1; + break; + } + if (object.mediaObjects) { + if (!Array.isArray(object.mediaObjects)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.mediaObjects: array expected"); + message.mediaObjects = []; + for (var i = 0; i < object.mediaObjects.length; ++i) { + if (typeof object.mediaObjects[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.mediaObjects: object expected"); + message.mediaObjects[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.fromObject(object.mediaObjects[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MediaContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} message MediaContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mediaObjects = []; + if (options.defaults) + object.mediaType = options.enums === String ? "RESPONSE_MEDIA_TYPE_UNSPECIFIED" : 0; + if (message.mediaType != null && message.hasOwnProperty("mediaType")) + object.mediaType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType[message.mediaType] : message.mediaType; + if (message.mediaObjects && message.mediaObjects.length) { + object.mediaObjects = []; + for (var j = 0; j < message.mediaObjects.length; ++j) + object.mediaObjects[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.toObject(message.mediaObjects[j], options); + } + return object; + }; + + /** + * Converts this MediaContent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @instance + * @returns {Object.} JSON object + */ + MediaContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ResponseMediaType enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType + * @enum {number} + * @property {number} RESPONSE_MEDIA_TYPE_UNSPECIFIED=0 RESPONSE_MEDIA_TYPE_UNSPECIFIED value + * @property {number} AUDIO=1 AUDIO value + */ + MediaContent.ResponseMediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESPONSE_MEDIA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO"] = 1; + return values; + })(); + + MediaContent.ResponseMediaObject = (function() { + + /** + * Properties of a ResponseMediaObject. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @interface IResponseMediaObject + * @property {string|null} [name] ResponseMediaObject name + * @property {string|null} [description] ResponseMediaObject description + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [largeImage] ResponseMediaObject largeImage + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [icon] ResponseMediaObject icon + * @property {string|null} [contentUrl] ResponseMediaObject contentUrl + */ + + /** + * Constructs a new ResponseMediaObject. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent + * @classdesc Represents a ResponseMediaObject. + * @implements IResponseMediaObject + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject=} [properties] Properties to set + */ + function ResponseMediaObject(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]]; + } + + /** + * ResponseMediaObject name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + ResponseMediaObject.prototype.name = ""; + + /** + * ResponseMediaObject description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + ResponseMediaObject.prototype.description = ""; + + /** + * ResponseMediaObject largeImage. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} largeImage + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + ResponseMediaObject.prototype.largeImage = null; + + /** + * ResponseMediaObject icon. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} icon + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + ResponseMediaObject.prototype.icon = null; + + /** + * ResponseMediaObject contentUrl. + * @member {string} contentUrl + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + ResponseMediaObject.prototype.contentUrl = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseMediaObject image. + * @member {"largeImage"|"icon"|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + */ + Object.defineProperty(ResponseMediaObject.prototype, "image", { + get: $util.oneOfGetter($oneOfFields = ["largeImage", "icon"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMediaObject instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject instance + */ + ResponseMediaObject.create = function create(properties) { + return new ResponseMediaObject(properties); + }; + + /** + * Encodes the specified ResponseMediaObject message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject} message ResponseMediaObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMediaObject.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.largeImage != null && Object.hasOwnProperty.call(message, "largeImage")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.largeImage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.icon != null && Object.hasOwnProperty.call(message, "icon")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.icon, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.contentUrl != null && Object.hasOwnProperty.call(message, "contentUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.contentUrl); + return writer; + }; + + /** + * Encodes the specified ResponseMediaObject message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject} message ResponseMediaObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMediaObject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseMediaObject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMediaObject.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.v2beta1.Intent.Message.MediaContent.ResponseMediaObject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 4: + message.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 5: + message.contentUrl = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseMediaObject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMediaObject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseMediaObject message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMediaObject.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.largeImage != null && message.hasOwnProperty("largeImage")) { + properties.image = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.largeImage); + if (error) + return "largeImage." + error; + } + } + if (message.icon != null && message.hasOwnProperty("icon")) { + if (properties.image === 1) + return "image: multiple values"; + properties.image = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.icon); + if (error) + return "icon." + error; + } + } + if (message.contentUrl != null && message.hasOwnProperty("contentUrl")) + if (!$util.isString(message.contentUrl)) + return "contentUrl: string expected"; + return null; + }; + + /** + * Creates a ResponseMediaObject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject + */ + ResponseMediaObject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.largeImage != null) { + if (typeof object.largeImage !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.largeImage: object expected"); + message.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.largeImage); + } + if (object.icon != null) { + if (typeof object.icon !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.icon: object expected"); + message.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.icon); + } + if (object.contentUrl != null) + message.contentUrl = String(object.contentUrl); + return message; + }; + + /** + * Creates a plain object from a ResponseMediaObject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} message ResponseMediaObject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMediaObject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.contentUrl = ""; } - } - return null; - }; - - /** - * Creates a SimpleResponses message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} SimpleResponses - */ - SimpleResponses.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses(); - if (object.simpleResponses) { - if (!Array.isArray(object.simpleResponses)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.simpleResponses: array expected"); - message.simpleResponses = []; - for (var i = 0; i < object.simpleResponses.length; ++i) { - if (typeof object.simpleResponses[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses.simpleResponses: object expected"); - message.simpleResponses[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.fromObject(object.simpleResponses[i]); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.largeImage != null && message.hasOwnProperty("largeImage")) { + object.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.largeImage, options); + if (options.oneofs) + object.image = "largeImage"; } - } - return message; - }; + if (message.icon != null && message.hasOwnProperty("icon")) { + object.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.icon, options); + if (options.oneofs) + object.image = "icon"; + } + if (message.contentUrl != null && message.hasOwnProperty("contentUrl")) + object.contentUrl = message.contentUrl; + return object; + }; - /** - * Creates a plain object from a SimpleResponses message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses} message SimpleResponses - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleResponses.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.simpleResponses = []; - if (message.simpleResponses && message.simpleResponses.length) { - object.simpleResponses = []; - for (var j = 0; j < message.simpleResponses.length; ++j) - object.simpleResponses[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.toObject(message.simpleResponses[j], options); - } - return object; - }; + /** + * Converts this ResponseMediaObject to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject + * @instance + * @returns {Object.} JSON object + */ + ResponseMediaObject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this SimpleResponses to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses - * @instance - * @returns {Object.} JSON object - */ - SimpleResponses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ResponseMediaObject; + })(); - return SimpleResponses; + return MediaContent; })(); - Message.BasicCard = (function() { + Message.BrowseCarouselCard = (function() { /** - * Properties of a BasicCard. + * Properties of a BrowseCarouselCard. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IBasicCard - * @property {string|null} [title] BasicCard title - * @property {string|null} [subtitle] BasicCard subtitle - * @property {string|null} [formattedText] BasicCard formattedText - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] BasicCard image - * @property {Array.|null} [buttons] BasicCard buttons + * @interface IBrowseCarouselCard + * @property {Array.|null} [items] BrowseCarouselCard items + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|null} [imageDisplayOptions] BrowseCarouselCard imageDisplayOptions */ /** - * Constructs a new BasicCard. + * Constructs a new BrowseCarouselCard. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a BasicCard. - * @implements IBasicCard + * @classdesc Represents a BrowseCarouselCard. + * @implements IBrowseCarouselCard * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard=} [properties] Properties to set */ - function BasicCard(properties) { - this.buttons = []; + function BrowseCarouselCard(properties) { + this.items = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108097,130 +109742,91 @@ } /** - * BasicCard title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard - * @instance - */ - BasicCard.prototype.title = ""; - - /** - * BasicCard subtitle. - * @member {string} subtitle - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard - * @instance - */ - BasicCard.prototype.subtitle = ""; - - /** - * BasicCard formattedText. - * @member {string} formattedText - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard - * @instance - */ - BasicCard.prototype.formattedText = ""; - - /** - * BasicCard image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * BrowseCarouselCard items. + * @member {Array.} items + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @instance */ - BasicCard.prototype.image = null; + BrowseCarouselCard.prototype.items = $util.emptyArray; /** - * BasicCard buttons. - * @member {Array.} buttons - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * BrowseCarouselCard imageDisplayOptions. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions} imageDisplayOptions + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @instance */ - BasicCard.prototype.buttons = $util.emptyArray; + BrowseCarouselCard.prototype.imageDisplayOptions = 0; /** - * Creates a new BasicCard instance using the specified properties. + * Creates a new BrowseCarouselCard instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard instance */ - BasicCard.create = function create(properties) { - return new BasicCard(properties); + BrowseCarouselCard.create = function create(properties) { + return new BrowseCarouselCard(properties); }; /** - * Encodes the specified BasicCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * Encodes the specified BrowseCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard} message BasicCard message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard} message BrowseCarouselCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BasicCard.encode = function encode(message, writer) { + BrowseCarouselCard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); - if (message.formattedText != null && Object.hasOwnProperty.call(message, "formattedText")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.formattedText); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.encode(message.buttons[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageDisplayOptions != null && Object.hasOwnProperty.call(message, "imageDisplayOptions")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.imageDisplayOptions); return writer; }; /** - * Encodes the specified BasicCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.verify|verify} messages. + * Encodes the specified BrowseCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBasicCard} message BasicCard message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard} message BrowseCarouselCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BasicCard.encodeDelimited = function encodeDelimited(message, writer) { + BrowseCarouselCard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BasicCard message from the specified reader or buffer. + * Decodes a BrowseCarouselCard message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BasicCard.decode = function decode(reader, length) { + BrowseCarouselCard.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.v2beta1.Intent.Message.BasicCard(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.decode(reader, reader.uint32())); break; case 2: - message.subtitle = reader.string(); - break; - case 3: - message.formattedText = reader.string(); - break; - case 4: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.decode(reader, reader.uint32())); + message.imageDisplayOptions = reader.int32(); break; default: reader.skipType(tag & 7); @@ -108231,161 +109837,162 @@ }; /** - * Decodes a BasicCard message from the specified reader or buffer, length delimited. + * Decodes a BrowseCarouselCard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BasicCard.decodeDelimited = function decodeDelimited(reader) { + BrowseCarouselCard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BasicCard message. + * Verifies a BrowseCarouselCard message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BasicCard.verify = function verify(message) { + BrowseCarouselCard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - if (!$util.isString(message.subtitle)) - return "subtitle: string expected"; - if (message.formattedText != null && message.hasOwnProperty("formattedText")) - if (!$util.isString(message.formattedText)) - return "formattedText: string expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify(message.buttons[i]); + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify(message.items[i]); if (error) - return "buttons." + error; + return "items." + error; } } + if (message.imageDisplayOptions != null && message.hasOwnProperty("imageDisplayOptions")) + switch (message.imageDisplayOptions) { + default: + return "imageDisplayOptions: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a BasicCard message from a plain object. Also converts values to their respective internal types. + * Creates a BrowseCarouselCard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} BasicCard + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard */ - BasicCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard) + BrowseCarouselCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard(); - if (object.title != null) - message.title = String(object.title); - if (object.subtitle != null) - message.subtitle = String(object.subtitle); - if (object.formattedText != null) - message.formattedText = String(object.formattedText); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.buttons: object expected"); - message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.fromObject(object.buttons[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items: object expected"); + message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.fromObject(object.items[i]); } } + switch (object.imageDisplayOptions) { + case "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED": + case 0: + message.imageDisplayOptions = 0; + break; + case "GRAY": + case 1: + message.imageDisplayOptions = 1; + break; + case "WHITE": + case 2: + message.imageDisplayOptions = 2; + break; + case "CROPPED": + case 3: + message.imageDisplayOptions = 3; + break; + case "BLURRED_BACKGROUND": + case 4: + message.imageDisplayOptions = 4; + break; + } return message; }; /** - * Creates a plain object from a BasicCard message. Also converts values to other types if specified. + * Creates a plain object from a BrowseCarouselCard message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard} message BasicCard + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} message BrowseCarouselCard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BasicCard.toObject = function toObject(message, options) { + BrowseCarouselCard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.buttons = []; - if (options.defaults) { - object.title = ""; - object.subtitle = ""; - object.formattedText = ""; - object.image = null; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - object.subtitle = message.subtitle; - if (message.formattedText != null && message.hasOwnProperty("formattedText")) - object.formattedText = message.formattedText; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.toObject(message.buttons[j], options); + object.items = []; + if (options.defaults) + object.imageDisplayOptions = options.enums === String ? "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" : 0; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.toObject(message.items[j], options); } + if (message.imageDisplayOptions != null && message.hasOwnProperty("imageDisplayOptions")) + object.imageDisplayOptions = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] : message.imageDisplayOptions; return object; }; /** - * Converts this BasicCard to JSON. + * Converts this BrowseCarouselCard to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard * @instance * @returns {Object.} JSON object */ - BasicCard.prototype.toJSON = function toJSON() { + BrowseCarouselCard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - BasicCard.Button = (function() { + BrowseCarouselCard.BrowseCarouselCardItem = (function() { /** - * Properties of a Button. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard - * @interface IButton - * @property {string|null} [title] Button title - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null} [openUriAction] Button openUriAction + * Properties of a BrowseCarouselCardItem. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard + * @interface IBrowseCarouselCardItem + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null} [openUriAction] BrowseCarouselCardItem openUriAction + * @property {string|null} [title] BrowseCarouselCardItem title + * @property {string|null} [description] BrowseCarouselCardItem description + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] BrowseCarouselCardItem image + * @property {string|null} [footer] BrowseCarouselCardItem footer */ /** - * Constructs a new Button. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard - * @classdesc Represents a Button. - * @implements IButton + * Constructs a new BrowseCarouselCardItem. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard + * @classdesc Represents a BrowseCarouselCardItem. + * @implements IBrowseCarouselCardItem * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem=} [properties] Properties to set */ - function Button(properties) { + function BrowseCarouselCardItem(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108393,88 +110000,127 @@ } /** - * Button title. + * BrowseCarouselCardItem openUriAction. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null|undefined} openUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + * @instance + */ + BrowseCarouselCardItem.prototype.openUriAction = null; + + /** + * BrowseCarouselCardItem title. * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @instance */ - Button.prototype.title = ""; + BrowseCarouselCardItem.prototype.title = ""; /** - * Button openUriAction. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction|null|undefined} openUriAction - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * BrowseCarouselCardItem description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @instance */ - Button.prototype.openUriAction = null; + BrowseCarouselCardItem.prototype.description = ""; /** - * Creates a new Button instance using the specified properties. + * BrowseCarouselCardItem image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + * @instance + */ + BrowseCarouselCardItem.prototype.image = null; + + /** + * BrowseCarouselCardItem footer. + * @member {string} footer + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + * @instance + */ + BrowseCarouselCardItem.prototype.footer = ""; + + /** + * Creates a new BrowseCarouselCardItem instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem instance */ - Button.create = function create(properties) { - return new Button(properties); + BrowseCarouselCardItem.create = function create(properties) { + return new BrowseCarouselCardItem(properties); }; /** - * Encodes the specified Button message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * Encodes the specified BrowseCarouselCardItem message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton} message Button message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem} message BrowseCarouselCardItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encode = function encode(message, writer) { + BrowseCarouselCardItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); if (message.openUriAction != null && Object.hasOwnProperty.call(message, "openUriAction")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.encode(message.openUriAction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.encode(message.openUriAction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.footer); return writer; }; /** - * Encodes the specified Button message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify|verify} messages. + * Encodes the specified BrowseCarouselCardItem message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.IButton} message Button message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem} message BrowseCarouselCardItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Button.encodeDelimited = function encodeDelimited(message, writer) { + BrowseCarouselCardItem.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Button message from the specified reader or buffer. + * Decodes a BrowseCarouselCardItem message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decode = function decode(reader, length) { + BrowseCarouselCardItem.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.v2beta1.Intent.Message.BasicCard.Button(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.title = reader.string(); + message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.decode(reader, reader.uint32()); break; case 2: - message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.decode(reader, reader.uint32()); + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 5: + message.footer = reader.string(); break; default: reader.skipType(tag & 7); @@ -108485,118 +110131,148 @@ }; /** - * Decodes a Button message from the specified reader or buffer, length delimited. + * Decodes a BrowseCarouselCardItem message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Button.decodeDelimited = function decodeDelimited(reader) { + BrowseCarouselCardItem.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Button message. + * Verifies a BrowseCarouselCardItem message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Button.verify = function verify(message) { + BrowseCarouselCardItem.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify(message.openUriAction); + if (error) + return "openUriAction." + error; + } if (message.title != null && message.hasOwnProperty("title")) if (!$util.isString(message.title)) return "title: string expected"; - if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify(message.openUriAction); + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); if (error) - return "openUriAction." + error; + return "image." + error; } + if (message.footer != null && message.hasOwnProperty("footer")) + if (!$util.isString(message.footer)) + return "footer: string expected"; return null; }; /** - * Creates a Button message from a plain object. Also converts values to their respective internal types. + * Creates a BrowseCarouselCardItem message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} Button + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem */ - Button.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button) + BrowseCarouselCardItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button(); - if (object.title != null) - message.title = String(object.title); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem(); if (object.openUriAction != null) { if (typeof object.openUriAction !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.openUriAction: object expected"); - message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.fromObject(object.openUriAction); + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.openUriAction: object expected"); + message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.fromObject(object.openUriAction); } + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + if (object.footer != null) + message.footer = String(object.footer); return message; }; /** - * Creates a plain object from a Button message. Also converts values to other types if specified. + * Creates a plain object from a BrowseCarouselCardItem message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button} message Button + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} message BrowseCarouselCardItem * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Button.toObject = function toObject(message, options) { + BrowseCarouselCardItem.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.title = ""; object.openUriAction = null; + object.title = ""; + object.description = ""; + object.image = null; + object.footer = ""; } + if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) + object.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.toObject(message.openUriAction, options); if (message.title != null && message.hasOwnProperty("title")) object.title = message.title; - if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) - object.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.toObject(message.openUriAction, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + if (message.footer != null && message.hasOwnProperty("footer")) + object.footer = message.footer; return object; }; /** - * Converts this Button to JSON. + * Converts this BrowseCarouselCardItem to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem * @instance * @returns {Object.} JSON object */ - Button.prototype.toJSON = function toJSON() { + BrowseCarouselCardItem.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - Button.OpenUriAction = (function() { + BrowseCarouselCardItem.OpenUrlAction = (function() { /** - * Properties of an OpenUriAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button - * @interface IOpenUriAction - * @property {string|null} [uri] OpenUriAction uri + * Properties of an OpenUrlAction. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + * @interface IOpenUrlAction + * @property {string|null} [url] OpenUrlAction url + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|null} [urlTypeHint] OpenUrlAction urlTypeHint */ /** - * Constructs a new OpenUriAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button - * @classdesc Represents an OpenUriAction. - * @implements IOpenUriAction + * Constructs a new OpenUrlAction. + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem + * @classdesc Represents an OpenUrlAction. + * @implements IOpenUrlAction * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction=} [properties] Properties to set */ - function OpenUriAction(properties) { + function OpenUrlAction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -108604,75 +110280,88 @@ } /** - * OpenUriAction uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * OpenUrlAction url. + * @member {string} url + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @instance */ - OpenUriAction.prototype.uri = ""; + OpenUrlAction.prototype.url = ""; /** - * Creates a new OpenUriAction instance using the specified properties. + * OpenUrlAction urlTypeHint. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint} urlTypeHint + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction + * @instance + */ + OpenUrlAction.prototype.urlTypeHint = 0; + + /** + * Creates a new OpenUrlAction instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction instance */ - OpenUriAction.create = function create(properties) { - return new OpenUriAction(properties); + OpenUrlAction.create = function create(properties) { + return new OpenUrlAction(properties); }; /** - * Encodes the specified OpenUriAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * Encodes the specified OpenUrlAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction} message OpenUriAction message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction} message OpenUrlAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OpenUriAction.encode = function encode(message, writer) { + OpenUrlAction.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.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.urlTypeHint != null && Object.hasOwnProperty.call(message, "urlTypeHint")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.urlTypeHint); return writer; }; /** - * Encodes the specified OpenUriAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction.verify|verify} messages. + * Encodes the specified OpenUrlAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.IOpenUriAction} message OpenUriAction message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction} message OpenUrlAction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OpenUriAction.encodeDelimited = function encodeDelimited(message, writer) { + OpenUrlAction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OpenUriAction message from the specified reader or buffer. + * Decodes an OpenUrlAction message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OpenUriAction.decode = function decode(reader, length) { + OpenUrlAction.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.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.uri = reader.string(); + message.url = reader.string(); + break; + case 3: + message.urlTypeHint = reader.int32(); break; default: reader.skipType(tag & 7); @@ -108683,509 +110372,184 @@ }; /** - * Decodes an OpenUriAction message from the specified reader or buffer, length delimited. + * Decodes an OpenUrlAction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OpenUriAction.decodeDelimited = function decodeDelimited(reader) { + OpenUrlAction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OpenUriAction message. + * Verifies an OpenUrlAction message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OpenUriAction.verify = function verify(message) { + OpenUrlAction.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"; - return null; - }; - - /** - * Creates an OpenUriAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} OpenUriAction - */ - OpenUriAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an OpenUriAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction} message OpenUriAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OpenUriAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this OpenUriAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction - * @instance - * @returns {Object.} JSON object - */ - OpenUriAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OpenUriAction; - })(); - - return Button; - })(); - - return BasicCard; - })(); - - Message.Suggestion = (function() { - - /** - * Properties of a Suggestion. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ISuggestion - * @property {string|null} [title] Suggestion title - */ - - /** - * Constructs a new Suggestion. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a Suggestion. - * @implements ISuggestion - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion=} [properties] Properties to set - */ - function Suggestion(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]]; - } - - /** - * Suggestion title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @instance - */ - Suggestion.prototype.title = ""; - - /** - * Creates a new Suggestion instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion instance - */ - Suggestion.create = function create(properties) { - return new Suggestion(properties); - }; - - /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - return writer; - }; - - /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Suggestion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.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.v2beta1.Intent.Message.Suggestion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Suggestion message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Suggestion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - return null; - }; - - /** - * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} Suggestion - */ - Suggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion(); - if (object.title != null) - message.title = String(object.title); - return message; - }; - - /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion} message Suggestion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Suggestion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - return object; - }; - - /** - * Converts this Suggestion to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion - * @instance - * @returns {Object.} JSON object - */ - Suggestion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Suggestion; - })(); - - Message.Suggestions = (function() { - - /** - * Properties of a Suggestions. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ISuggestions - * @property {Array.|null} [suggestions] Suggestions suggestions - */ - - /** - * Constructs a new Suggestions. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a Suggestions. - * @implements ISuggestions - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions=} [properties] Properties to set - */ - function Suggestions(properties) { - this.suggestions = []; - 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]]; - } - - /** - * Suggestions suggestions. - * @member {Array.} suggestions - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @instance - */ - Suggestions.prototype.suggestions = $util.emptyArray; - - /** - * Creates a new Suggestions instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions instance - */ - Suggestions.create = function create(properties) { - return new Suggestions(properties); - }; - - /** - * Encodes the specified Suggestions message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions} message Suggestions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.suggestions != null && message.suggestions.length) - for (var i = 0; i < message.suggestions.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.urlTypeHint != null && message.hasOwnProperty("urlTypeHint")) + switch (message.urlTypeHint) { + default: + return "urlTypeHint: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Encodes the specified Suggestions message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISuggestions} message Suggestions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an OpenUrlAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction + */ + OpenUrlAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction(); + if (object.url != null) + message.url = String(object.url); + switch (object.urlTypeHint) { + case "URL_TYPE_HINT_UNSPECIFIED": + case 0: + message.urlTypeHint = 0; + break; + case "AMP_ACTION": + case 1: + message.urlTypeHint = 1; + break; + case "AMP_CONTENT": + case 2: + message.urlTypeHint = 2; + break; + } + return message; + }; - /** - * Decodes a Suggestions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestions.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.v2beta1.Intent.Message.Suggestions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.suggestions && message.suggestions.length)) - message.suggestions = []; - message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an OpenUrlAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} message OpenUrlAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpenUrlAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.urlTypeHint = options.enums === String ? "URL_TYPE_HINT_UNSPECIFIED" : 0; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.urlTypeHint != null && message.hasOwnProperty("urlTypeHint")) + object.urlTypeHint = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] : message.urlTypeHint; + return object; + }; - /** - * Decodes a Suggestions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this OpenUrlAction to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction + * @instance + * @returns {Object.} JSON object + */ + OpenUrlAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a Suggestions message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Suggestions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (!Array.isArray(message.suggestions)) - return "suggestions: array expected"; - for (var i = 0; i < message.suggestions.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.verify(message.suggestions[i]); - if (error) - return "suggestions." + error; - } - } - return null; - }; + /** + * UrlTypeHint enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint + * @enum {number} + * @property {number} URL_TYPE_HINT_UNSPECIFIED=0 URL_TYPE_HINT_UNSPECIFIED value + * @property {number} AMP_ACTION=1 AMP_ACTION value + * @property {number} AMP_CONTENT=2 AMP_CONTENT value + */ + OpenUrlAction.UrlTypeHint = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "URL_TYPE_HINT_UNSPECIFIED"] = 0; + values[valuesById[1] = "AMP_ACTION"] = 1; + values[valuesById[2] = "AMP_CONTENT"] = 2; + return values; + })(); - /** - * Creates a Suggestions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} Suggestions - */ - Suggestions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions(); - if (object.suggestions) { - if (!Array.isArray(object.suggestions)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.suggestions: array expected"); - message.suggestions = []; - for (var i = 0; i < object.suggestions.length; ++i) { - if (typeof object.suggestions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions.suggestions: object expected"); - message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.fromObject(object.suggestions[i]); - } - } - return message; - }; + return OpenUrlAction; + })(); - /** - * Creates a plain object from a Suggestions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions} message Suggestions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Suggestions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.suggestions = []; - if (message.suggestions && message.suggestions.length) { - object.suggestions = []; - for (var j = 0; j < message.suggestions.length; ++j) - object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion.toObject(message.suggestions[j], options); - } - return object; - }; + return BrowseCarouselCardItem; + })(); /** - * Converts this Suggestions to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions - * @instance - * @returns {Object.} JSON object + * ImageDisplayOptions enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions + * @enum {number} + * @property {number} IMAGE_DISPLAY_OPTIONS_UNSPECIFIED=0 IMAGE_DISPLAY_OPTIONS_UNSPECIFIED value + * @property {number} GRAY=1 GRAY value + * @property {number} WHITE=2 WHITE value + * @property {number} CROPPED=3 CROPPED value + * @property {number} BLURRED_BACKGROUND=4 BLURRED_BACKGROUND value */ - Suggestions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + BrowseCarouselCard.ImageDisplayOptions = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED"] = 0; + values[valuesById[1] = "GRAY"] = 1; + values[valuesById[2] = "WHITE"] = 2; + values[valuesById[3] = "CROPPED"] = 3; + values[valuesById[4] = "BLURRED_BACKGROUND"] = 4; + return values; + })(); - return Suggestions; + return BrowseCarouselCard; })(); - Message.LinkOutSuggestion = (function() { + Message.TableCard = (function() { /** - * Properties of a LinkOutSuggestion. + * Properties of a TableCard. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ILinkOutSuggestion - * @property {string|null} [destinationName] LinkOutSuggestion destinationName - * @property {string|null} [uri] LinkOutSuggestion uri + * @interface ITableCard + * @property {string|null} [title] TableCard title + * @property {string|null} [subtitle] TableCard subtitle + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] TableCard image + * @property {Array.|null} [columnProperties] TableCard columnProperties + * @property {Array.|null} [rows] TableCard rows + * @property {Array.|null} [buttons] TableCard buttons */ /** - * Constructs a new LinkOutSuggestion. + * Constructs a new TableCard. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a LinkOutSuggestion. - * @implements ILinkOutSuggestion + * @classdesc Represents a TableCard. + * @implements ITableCard * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard=} [properties] Properties to set */ - function LinkOutSuggestion(properties) { + function TableCard(properties) { + this.columnProperties = []; + this.rows = []; + this.buttons = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109193,303 +110557,123 @@ } /** - * LinkOutSuggestion destinationName. - * @member {string} destinationName - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * TableCard title. + * @member {string} title + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance */ - LinkOutSuggestion.prototype.destinationName = ""; + TableCard.prototype.title = ""; /** - * LinkOutSuggestion uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * TableCard subtitle. + * @member {string} subtitle + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance */ - LinkOutSuggestion.prototype.uri = ""; - - /** - * Creates a new LinkOutSuggestion instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion instance - */ - LinkOutSuggestion.create = function create(properties) { - return new LinkOutSuggestion(properties); - }; - - /** - * Encodes the specified LinkOutSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion} message LinkOutSuggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinkOutSuggestion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.destinationName != null && Object.hasOwnProperty.call(message, "destinationName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - return writer; - }; - - /** - * Encodes the specified LinkOutSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ILinkOutSuggestion} message LinkOutSuggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LinkOutSuggestion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LinkOutSuggestion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinkOutSuggestion.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.v2beta1.Intent.Message.LinkOutSuggestion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.destinationName = reader.string(); - break; - case 2: - message.uri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LinkOutSuggestion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LinkOutSuggestion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LinkOutSuggestion message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LinkOutSuggestion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.destinationName != null && message.hasOwnProperty("destinationName")) - if (!$util.isString(message.destinationName)) - return "destinationName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a LinkOutSuggestion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} LinkOutSuggestion - */ - LinkOutSuggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion(); - if (object.destinationName != null) - message.destinationName = String(object.destinationName); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a LinkOutSuggestion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion} message LinkOutSuggestion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LinkOutSuggestion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.destinationName = ""; - object.uri = ""; - } - if (message.destinationName != null && message.hasOwnProperty("destinationName")) - object.destinationName = message.destinationName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; + TableCard.prototype.subtitle = ""; /** - * Converts this LinkOutSuggestion to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion + * TableCard image. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance - * @returns {Object.} JSON object - */ - LinkOutSuggestion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LinkOutSuggestion; - })(); - - Message.ListSelect = (function() { - - /** - * Properties of a ListSelect. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IListSelect - * @property {string|null} [title] ListSelect title - * @property {Array.|null} [items] ListSelect items - * @property {string|null} [subtitle] ListSelect subtitle - */ - - /** - * Constructs a new ListSelect. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a ListSelect. - * @implements IListSelect - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect=} [properties] Properties to set */ - function ListSelect(properties) { - this.items = []; - 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]]; - } + TableCard.prototype.image = null; /** - * ListSelect title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * TableCard columnProperties. + * @member {Array.} columnProperties + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance */ - ListSelect.prototype.title = ""; + TableCard.prototype.columnProperties = $util.emptyArray; /** - * ListSelect items. - * @member {Array.} items - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * TableCard rows. + * @member {Array.} rows + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance */ - ListSelect.prototype.items = $util.emptyArray; + TableCard.prototype.rows = $util.emptyArray; /** - * ListSelect subtitle. - * @member {string} subtitle - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * TableCard buttons. + * @member {Array.} buttons + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance */ - ListSelect.prototype.subtitle = ""; + TableCard.prototype.buttons = $util.emptyArray; /** - * Creates a new ListSelect instance using the specified properties. + * Creates a new TableCard instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect instance - */ - ListSelect.create = function create(properties) { - return new ListSelect(properties); + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard instance + */ + TableCard.create = function create(properties) { + return new TableCard(properties); }; /** - * Encodes the specified ListSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * Encodes the specified TableCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect} message ListSelect message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard} message TableCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSelect.encode = function encode(message, writer) { + TableCard.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.title != null && Object.hasOwnProperty.call(message, "title")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.encode(message.items[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subtitle); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.columnProperties != null && message.columnProperties.length) + for (var i = 0; i < message.columnProperties.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.encode(message.columnProperties[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.encode(message.rows[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.buttons != null && message.buttons.length) + for (var i = 0; i < message.buttons.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.encode(message.buttons[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.verify|verify} messages. + * Encodes the specified TableCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IListSelect} message ListSelect message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard} message TableCard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSelect.encodeDelimited = function encodeDelimited(message, writer) { + TableCard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSelect message from the specified reader or buffer. + * Decodes a TableCard message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSelect.decode = function decode(reader, length) { + TableCard.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.v2beta1.Intent.Message.ListSelect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -109497,12 +110681,25 @@ message.title = reader.string(); break; case 2: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.decode(reader, reader.uint32())); + message.subtitle = reader.string(); break; case 3: - message.subtitle = reader.string(); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.columnProperties && message.columnProperties.length)) + message.columnProperties = []; + message.columnProperties.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.buttons && message.buttons.length)) + message.buttons = []; + message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -109513,407 +110710,207 @@ }; /** - * Decodes a ListSelect message from the specified reader or buffer, length delimited. + * Decodes a TableCard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSelect.decodeDelimited = function decodeDelimited(reader) { + TableCard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSelect message. + * Verifies a TableCard message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSelect.verify = function verify(message) { + TableCard.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.title != null && message.hasOwnProperty("title")) if (!$util.isString(message.title)) return "title: string expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify(message.items[i]); - if (error) - return "items." + error; - } - } if (message.subtitle != null && message.hasOwnProperty("subtitle")) if (!$util.isString(message.subtitle)) return "subtitle: string expected"; + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); + if (error) + return "image." + error; + } + if (message.columnProperties != null && message.hasOwnProperty("columnProperties")) { + if (!Array.isArray(message.columnProperties)) + return "columnProperties: array expected"; + for (var i = 0; i < message.columnProperties.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify(message.columnProperties[i]); + if (error) + return "columnProperties." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.buttons != null && message.hasOwnProperty("buttons")) { + if (!Array.isArray(message.buttons)) + return "buttons: array expected"; + for (var i = 0; i < message.buttons.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify(message.buttons[i]); + if (error) + return "buttons." + error; + } + } return null; }; /** - * Creates a ListSelect message from a plain object. Also converts values to their respective internal types. + * Creates a TableCard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} ListSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard */ - ListSelect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect) + TableCard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect(); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard(); if (object.title != null) message.title = String(object.title); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.items: object expected"); - message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.fromObject(object.items[i]); - } - } if (object.subtitle != null) message.subtitle = String(object.subtitle); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.image: object expected"); + message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); + } + if (object.columnProperties) { + if (!Array.isArray(object.columnProperties)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.columnProperties: array expected"); + message.columnProperties = []; + for (var i = 0; i < object.columnProperties.length; ++i) { + if (typeof object.columnProperties[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.columnProperties: object expected"); + message.columnProperties[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.fromObject(object.columnProperties[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.rows: object expected"); + message.rows[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.fromObject(object.rows[i]); + } + } + if (object.buttons) { + if (!Array.isArray(object.buttons)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.buttons: array expected"); + message.buttons = []; + for (var i = 0; i < object.buttons.length; ++i) { + if (typeof object.buttons[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.buttons: object expected"); + message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.fromObject(object.buttons[i]); + } + } return message; }; /** - * Creates a plain object from a ListSelect message. Also converts values to other types if specified. + * Creates a plain object from a TableCard message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect} message ListSelect + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} message TableCard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSelect.toObject = function toObject(message, options) { + TableCard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.items = []; + if (options.arrays || options.defaults) { + object.columnProperties = []; + object.rows = []; + object.buttons = []; + } if (options.defaults) { object.title = ""; object.subtitle = ""; + object.image = null; } if (message.title != null && message.hasOwnProperty("title")) object.title = message.title; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.toObject(message.items[j], options); - } if (message.subtitle != null && message.hasOwnProperty("subtitle")) object.subtitle = message.subtitle; + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); + if (message.columnProperties && message.columnProperties.length) { + object.columnProperties = []; + for (var j = 0; j < message.columnProperties.length; ++j) + object.columnProperties[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.toObject(message.columnProperties[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.toObject(message.rows[j], options); + } + if (message.buttons && message.buttons.length) { + object.buttons = []; + for (var j = 0; j < message.buttons.length; ++j) + object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.toObject(message.buttons[j], options); + } return object; }; /** - * Converts this ListSelect to JSON. + * Converts this TableCard to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard * @instance * @returns {Object.} JSON object */ - ListSelect.prototype.toJSON = function toJSON() { + TableCard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - ListSelect.Item = (function() { - - /** - * Properties of an Item. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect - * @interface IItem - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null} [info] Item info - * @property {string|null} [title] Item title - * @property {string|null} [description] Item description - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Item image - */ - - /** - * Constructs a new Item. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect - * @classdesc Represents an Item. - * @implements IItem - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem=} [properties] Properties to set - */ - function Item(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]]; - } - - /** - * Item info. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null|undefined} info - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @instance - */ - Item.prototype.info = null; - - /** - * Item title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @instance - */ - Item.prototype.title = ""; - - /** - * Item description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @instance - */ - Item.prototype.description = ""; - - /** - * Item image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @instance - */ - Item.prototype.image = null; - - /** - * Creates a new Item instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item instance - */ - Item.create = function create(properties) { - return new Item(properties); - }; - - /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Item message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.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.v2beta1.Intent.Message.ListSelect.Item(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.decode(reader, reader.uint32()); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Item message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Item message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Item.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.info != null && message.hasOwnProperty("info")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify(message.info); - if (error) - return "info." + error; - } - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - return null; - }; - - /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} Item - */ - Item.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item(); - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.info: object expected"); - message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.fromObject(object.info); - } - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - return message; - }; - - /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item} message Item - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Item.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.info = null; - object.title = ""; - object.description = ""; - object.image = null; - } - if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.toObject(message.info, options); - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - return object; - }; - - /** - * Converts this Item to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item - * @instance - * @returns {Object.} JSON object - */ - Item.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Item; - })(); - - return ListSelect; + return TableCard; })(); - Message.CarouselSelect = (function() { + Message.ColumnProperties = (function() { /** - * Properties of a CarouselSelect. + * Properties of a ColumnProperties. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ICarouselSelect - * @property {Array.|null} [items] CarouselSelect items + * @interface IColumnProperties + * @property {string|null} [header] ColumnProperties header + * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|null} [horizontalAlignment] ColumnProperties horizontalAlignment */ /** - * Constructs a new CarouselSelect. + * Constructs a new ColumnProperties. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a CarouselSelect. - * @implements ICarouselSelect + * @classdesc Represents a ColumnProperties. + * @implements IColumnProperties * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties=} [properties] Properties to set */ - function CarouselSelect(properties) { - this.items = []; + function ColumnProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109921,78 +110918,88 @@ } /** - * CarouselSelect items. - * @member {Array.} items - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * ColumnProperties header. + * @member {string} header + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties + * @instance + */ + ColumnProperties.prototype.header = ""; + + /** + * ColumnProperties horizontalAlignment. + * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment} horizontalAlignment + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @instance */ - CarouselSelect.prototype.items = $util.emptyArray; + ColumnProperties.prototype.horizontalAlignment = 0; /** - * Creates a new CarouselSelect instance using the specified properties. + * Creates a new ColumnProperties instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties instance */ - CarouselSelect.create = function create(properties) { - return new CarouselSelect(properties); + ColumnProperties.create = function create(properties) { + return new ColumnProperties(properties); }; /** - * Encodes the specified CarouselSelect message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * Encodes the specified ColumnProperties message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect} message CarouselSelect message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties} message ColumnProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CarouselSelect.encode = function encode(message, writer) { + ColumnProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.header); + if (message.horizontalAlignment != null && Object.hasOwnProperty.call(message, "horizontalAlignment")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.horizontalAlignment); return writer; }; /** - * Encodes the specified CarouselSelect message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.verify|verify} messages. + * Encodes the specified ColumnProperties message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ICarouselSelect} message CarouselSelect message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties} message ColumnProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CarouselSelect.encodeDelimited = function encodeDelimited(message, writer) { + ColumnProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CarouselSelect message from the specified reader or buffer. + * Decodes a ColumnProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CarouselSelect.decode = function decode(reader, length) { + ColumnProperties.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.v2beta1.Intent.Message.CarouselSelect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.decode(reader, reader.uint32())); + message.header = reader.string(); + break; + case 2: + message.horizontalAlignment = reader.int32(); break; default: reader.skipType(tag & 7); @@ -110003,390 +111010,159 @@ }; /** - * Decodes a CarouselSelect message from the specified reader or buffer, length delimited. + * Decodes a ColumnProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CarouselSelect.decodeDelimited = function decodeDelimited(reader) { + ColumnProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CarouselSelect message. + * Verifies a ColumnProperties message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CarouselSelect.verify = function verify(message) { + ColumnProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify(message.items[i]); - if (error) - return "items." + error; + if (message.header != null && message.hasOwnProperty("header")) + if (!$util.isString(message.header)) + return "header: string expected"; + if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) + switch (message.horizontalAlignment) { + default: + return "horizontalAlignment: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } return null; }; /** - * Creates a CarouselSelect message from a plain object. Also converts values to their respective internal types. + * Creates a ColumnProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} CarouselSelect + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties */ - CarouselSelect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect) + ColumnProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.items: object expected"); - message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.fromObject(object.items[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties(); + if (object.header != null) + message.header = String(object.header); + switch (object.horizontalAlignment) { + case "HORIZONTAL_ALIGNMENT_UNSPECIFIED": + case 0: + message.horizontalAlignment = 0; + break; + case "LEADING": + case 1: + message.horizontalAlignment = 1; + break; + case "CENTER": + case 2: + message.horizontalAlignment = 2; + break; + case "TRAILING": + case 3: + message.horizontalAlignment = 3; + break; } return message; }; /** - * Creates a plain object from a CarouselSelect message. Also converts values to other types if specified. + * Creates a plain object from a ColumnProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect} message CarouselSelect + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} message ColumnProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CarouselSelect.toObject = function toObject(message, options) { + ColumnProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.toObject(message.items[j], options); + if (options.defaults) { + object.header = ""; + object.horizontalAlignment = options.enums === String ? "HORIZONTAL_ALIGNMENT_UNSPECIFIED" : 0; } + if (message.header != null && message.hasOwnProperty("header")) + object.header = message.header; + if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) + object.horizontalAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; return object; }; /** - * Converts this CarouselSelect to JSON. + * Converts this ColumnProperties to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties * @instance * @returns {Object.} JSON object */ - CarouselSelect.prototype.toJSON = function toJSON() { + ColumnProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CarouselSelect.Item = (function() { - - /** - * Properties of an Item. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect - * @interface IItem - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null} [info] Item info - * @property {string|null} [title] Item title - * @property {string|null} [description] Item description - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] Item image - */ - - /** - * Constructs a new Item. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect - * @classdesc Represents an Item. - * @implements IItem - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem=} [properties] Properties to set - */ - function Item(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]]; - } - - /** - * Item info. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo|null|undefined} info - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @instance - */ - Item.prototype.info = null; - - /** - * Item title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @instance - */ - Item.prototype.title = ""; - - /** - * Item description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @instance - */ - Item.prototype.description = ""; - - /** - * Item image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @instance - */ - Item.prototype.image = null; - - /** - * Creates a new Item instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item instance - */ - Item.create = function create(properties) { - return new Item(properties); - }; - - /** - * Encodes the specified Item message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Item message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.IItem} message Item message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Item.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Item message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.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.v2beta1.Intent.Message.CarouselSelect.Item(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.decode(reader, reader.uint32()); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Item message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Item.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Item message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Item.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.info != null && message.hasOwnProperty("info")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify(message.info); - if (error) - return "info." + error; - } - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - return null; - }; - - /** - * Creates an Item message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} Item - */ - Item.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item(); - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.info: object expected"); - message.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.fromObject(object.info); - } - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - return message; - }; - - /** - * Creates a plain object from an Item message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item} message Item - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Item.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.info = null; - object.title = ""; - object.description = ""; - object.image = null; - } - if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.toObject(message.info, options); - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - return object; - }; - - /** - * Converts this Item to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item - * @instance - * @returns {Object.} JSON object - */ - Item.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Item; + /** + * HorizontalAlignment enum. + * @name google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment + * @enum {number} + * @property {number} HORIZONTAL_ALIGNMENT_UNSPECIFIED=0 HORIZONTAL_ALIGNMENT_UNSPECIFIED value + * @property {number} LEADING=1 LEADING value + * @property {number} CENTER=2 CENTER value + * @property {number} TRAILING=3 TRAILING value + */ + ColumnProperties.HorizontalAlignment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HORIZONTAL_ALIGNMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEADING"] = 1; + values[valuesById[2] = "CENTER"] = 2; + values[valuesById[3] = "TRAILING"] = 3; + return values; })(); - return CarouselSelect; + return ColumnProperties; })(); - Message.SelectItemInfo = (function() { + Message.TableCardRow = (function() { /** - * Properties of a SelectItemInfo. + * Properties of a TableCardRow. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ISelectItemInfo - * @property {string|null} [key] SelectItemInfo key - * @property {Array.|null} [synonyms] SelectItemInfo synonyms + * @interface ITableCardRow + * @property {Array.|null} [cells] TableCardRow cells + * @property {boolean|null} [dividerAfter] TableCardRow dividerAfter */ /** - * Constructs a new SelectItemInfo. + * Constructs a new TableCardRow. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a SelectItemInfo. - * @implements ISelectItemInfo + * @classdesc Represents a TableCardRow. + * @implements ITableCardRow * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow=} [properties] Properties to set */ - function SelectItemInfo(properties) { - this.synonyms = []; + function TableCardRow(properties) { + this.cells = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110394,91 +111170,91 @@ } /** - * SelectItemInfo key. - * @member {string} key - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * TableCardRow cells. + * @member {Array.} cells + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @instance */ - SelectItemInfo.prototype.key = ""; + TableCardRow.prototype.cells = $util.emptyArray; /** - * SelectItemInfo synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * TableCardRow dividerAfter. + * @member {boolean} dividerAfter + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @instance */ - SelectItemInfo.prototype.synonyms = $util.emptyArray; + TableCardRow.prototype.dividerAfter = false; /** - * Creates a new SelectItemInfo instance using the specified properties. + * Creates a new TableCardRow instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow instance */ - SelectItemInfo.create = function create(properties) { - return new SelectItemInfo(properties); + TableCardRow.create = function create(properties) { + return new TableCardRow(properties); }; /** - * Encodes the specified SelectItemInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * Encodes the specified TableCardRow message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo} message SelectItemInfo message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow} message TableCardRow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SelectItemInfo.encode = function encode(message, writer) { + TableCardRow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - 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]); + if (message.cells != null && message.cells.length) + for (var i = 0; i < message.cells.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.encode(message.cells[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dividerAfter != null && Object.hasOwnProperty.call(message, "dividerAfter")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dividerAfter); return writer; }; /** - * Encodes the specified SelectItemInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.verify|verify} messages. + * Encodes the specified TableCardRow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ISelectItemInfo} message SelectItemInfo message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow} message TableCardRow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SelectItemInfo.encodeDelimited = function encodeDelimited(message, writer) { + TableCardRow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SelectItemInfo message from the specified reader or buffer. + * Decodes a TableCardRow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SelectItemInfo.decode = function decode(reader, length) { + TableCardRow.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.v2beta1.Intent.Message.SelectItemInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); + if (!(message.cells && message.cells.length)) + message.cells = []; + message.cells.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.decode(reader, reader.uint32())); break; case 2: - if (!(message.synonyms && message.synonyms.length)) - message.synonyms = []; - message.synonyms.push(reader.string()); + message.dividerAfter = reader.bool(); break; default: reader.skipType(tag & 7); @@ -110489,128 +111265,133 @@ }; /** - * Decodes a SelectItemInfo message from the specified reader or buffer, length delimited. + * Decodes a TableCardRow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SelectItemInfo.decodeDelimited = function decodeDelimited(reader) { + TableCardRow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SelectItemInfo message. + * Verifies a TableCardRow message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SelectItemInfo.verify = function verify(message) { + TableCardRow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: 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"; + if (message.cells != null && message.hasOwnProperty("cells")) { + if (!Array.isArray(message.cells)) + return "cells: array expected"; + for (var i = 0; i < message.cells.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify(message.cells[i]); + if (error) + return "cells." + error; + } } + if (message.dividerAfter != null && message.hasOwnProperty("dividerAfter")) + if (typeof message.dividerAfter !== "boolean") + return "dividerAfter: boolean expected"; return null; }; /** - * Creates a SelectItemInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TableCardRow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} SelectItemInfo + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow */ - SelectItemInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo) + TableCardRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo(); - if (object.key != null) - message.key = String(object.key); - if (object.synonyms) { - if (!Array.isArray(object.synonyms)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.synonyms: array expected"); - message.synonyms = []; - for (var i = 0; i < object.synonyms.length; ++i) - message.synonyms[i] = String(object.synonyms[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow(); + if (object.cells) { + if (!Array.isArray(object.cells)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.cells: array expected"); + message.cells = []; + for (var i = 0; i < object.cells.length; ++i) { + if (typeof object.cells[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.cells: object expected"); + message.cells[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.fromObject(object.cells[i]); + } } + if (object.dividerAfter != null) + message.dividerAfter = Boolean(object.dividerAfter); return message; }; /** - * Creates a plain object from a SelectItemInfo message. Also converts values to other types if specified. + * Creates a plain object from a TableCardRow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo} message SelectItemInfo + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} message TableCardRow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SelectItemInfo.toObject = function toObject(message, options) { + TableCardRow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.synonyms = []; + object.cells = []; if (options.defaults) - object.key = ""; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.synonyms && message.synonyms.length) { - object.synonyms = []; - for (var j = 0; j < message.synonyms.length; ++j) - object.synonyms[j] = message.synonyms[j]; + object.dividerAfter = false; + if (message.cells && message.cells.length) { + object.cells = []; + for (var j = 0; j < message.cells.length; ++j) + object.cells[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.toObject(message.cells[j], options); } + if (message.dividerAfter != null && message.hasOwnProperty("dividerAfter")) + object.dividerAfter = message.dividerAfter; return object; }; /** - * Converts this SelectItemInfo to JSON. + * Converts this TableCardRow to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow * @instance * @returns {Object.} JSON object */ - SelectItemInfo.prototype.toJSON = function toJSON() { + TableCardRow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SelectItemInfo; + return TableCardRow; })(); - Message.TelephonyPlayAudio = (function() { + Message.TableCardCell = (function() { /** - * Properties of a TelephonyPlayAudio. + * Properties of a TableCardCell. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITelephonyPlayAudio - * @property {string|null} [audioUri] TelephonyPlayAudio audioUri + * @interface ITableCardCell + * @property {string|null} [text] TableCardCell text */ /** - * Constructs a new TelephonyPlayAudio. + * Constructs a new TableCardCell. * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TelephonyPlayAudio. - * @implements ITelephonyPlayAudio + * @classdesc Represents a TableCardCell. + * @implements ITableCardCell * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell=} [properties] Properties to set */ - function TelephonyPlayAudio(properties) { + function TableCardCell(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -110618,75 +111399,75 @@ } /** - * TelephonyPlayAudio audioUri. - * @member {string} audioUri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * TableCardCell text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @instance */ - TelephonyPlayAudio.prototype.audioUri = ""; + TableCardCell.prototype.text = ""; /** - * Creates a new TelephonyPlayAudio instance using the specified properties. + * Creates a new TableCardCell instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio instance + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell instance */ - TelephonyPlayAudio.create = function create(properties) { - return new TelephonyPlayAudio(properties); + TableCardCell.create = function create(properties) { + return new TableCardCell(properties); }; /** - * Encodes the specified TelephonyPlayAudio message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * Encodes the specified TableCardCell message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio} message TelephonyPlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell} message TableCardCell message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TelephonyPlayAudio.encode = function encode(message, writer) { + TableCardCell.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.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified TelephonyPlayAudio message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio.verify|verify} messages. + * Encodes the specified TableCardCell message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyPlayAudio} message TelephonyPlayAudio message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell} message TableCardCell message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TelephonyPlayAudio.encodeDelimited = function encodeDelimited(message, writer) { + TableCardCell.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TelephonyPlayAudio message from the specified reader or buffer. + * Decodes a TableCardCell message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TelephonyPlayAudio.decode = function decode(reader, length) { + TableCardCell.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.v2beta1.Intent.Message.TelephonyPlayAudio(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.audioUri = reader.string(); + message.text = reader.string(); break; default: reader.skipType(tag & 7); @@ -110697,5833 +111478,6268 @@ }; /** - * Decodes a TelephonyPlayAudio message from the specified reader or buffer, length delimited. + * Decodes a TableCardCell message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TelephonyPlayAudio.decodeDelimited = function decodeDelimited(reader) { + TableCardCell.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TelephonyPlayAudio message. + * Verifies a TableCardCell message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TelephonyPlayAudio.verify = function verify(message) { + TableCardCell.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.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a TelephonyPlayAudio message from a plain object. Also converts values to their respective internal types. + * Creates a TableCardCell message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} TelephonyPlayAudio + * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell */ - TelephonyPlayAudio.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio) + TableCardCell.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio(); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell(); + if (object.text != null) + message.text = String(object.text); return message; }; - /** - * Creates a plain object from a TelephonyPlayAudio message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio} message TelephonyPlayAudio - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonyPlayAudio.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.audioUri = ""; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; - return object; - }; + /** + * Creates a plain object from a TableCardCell message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} message TableCardCell + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableCardCell.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this TableCardCell to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell + * @instance + * @returns {Object.} JSON object + */ + TableCardCell.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TableCardCell; + })(); + + return Message; + })(); + + Intent.FollowupIntentInfo = (function() { + + /** + * Properties of a FollowupIntentInfo. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @interface IFollowupIntentInfo + * @property {string|null} [followupIntentName] FollowupIntentInfo followupIntentName + * @property {string|null} [parentFollowupIntentName] FollowupIntentInfo parentFollowupIntentName + */ + + /** + * Constructs a new FollowupIntentInfo. + * @memberof google.cloud.dialogflow.v2beta1.Intent + * @classdesc Represents a FollowupIntentInfo. + * @implements IFollowupIntentInfo + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo=} [properties] Properties to set + */ + function FollowupIntentInfo(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]]; + } + + /** + * FollowupIntentInfo followupIntentName. + * @member {string} followupIntentName + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @instance + */ + FollowupIntentInfo.prototype.followupIntentName = ""; + + /** + * FollowupIntentInfo parentFollowupIntentName. + * @member {string} parentFollowupIntentName + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @instance + */ + FollowupIntentInfo.prototype.parentFollowupIntentName = ""; + + /** + * Creates a new FollowupIntentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo instance + */ + FollowupIntentInfo.create = function create(properties) { + return new FollowupIntentInfo(properties); + }; + + /** + * Encodes the specified FollowupIntentInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo} message FollowupIntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FollowupIntentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.followupIntentName != null && Object.hasOwnProperty.call(message, "followupIntentName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.followupIntentName); + if (message.parentFollowupIntentName != null && Object.hasOwnProperty.call(message, "parentFollowupIntentName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parentFollowupIntentName); + return writer; + }; + + /** + * Encodes the specified FollowupIntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo} message FollowupIntentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FollowupIntentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FollowupIntentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FollowupIntentInfo.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.v2beta1.Intent.FollowupIntentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.followupIntentName = reader.string(); + break; + case 2: + message.parentFollowupIntentName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FollowupIntentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FollowupIntentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FollowupIntentInfo message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FollowupIntentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.followupIntentName != null && message.hasOwnProperty("followupIntentName")) + if (!$util.isString(message.followupIntentName)) + return "followupIntentName: string expected"; + if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) + if (!$util.isString(message.parentFollowupIntentName)) + return "parentFollowupIntentName: string expected"; + return null; + }; + + /** + * Creates a FollowupIntentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo + */ + FollowupIntentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo(); + if (object.followupIntentName != null) + message.followupIntentName = String(object.followupIntentName); + if (object.parentFollowupIntentName != null) + message.parentFollowupIntentName = String(object.parentFollowupIntentName); + return message; + }; + + /** + * Creates a plain object from a FollowupIntentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} message FollowupIntentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FollowupIntentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.followupIntentName = ""; + object.parentFollowupIntentName = ""; + } + if (message.followupIntentName != null && message.hasOwnProperty("followupIntentName")) + object.followupIntentName = message.followupIntentName; + if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) + object.parentFollowupIntentName = message.parentFollowupIntentName; + return object; + }; + + /** + * Converts this FollowupIntentInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo + * @instance + * @returns {Object.} JSON object + */ + FollowupIntentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FollowupIntentInfo; + })(); + + return Intent; + })(); + + v2beta1.ListIntentsRequest = (function() { + + /** + * Properties of a ListIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListIntentsRequest + * @property {string|null} [parent] ListIntentsRequest parent + * @property {string|null} [languageCode] ListIntentsRequest languageCode + * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] ListIntentsRequest intentView + * @property {number|null} [pageSize] ListIntentsRequest pageSize + * @property {string|null} [pageToken] ListIntentsRequest pageToken + */ + + /** + * Constructs a new ListIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListIntentsRequest. + * @implements IListIntentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest=} [properties] Properties to set + */ + function ListIntentsRequest(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]]; + } + + /** + * ListIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.parent = ""; + + /** + * ListIntentsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.languageCode = ""; - /** - * Converts this TelephonyPlayAudio to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio - * @instance - * @returns {Object.} JSON object - */ - TelephonyPlayAudio.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListIntentsRequest intentView. + * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.intentView = 0; - return TelephonyPlayAudio; - })(); + /** + * ListIntentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.pageSize = 0; - Message.TelephonySynthesizeSpeech = (function() { + /** + * ListIntentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + */ + ListIntentsRequest.prototype.pageToken = ""; - /** - * Properties of a TelephonySynthesizeSpeech. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITelephonySynthesizeSpeech - * @property {string|null} [text] TelephonySynthesizeSpeech text - * @property {string|null} [ssml] TelephonySynthesizeSpeech ssml - */ + /** + * Creates a new ListIntentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest instance + */ + ListIntentsRequest.create = function create(properties) { + return new ListIntentsRequest(properties); + }; - /** - * Constructs a new TelephonySynthesizeSpeech. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TelephonySynthesizeSpeech. - * @implements ITelephonySynthesizeSpeech - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech=} [properties] Properties to set - */ - function TelephonySynthesizeSpeech(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 ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIntentsRequest.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.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intentView); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + return writer; + }; - /** - * TelephonySynthesizeSpeech text. - * @member {string|null|undefined} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @instance - */ - TelephonySynthesizeSpeech.prototype.text = null; + /** + * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * TelephonySynthesizeSpeech ssml. - * @member {string|null|undefined} ssml - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @instance - */ - TelephonySynthesizeSpeech.prototype.ssml = null; + /** + * Decodes a ListIntentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsRequest} ListIntentsRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest(); + 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.intentView = reader.int32(); + break; + case 4: + message.pageSize = reader.int32(); + break; + case 5: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a ListIntentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * TelephonySynthesizeSpeech source. - * @member {"text"|"ssml"|undefined} source - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @instance - */ - Object.defineProperty(TelephonySynthesizeSpeech.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["text", "ssml"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a ListIntentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @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) { + 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: + 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 new TelephonySynthesizeSpeech instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech instance - */ - TelephonySynthesizeSpeech.create = function create(properties) { - return new TelephonySynthesizeSpeech(properties); - }; + /** + * Creates a ListIntentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest + */ + ListIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.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_FULL": + case 1: + message.intentView = 1; + break; + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Encodes the specified TelephonySynthesizeSpeech message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech} message TelephonySynthesizeSpeech message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonySynthesizeSpeech.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); - return writer; - }; + /** + * Creates a plain object from a ListIntentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ListIntentsRequest} message ListIntentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIntentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.languageCode = ""; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + 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.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Encodes the specified TelephonySynthesizeSpeech message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonySynthesizeSpeech} message TelephonySynthesizeSpeech message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonySynthesizeSpeech.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this ListIntentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListIntentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonySynthesizeSpeech.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.v2beta1.Intent.Message.TelephonySynthesizeSpeech(); - 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ListIntentsRequest; + })(); - /** - * Decodes a TelephonySynthesizeSpeech message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonySynthesizeSpeech.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v2beta1.ListIntentsResponse = (function() { - /** - * Verifies a TelephonySynthesizeSpeech message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TelephonySynthesizeSpeech.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"; - } - return null; - }; + /** + * Properties of a ListIntentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListIntentsResponse + * @property {Array.|null} [intents] ListIntentsResponse intents + * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken + */ - /** - * Creates a TelephonySynthesizeSpeech message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} TelephonySynthesizeSpeech - */ - TelephonySynthesizeSpeech.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech(); - if (object.text != null) - message.text = String(object.text); - if (object.ssml != null) - message.ssml = String(object.ssml); - return message; - }; + /** + * Constructs a new ListIntentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListIntentsResponse. + * @implements IListIntentsResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse=} [properties] Properties to set + */ + function ListIntentsResponse(properties) { + this.intents = []; + 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 TelephonySynthesizeSpeech message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech} message TelephonySynthesizeSpeech - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonySynthesizeSpeech.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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"; - } - return object; - }; + /** + * ListIntentsResponse intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @instance + */ + ListIntentsResponse.prototype.intents = $util.emptyArray; + + /** + * ListIntentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @instance + */ + ListIntentsResponse.prototype.nextPageToken = ""; - /** - * Converts this TelephonySynthesizeSpeech to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech - * @instance - * @returns {Object.} JSON object - */ - TelephonySynthesizeSpeech.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new ListIntentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse instance + */ + ListIntentsResponse.create = function create(properties) { + return new ListIntentsResponse(properties); + }; - return TelephonySynthesizeSpeech; - })(); + /** + * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIntentsResponse.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.v2beta1.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; + }; - Message.TelephonyTransferCall = (function() { + /** + * Encodes the specified ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a TelephonyTransferCall. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITelephonyTransferCall - * @property {string|null} [phoneNumber] TelephonyTransferCall phoneNumber - */ + /** + * Decodes a ListIntentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsResponse} ListIntentsResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse(); + 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.v2beta1.Intent.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new TelephonyTransferCall. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TelephonyTransferCall. - * @implements ITelephonyTransferCall - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall=} [properties] Properties to set - */ - function TelephonyTransferCall(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]]; + /** + * Decodes a ListIntentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIntentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @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) { + 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.v2beta1.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; + }; - /** - * TelephonyTransferCall phoneNumber. - * @member {string} phoneNumber - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @instance - */ - TelephonyTransferCall.prototype.phoneNumber = ""; + /** + * Creates a ListIntentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse + */ + ListIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsResponse.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a new TelephonyTransferCall instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall instance - */ - TelephonyTransferCall.create = function create(properties) { - return new TelephonyTransferCall(properties); - }; + /** + * Creates a plain object from a ListIntentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListIntentsResponse} message ListIntentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIntentsResponse.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.v2beta1.Intent.toObject(message.intents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Encodes the specified TelephonyTransferCall message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); - return writer; - }; + /** + * Converts this ListIntentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListIntentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified TelephonyTransferCall message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITelephonyTransferCall} message TelephonyTransferCall message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TelephonyTransferCall.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ListIntentsResponse; + })(); - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.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.v2beta1.Intent.Message.TelephonyTransferCall(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.phoneNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v2beta1.GetIntentRequest = (function() { - /** - * Decodes a TelephonyTransferCall message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TelephonyTransferCall.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a GetIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGetIntentRequest + * @property {string|null} [name] GetIntentRequest name + * @property {string|null} [languageCode] GetIntentRequest languageCode + * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] GetIntentRequest intentView + */ - /** - * Verifies a TelephonyTransferCall message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TelephonyTransferCall.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - return null; - }; + /** + * Constructs a new GetIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GetIntentRequest. + * @implements IGetIntentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest=} [properties] Properties to set + */ + function GetIntentRequest(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 TelephonyTransferCall message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} TelephonyTransferCall - */ - TelephonyTransferCall.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; + /** + * GetIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @instance + */ + GetIntentRequest.prototype.name = ""; - /** - * Creates a plain object from a TelephonyTransferCall message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall} message TelephonyTransferCall - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TelephonyTransferCall.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.phoneNumber = ""; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = message.phoneNumber; - return object; - }; + /** + * GetIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @instance + */ + GetIntentRequest.prototype.languageCode = ""; - /** - * Converts this TelephonyTransferCall to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall - * @instance - * @returns {Object.} JSON object - */ - TelephonyTransferCall.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GetIntentRequest intentView. + * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @instance + */ + GetIntentRequest.prototype.intentView = 0; - return TelephonyTransferCall; - })(); + /** + * Creates a new GetIntentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest instance + */ + GetIntentRequest.create = function create(properties) { + return new GetIntentRequest(properties); + }; - Message.RbmText = (function() { + /** + * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIntentRequest.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.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intentView); + return writer; + }; - /** - * Properties of a RbmText. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmText - * @property {string|null} [text] RbmText text - * @property {Array.|null} [rbmSuggestion] RbmText rbmSuggestion - */ + /** + * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIntentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GetIntentRequest} GetIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetIntentRequest(); + 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; + case 3: + message.intentView = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIntentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new RbmText. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmText. - * @implements IRbmText - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText=} [properties] Properties to set - */ - function RbmText(properties) { - this.rbmSuggestion = []; - 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 GetIntentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @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) { + 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.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { + default: + return "intentView: enum value expected"; + case 0: + case 1: + break; } + return null; + }; - /** - * RbmText text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @instance - */ - RbmText.prototype.text = ""; + /** + * Creates a GetIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest + */ + GetIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetIntentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GetIntentRequest(); + if (object.name != null) + message.name = String(object.name); + 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_FULL": + case 1: + message.intentView = 1; + break; + } + return message; + }; - /** - * RbmText rbmSuggestion. - * @member {Array.} rbmSuggestion - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @instance - */ - RbmText.prototype.rbmSuggestion = $util.emptyArray; + /** + * Creates a plain object from a GetIntentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.GetIntentRequest} message GetIntentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIntentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + object.intentView = options.enums === String ? "INTENT_VIEW_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.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + return object; + }; - /** - * Creates a new RbmText instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText instance - */ - RbmText.create = function create(properties) { - return new RbmText(properties); - }; + /** + * Converts this GetIntentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @instance + * @returns {Object.} JSON object + */ + GetIntentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified RbmText message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText} message RbmText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmText.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.rbmSuggestion != null && message.rbmSuggestion.length) - for (var i = 0; i < message.rbmSuggestion.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.encode(message.rbmSuggestion[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + return GetIntentRequest; + })(); - /** - * Encodes the specified RbmText message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmText} message RbmText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.CreateIntentRequest = (function() { - /** - * Decodes a RbmText message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmText.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.v2beta1.Intent.Message.RbmText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - if (!(message.rbmSuggestion && message.rbmSuggestion.length)) - message.rbmSuggestion = []; - message.rbmSuggestion.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a CreateIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ICreateIntentRequest + * @property {string|null} [parent] CreateIntentRequest parent + * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] CreateIntentRequest intent + * @property {string|null} [languageCode] CreateIntentRequest languageCode + * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] CreateIntentRequest intentView + */ - /** - * Decodes a RbmText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new CreateIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CreateIntentRequest. + * @implements ICreateIntentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest=} [properties] Properties to set + */ + function CreateIntentRequest(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 RbmText message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmText.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.rbmSuggestion != null && message.hasOwnProperty("rbmSuggestion")) { - if (!Array.isArray(message.rbmSuggestion)) - return "rbmSuggestion: array expected"; - for (var i = 0; i < message.rbmSuggestion.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify(message.rbmSuggestion[i]); - if (error) - return "rbmSuggestion." + error; - } - } - return null; - }; + /** + * CreateIntentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @instance + */ + CreateIntentRequest.prototype.parent = ""; - /** - * Creates a RbmText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} RbmText - */ - RbmText.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmText(); - if (object.text != null) - message.text = String(object.text); - if (object.rbmSuggestion) { - if (!Array.isArray(object.rbmSuggestion)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.rbmSuggestion: array expected"); - message.rbmSuggestion = []; - for (var i = 0; i < object.rbmSuggestion.length; ++i) { - if (typeof object.rbmSuggestion[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.rbmSuggestion: object expected"); - message.rbmSuggestion[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.fromObject(object.rbmSuggestion[i]); - } - } - return message; - }; + /** + * CreateIntentRequest intent. + * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @instance + */ + CreateIntentRequest.prototype.intent = null; - /** - * Creates a plain object from a RbmText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmText} message RbmText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rbmSuggestion = []; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.rbmSuggestion && message.rbmSuggestion.length) { - object.rbmSuggestion = []; - for (var j = 0; j < message.rbmSuggestion.length; ++j) - object.rbmSuggestion[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.toObject(message.rbmSuggestion[j], options); - } - return object; - }; + /** + * CreateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @instance + */ + CreateIntentRequest.prototype.languageCode = ""; - /** - * Converts this RbmText to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmText - * @instance - * @returns {Object.} JSON object - */ - RbmText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateIntentRequest intentView. + * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @instance + */ + CreateIntentRequest.prototype.intentView = 0; - return RbmText; - })(); + /** + * Creates a new CreateIntentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest instance + */ + CreateIntentRequest.create = function create(properties) { + return new CreateIntentRequest(properties); + }; - Message.RbmCarouselCard = (function() { + /** + * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIntentRequest.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.v2beta1.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.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intentView); + return writer; + }; - /** - * Properties of a RbmCarouselCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmCarouselCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth|null} [cardWidth] RbmCarouselCard cardWidth - * @property {Array.|null} [cardContents] RbmCarouselCard cardContents - */ + /** + * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new RbmCarouselCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmCarouselCard. - * @implements IRbmCarouselCard - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard=} [properties] Properties to set - */ - function RbmCarouselCard(properties) { - this.cardContents = []; - 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]]; + /** + * Decodes a CreateIntentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CreateIntentRequest} CreateIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32()); + break; + case 3: + message.languageCode = reader.string(); + break; + case 4: + message.intentView = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * RbmCarouselCard cardWidth. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth} cardWidth - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @instance - */ - RbmCarouselCard.prototype.cardWidth = 0; - - /** - * RbmCarouselCard cardContents. - * @member {Array.} cardContents - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @instance - */ - RbmCarouselCard.prototype.cardContents = $util.emptyArray; - - /** - * Creates a new RbmCarouselCard instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard instance - */ - RbmCarouselCard.create = function create(properties) { - return new RbmCarouselCard(properties); - }; - - /** - * Encodes the specified RbmCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard} message RbmCarouselCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmCarouselCard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cardWidth != null && Object.hasOwnProperty.call(message, "cardWidth")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cardWidth); - if (message.cardContents != null && message.cardContents.length) - for (var i = 0; i < message.cardContents.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.encode(message.cardContents[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified RbmCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCarouselCard} message RbmCarouselCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmCarouselCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a CreateIntentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @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) { + 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.v2beta1.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.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { + default: + return "intentView: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; - /** - * Decodes a RbmCarouselCard message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmCarouselCard.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.v2beta1.Intent.Message.RbmCarouselCard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cardWidth = reader.int32(); - break; - case 2: - if (!(message.cardContents && message.cardContents.length)) - message.cardContents = []; - message.cardContents.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest + */ + CreateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intent); + } + 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_FULL": + case 1: + message.intentView = 1; + break; + } + return message; + }; - /** - * Decodes a RbmCarouselCard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmCarouselCard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.CreateIntentRequest} message CreateIntentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateIntentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.intent = null; + object.languageCode = ""; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intent, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + return object; + }; - /** - * Verifies a RbmCarouselCard message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmCarouselCard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cardWidth != null && message.hasOwnProperty("cardWidth")) - switch (message.cardWidth) { - default: - return "cardWidth: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.cardContents != null && message.hasOwnProperty("cardContents")) { - if (!Array.isArray(message.cardContents)) - return "cardContents: array expected"; - for (var i = 0; i < message.cardContents.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify(message.cardContents[i]); - if (error) - return "cardContents." + error; - } - } - return null; - }; + /** + * Converts this CreateIntentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateIntentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a RbmCarouselCard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} RbmCarouselCard - */ - RbmCarouselCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard(); - switch (object.cardWidth) { - case "CARD_WIDTH_UNSPECIFIED": - case 0: - message.cardWidth = 0; - break; - case "SMALL": - case 1: - message.cardWidth = 1; - break; - case "MEDIUM": - case 2: - message.cardWidth = 2; - break; - } - if (object.cardContents) { - if (!Array.isArray(object.cardContents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.cardContents: array expected"); - message.cardContents = []; - for (var i = 0; i < object.cardContents.length; ++i) { - if (typeof object.cardContents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.cardContents: object expected"); - message.cardContents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.fromObject(object.cardContents[i]); - } - } - return message; - }; + return CreateIntentRequest; + })(); - /** - * Creates a plain object from a RbmCarouselCard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard} message RbmCarouselCard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmCarouselCard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cardContents = []; - if (options.defaults) - object.cardWidth = options.enums === String ? "CARD_WIDTH_UNSPECIFIED" : 0; - if (message.cardWidth != null && message.hasOwnProperty("cardWidth")) - object.cardWidth = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth[message.cardWidth] : message.cardWidth; - if (message.cardContents && message.cardContents.length) { - object.cardContents = []; - for (var j = 0; j < message.cardContents.length; ++j) - object.cardContents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.toObject(message.cardContents[j], options); - } - return object; - }; + v2beta1.UpdateIntentRequest = (function() { - /** - * Converts this RbmCarouselCard to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard - * @instance - * @returns {Object.} JSON object - */ - RbmCarouselCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an UpdateIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IUpdateIntentRequest + * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] UpdateIntentRequest intent + * @property {string|null} [languageCode] UpdateIntentRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask + * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] UpdateIntentRequest intentView + */ - /** - * CardWidth enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth - * @enum {number} - * @property {number} CARD_WIDTH_UNSPECIFIED=0 CARD_WIDTH_UNSPECIFIED value - * @property {number} SMALL=1 SMALL value - * @property {number} MEDIUM=2 MEDIUM value - */ - RbmCarouselCard.CardWidth = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CARD_WIDTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "SMALL"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - return values; - })(); + /** + * Constructs a new UpdateIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an UpdateIntentRequest. + * @implements IUpdateIntentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest=} [properties] Properties to set + */ + function UpdateIntentRequest(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 RbmCarouselCard; - })(); + /** + * UpdateIntentRequest intent. + * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @instance + */ + UpdateIntentRequest.prototype.intent = null; - Message.RbmStandaloneCard = (function() { + /** + * UpdateIntentRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @instance + */ + UpdateIntentRequest.prototype.languageCode = ""; - /** - * Properties of a RbmStandaloneCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmStandaloneCard - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation|null} [cardOrientation] RbmStandaloneCard cardOrientation - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment|null} [thumbnailImageAlignment] RbmStandaloneCard thumbnailImageAlignment - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null} [cardContent] RbmStandaloneCard cardContent - */ + /** + * UpdateIntentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @instance + */ + UpdateIntentRequest.prototype.updateMask = null; - /** - * Constructs a new RbmStandaloneCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmStandaloneCard. - * @implements IRbmStandaloneCard - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard=} [properties] Properties to set - */ - function RbmStandaloneCard(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]]; - } + /** + * UpdateIntentRequest intentView. + * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @instance + */ + UpdateIntentRequest.prototype.intentView = 0; - /** - * RbmStandaloneCard cardOrientation. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation} cardOrientation - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @instance - */ - RbmStandaloneCard.prototype.cardOrientation = 0; + /** + * Creates a new UpdateIntentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest instance + */ + UpdateIntentRequest.create = function create(properties) { + return new UpdateIntentRequest(properties); + }; - /** - * RbmStandaloneCard thumbnailImageAlignment. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment} thumbnailImageAlignment - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @instance - */ - RbmStandaloneCard.prototype.thumbnailImageAlignment = 0; + /** + * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIntentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + $root.google.cloud.dialogflow.v2beta1.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.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intentView); + return writer; + }; - /** - * RbmStandaloneCard cardContent. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent|null|undefined} cardContent - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @instance - */ - RbmStandaloneCard.prototype.cardContent = null; + /** + * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new RbmStandaloneCard instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard instance - */ - RbmStandaloneCard.create = function create(properties) { - return new RbmStandaloneCard(properties); - }; + /** + * Decodes an UpdateIntentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateIntentRequest} UpdateIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.intent = $root.google.cloud.dialogflow.v2beta1.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()); + break; + case 4: + message.intentView = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified RbmStandaloneCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard} message RbmStandaloneCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmStandaloneCard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cardOrientation != null && Object.hasOwnProperty.call(message, "cardOrientation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cardOrientation); - if (message.thumbnailImageAlignment != null && Object.hasOwnProperty.call(message, "thumbnailImageAlignment")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.thumbnailImageAlignment); - if (message.cardContent != null && Object.hasOwnProperty.call(message, "cardContent")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.encode(message.cardContent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified RbmStandaloneCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmStandaloneCard} message RbmStandaloneCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmStandaloneCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an UpdateIntentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intent != null && message.hasOwnProperty("intent")) { + var error = $root.google.cloud.dialogflow.v2beta1.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.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { + default: + return "intentView: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; - /** - * Decodes a RbmStandaloneCard message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmStandaloneCard.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.v2beta1.Intent.Message.RbmStandaloneCard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.cardOrientation = reader.int32(); - break; - case 2: - message.thumbnailImageAlignment = reader.int32(); - break; - case 3: - message.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest + */ + UpdateIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest(); + if (object.intent != null) { + if (typeof object.intent !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateIntentRequest.intent: object expected"); + message.intent = $root.google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateIntentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + switch (object.intentView) { + case "INTENT_VIEW_UNSPECIFIED": + case 0: + message.intentView = 0; + break; + case "INTENT_VIEW_FULL": + case 1: + message.intentView = 1; + break; + } + return message; + }; - /** - * Decodes a RbmStandaloneCard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmStandaloneCard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} message UpdateIntentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateIntentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.intent = null; + object.languageCode = ""; + object.updateMask = null; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + } + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = $root.google.cloud.dialogflow.v2beta1.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 (message.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + return object; + }; - /** - * Verifies a RbmStandaloneCard message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmStandaloneCard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cardOrientation != null && message.hasOwnProperty("cardOrientation")) - switch (message.cardOrientation) { - default: - return "cardOrientation: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.thumbnailImageAlignment != null && message.hasOwnProperty("thumbnailImageAlignment")) - switch (message.thumbnailImageAlignment) { - default: - return "thumbnailImageAlignment: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.cardContent != null && message.hasOwnProperty("cardContent")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify(message.cardContent); - if (error) - return "cardContent." + error; - } - return null; - }; + /** + * Converts this UpdateIntentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateIntentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a RbmStandaloneCard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} RbmStandaloneCard - */ - RbmStandaloneCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard(); - switch (object.cardOrientation) { - case "CARD_ORIENTATION_UNSPECIFIED": - case 0: - message.cardOrientation = 0; - break; - case "HORIZONTAL": - case 1: - message.cardOrientation = 1; - break; - case "VERTICAL": - case 2: - message.cardOrientation = 2; - break; - } - switch (object.thumbnailImageAlignment) { - case "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED": - case 0: - message.thumbnailImageAlignment = 0; - break; - case "LEFT": - case 1: - message.thumbnailImageAlignment = 1; - break; - case "RIGHT": - case 2: - message.thumbnailImageAlignment = 2; - break; - } - if (object.cardContent != null) { - if (typeof object.cardContent !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.cardContent: object expected"); - message.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.fromObject(object.cardContent); - } - return message; - }; + return UpdateIntentRequest; + })(); - /** - * Creates a plain object from a RbmStandaloneCard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard} message RbmStandaloneCard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmStandaloneCard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cardOrientation = options.enums === String ? "CARD_ORIENTATION_UNSPECIFIED" : 0; - object.thumbnailImageAlignment = options.enums === String ? "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED" : 0; - object.cardContent = null; - } - if (message.cardOrientation != null && message.hasOwnProperty("cardOrientation")) - object.cardOrientation = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation[message.cardOrientation] : message.cardOrientation; - if (message.thumbnailImageAlignment != null && message.hasOwnProperty("thumbnailImageAlignment")) - object.thumbnailImageAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment[message.thumbnailImageAlignment] : message.thumbnailImageAlignment; - if (message.cardContent != null && message.hasOwnProperty("cardContent")) - object.cardContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.toObject(message.cardContent, options); - return object; - }; + v2beta1.DeleteIntentRequest = (function() { - /** - * Converts this RbmStandaloneCard to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard - * @instance - * @returns {Object.} JSON object - */ - RbmStandaloneCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a DeleteIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IDeleteIntentRequest + * @property {string|null} [name] DeleteIntentRequest name + */ - /** - * CardOrientation enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation - * @enum {number} - * @property {number} CARD_ORIENTATION_UNSPECIFIED=0 CARD_ORIENTATION_UNSPECIFIED value - * @property {number} HORIZONTAL=1 HORIZONTAL value - * @property {number} VERTICAL=2 VERTICAL value - */ - RbmStandaloneCard.CardOrientation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CARD_ORIENTATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "HORIZONTAL"] = 1; - values[valuesById[2] = "VERTICAL"] = 2; - return values; - })(); + /** + * Constructs a new DeleteIntentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a DeleteIntentRequest. + * @implements IDeleteIntentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest=} [properties] Properties to set + */ + function DeleteIntentRequest(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]]; + } - /** - * ThumbnailImageAlignment enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment - * @enum {number} - * @property {number} THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED=0 THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED value - * @property {number} LEFT=1 LEFT value - * @property {number} RIGHT=2 RIGHT value - */ - RbmStandaloneCard.ThumbnailImageAlignment = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEFT"] = 1; - values[valuesById[2] = "RIGHT"] = 2; - return values; - })(); + /** + * DeleteIntentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @instance + */ + DeleteIntentRequest.prototype.name = ""; - return RbmStandaloneCard; - })(); + /** + * Creates a new DeleteIntentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest instance + */ + DeleteIntentRequest.create = function create(properties) { + return new DeleteIntentRequest(properties); + }; - Message.RbmCardContent = (function() { + /** + * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIntentRequest.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; + }; - /** - * Properties of a RbmCardContent. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmCardContent - * @property {string|null} [title] RbmCardContent title - * @property {string|null} [description] RbmCardContent description - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null} [media] RbmCardContent media - * @property {Array.|null} [suggestions] RbmCardContent suggestions - */ + /** + * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new RbmCardContent. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmCardContent. - * @implements IRbmCardContent - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent=} [properties] Properties to set - */ - function RbmCardContent(properties) { - this.suggestions = []; - 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]]; + /** + * Decodes a DeleteIntentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteIntentRequest} DeleteIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteIntentRequest(); + 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; + }; - /** - * RbmCardContent title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @instance - */ - RbmCardContent.prototype.title = ""; + /** + * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * RbmCardContent description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @instance - */ - RbmCardContent.prototype.description = ""; + /** + * Verifies a DeleteIntentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @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) { + 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; + }; - /** - * RbmCardContent media. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia|null|undefined} media - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @instance - */ - RbmCardContent.prototype.media = null; + /** + * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest + */ + DeleteIntentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteIntentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteIntentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * RbmCardContent suggestions. - * @member {Array.} suggestions - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @instance - */ - RbmCardContent.prototype.suggestions = $util.emptyArray; + /** + * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} message DeleteIntentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIntentRequest.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; + }; - /** - * Creates a new RbmCardContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent instance - */ - RbmCardContent.create = function create(properties) { - return new RbmCardContent(properties); - }; + /** + * Converts this DeleteIntentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteIntentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified RbmCardContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent} message RbmCardContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmCardContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.media != null && Object.hasOwnProperty.call(message, "media")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.encode(message.media, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.suggestions != null && message.suggestions.length) - for (var i = 0; i < message.suggestions.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.encode(message.suggestions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + return DeleteIntentRequest; + })(); - /** - * Encodes the specified RbmCardContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmCardContent} message RbmCardContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmCardContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.BatchUpdateIntentsRequest = (function() { - /** - * Decodes a RbmCardContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmCardContent.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.v2beta1.Intent.Message.RbmCardContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.suggestions && message.suggestions.length)) - message.suggestions = []; - message.suggestions.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a BatchUpdateIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IBatchUpdateIntentsRequest + * @property {string|null} [parent] BatchUpdateIntentsRequest parent + * @property {string|null} [intentBatchUri] BatchUpdateIntentsRequest intentBatchUri + * @property {google.cloud.dialogflow.v2beta1.IIntentBatch|null} [intentBatchInline] BatchUpdateIntentsRequest intentBatchInline + * @property {string|null} [languageCode] BatchUpdateIntentsRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateIntentsRequest updateMask + * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] BatchUpdateIntentsRequest intentView + */ - /** - * Decodes a RbmCardContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmCardContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new BatchUpdateIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a BatchUpdateIntentsRequest. + * @implements IBatchUpdateIntentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest=} [properties] Properties to set + */ + function BatchUpdateIntentsRequest(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 RbmCardContent message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmCardContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.media != null && message.hasOwnProperty("media")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify(message.media); - if (error) - return "media." + error; - } - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (!Array.isArray(message.suggestions)) - return "suggestions: array expected"; - for (var i = 0; i < message.suggestions.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify(message.suggestions[i]); - if (error) - return "suggestions." + error; - } - } - return null; - }; + /** + * BatchUpdateIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.parent = ""; - /** - * Creates a RbmCardContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} RbmCardContent - */ - RbmCardContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.media != null) { - if (typeof object.media !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.media: object expected"); - message.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.fromObject(object.media); - } - if (object.suggestions) { - if (!Array.isArray(object.suggestions)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.suggestions: array expected"); - message.suggestions = []; - for (var i = 0; i < object.suggestions.length; ++i) { - if (typeof object.suggestions[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.suggestions: object expected"); - message.suggestions[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.fromObject(object.suggestions[i]); - } - } - return message; - }; + /** + * BatchUpdateIntentsRequest intentBatchUri. + * @member {string|null|undefined} intentBatchUri + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.intentBatchUri = null; - /** - * Creates a plain object from a RbmCardContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent} message RbmCardContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmCardContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.suggestions = []; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.media = null; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.media != null && message.hasOwnProperty("media")) - object.media = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.toObject(message.media, options); - if (message.suggestions && message.suggestions.length) { - object.suggestions = []; - for (var j = 0; j < message.suggestions.length; ++j) - object.suggestions[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.toObject(message.suggestions[j], options); - } - return object; - }; + /** + * BatchUpdateIntentsRequest intentBatchInline. + * @member {google.cloud.dialogflow.v2beta1.IIntentBatch|null|undefined} intentBatchInline + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.intentBatchInline = null; - /** - * Converts this RbmCardContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @instance - * @returns {Object.} JSON object - */ - RbmCardContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * BatchUpdateIntentsRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.languageCode = ""; - RbmCardContent.RbmMedia = (function() { + /** + * BatchUpdateIntentsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.updateMask = null; - /** - * Properties of a RbmMedia. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @interface IRbmMedia - * @property {string|null} [fileUri] RbmMedia fileUri - * @property {string|null} [thumbnailUri] RbmMedia thumbnailUri - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height|null} [height] RbmMedia height - */ + /** + * BatchUpdateIntentsRequest intentView. + * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + BatchUpdateIntentsRequest.prototype.intentView = 0; - /** - * Constructs a new RbmMedia. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent - * @classdesc Represents a RbmMedia. - * @implements IRbmMedia - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia=} [properties] Properties to set - */ - function RbmMedia(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; - /** - * RbmMedia fileUri. - * @member {string} fileUri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @instance - */ - RbmMedia.prototype.fileUri = ""; + /** + * BatchUpdateIntentsRequest intentBatch. + * @member {"intentBatchUri"|"intentBatchInline"|undefined} intentBatch + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + */ + Object.defineProperty(BatchUpdateIntentsRequest.prototype, "intentBatch", { + get: $util.oneOfGetter($oneOfFields = ["intentBatchUri", "intentBatchInline"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * RbmMedia thumbnailUri. - * @member {string} thumbnailUri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @instance - */ - RbmMedia.prototype.thumbnailUri = ""; + /** + * Creates a new BatchUpdateIntentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest instance + */ + BatchUpdateIntentsRequest.create = function create(properties) { + return new BatchUpdateIntentsRequest(properties); + }; - /** - * RbmMedia height. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height} height - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @instance - */ - RbmMedia.prototype.height = 0; + /** + * Encodes the specified BatchUpdateIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} message BatchUpdateIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateIntentsRequest.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.intentBatchUri != null && Object.hasOwnProperty.call(message, "intentBatchUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentBatchUri); + if (message.intentBatchInline != null && Object.hasOwnProperty.call(message, "intentBatchInline")) + $root.google.cloud.dialogflow.v2beta1.IntentBatch.encode(message.intentBatchInline, 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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.intentView); + return writer; + }; - /** - * Creates a new RbmMedia instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia instance - */ - RbmMedia.create = function create(properties) { - return new RbmMedia(properties); - }; + /** + * Encodes the specified BatchUpdateIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} message BatchUpdateIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified RbmMedia message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia} message RbmMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmMedia.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fileUri != null && Object.hasOwnProperty.call(message, "fileUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileUri); - if (message.thumbnailUri != null && Object.hasOwnProperty.call(message, "thumbnailUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thumbnailUri); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height); - return writer; - }; + /** + * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateIntentsRequest.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.v2beta1.BatchUpdateIntentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.intentBatchUri = reader.string(); + break; + case 3: + message.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.decode(reader, reader.uint32()); + break; + case 4: + message.languageCode = reader.string(); + break; + case 5: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 6: + message.intentView = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified RbmMedia message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.IRbmMedia} message RbmMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmMedia.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a BatchUpdateIntentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateIntentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.intentBatchUri != null && message.hasOwnProperty("intentBatchUri")) { + properties.intentBatch = 1; + if (!$util.isString(message.intentBatchUri)) + return "intentBatchUri: string expected"; + } + if (message.intentBatchInline != null && message.hasOwnProperty("intentBatchInline")) { + if (properties.intentBatch === 1) + return "intentBatch: multiple values"; + properties.intentBatch = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.IntentBatch.verify(message.intentBatchInline); + if (error) + return "intentBatchInline." + 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.intentView != null && message.hasOwnProperty("intentView")) + switch (message.intentView) { + default: + return "intentView: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; - /** - * Decodes a RbmMedia message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmMedia.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.v2beta1.Intent.Message.RbmCardContent.RbmMedia(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileUri = reader.string(); - break; - case 2: - message.thumbnailUri = reader.string(); - break; - case 3: - message.height = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a BatchUpdateIntentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + */ + BatchUpdateIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intentBatchUri != null) + message.intentBatchUri = String(object.intentBatchUri); + if (object.intentBatchInline != null) { + if (typeof object.intentBatchInline !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intentBatchInline: object expected"); + message.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.fromObject(object.intentBatchInline); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + switch (object.intentView) { + case "INTENT_VIEW_UNSPECIFIED": + case 0: + message.intentView = 0; + break; + case "INTENT_VIEW_FULL": + case 1: + message.intentView = 1; + break; + } + return message; + }; - /** - * Decodes a RbmMedia message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmMedia.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a BatchUpdateIntentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} message BatchUpdateIntentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateIntentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.languageCode = ""; + object.updateMask = null; + object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intentBatchUri != null && message.hasOwnProperty("intentBatchUri")) { + object.intentBatchUri = message.intentBatchUri; + if (options.oneofs) + object.intentBatch = "intentBatchUri"; + } + if (message.intentBatchInline != null && message.hasOwnProperty("intentBatchInline")) { + object.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.toObject(message.intentBatchInline, options); + if (options.oneofs) + object.intentBatch = "intentBatchInline"; + } + 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.intentView != null && message.hasOwnProperty("intentView")) + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + return object; + }; - /** - * Verifies a RbmMedia message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmMedia.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fileUri != null && message.hasOwnProperty("fileUri")) - if (!$util.isString(message.fileUri)) - return "fileUri: string expected"; - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - if (!$util.isString(message.thumbnailUri)) - return "thumbnailUri: string expected"; - if (message.height != null && message.hasOwnProperty("height")) - switch (message.height) { - default: - return "height: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * Converts this BatchUpdateIntentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateIntentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a RbmMedia message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} RbmMedia - */ - RbmMedia.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia(); - if (object.fileUri != null) - message.fileUri = String(object.fileUri); - if (object.thumbnailUri != null) - message.thumbnailUri = String(object.thumbnailUri); - switch (object.height) { - case "HEIGHT_UNSPECIFIED": - case 0: - message.height = 0; - break; - case "SHORT": - case 1: - message.height = 1; - break; - case "MEDIUM": - case 2: - message.height = 2; - break; - case "TALL": - case 3: - message.height = 3; - break; - } - return message; - }; + return BatchUpdateIntentsRequest; + })(); - /** - * Creates a plain object from a RbmMedia message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia} message RbmMedia - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmMedia.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fileUri = ""; - object.thumbnailUri = ""; - object.height = options.enums === String ? "HEIGHT_UNSPECIFIED" : 0; - } - if (message.fileUri != null && message.hasOwnProperty("fileUri")) - object.fileUri = message.fileUri; - if (message.thumbnailUri != null && message.hasOwnProperty("thumbnailUri")) - object.thumbnailUri = message.thumbnailUri; - if (message.height != null && message.hasOwnProperty("height")) - object.height = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height[message.height] : message.height; - return object; - }; + v2beta1.BatchUpdateIntentsResponse = (function() { - /** - * Converts this RbmMedia to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia - * @instance - * @returns {Object.} JSON object - */ - RbmMedia.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a BatchUpdateIntentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IBatchUpdateIntentsResponse + * @property {Array.|null} [intents] BatchUpdateIntentsResponse intents + */ - /** - * Height enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height - * @enum {number} - * @property {number} HEIGHT_UNSPECIFIED=0 HEIGHT_UNSPECIFIED value - * @property {number} SHORT=1 SHORT value - * @property {number} MEDIUM=2 MEDIUM value - * @property {number} TALL=3 TALL value - */ - RbmMedia.Height = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEIGHT_UNSPECIFIED"] = 0; - values[valuesById[1] = "SHORT"] = 1; - values[valuesById[2] = "MEDIUM"] = 2; - values[valuesById[3] = "TALL"] = 3; - return values; - })(); + /** + * Constructs a new BatchUpdateIntentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a BatchUpdateIntentsResponse. + * @implements IBatchUpdateIntentsResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse=} [properties] Properties to set + */ + function BatchUpdateIntentsResponse(properties) { + this.intents = []; + 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 RbmMedia; - })(); + /** + * BatchUpdateIntentsResponse intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @instance + */ + BatchUpdateIntentsResponse.prototype.intents = $util.emptyArray; - return RbmCardContent; - })(); + /** + * Creates a new BatchUpdateIntentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse instance + */ + BatchUpdateIntentsResponse.create = function create(properties) { + return new BatchUpdateIntentsResponse(properties); + }; - Message.RbmSuggestion = (function() { + /** + * Encodes the specified BatchUpdateIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse} message BatchUpdateIntentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateIntentsResponse.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.v2beta1.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Properties of a RbmSuggestion. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmSuggestion - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null} [reply] RbmSuggestion reply - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null} [action] RbmSuggestion action - */ + /** + * Encodes the specified BatchUpdateIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse} message BatchUpdateIntentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new RbmSuggestion. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmSuggestion. - * @implements IRbmSuggestion - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion=} [properties] Properties to set - */ - function RbmSuggestion(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]]; + /** + * Decodes a BatchUpdateIntentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateIntentsResponse.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.v2beta1.BatchUpdateIntentsResponse(); + 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.v2beta1.Intent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * RbmSuggestion reply. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply|null|undefined} reply - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @instance - */ - RbmSuggestion.prototype.reply = null; + /** + * Decodes a BatchUpdateIntentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateIntentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * RbmSuggestion action. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction|null|undefined} action - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @instance - */ - RbmSuggestion.prototype.action = null; + /** + * Verifies a BatchUpdateIntentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateIntentsResponse.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.v2beta1.Intent.verify(message.intents[i]); + if (error) + return "intents." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateIntentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + */ + BatchUpdateIntentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.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.v2beta1.BatchUpdateIntentsResponse.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a BatchUpdateIntentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} message BatchUpdateIntentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateIntentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.intents = []; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + } + return object; + }; - /** - * RbmSuggestion suggestion. - * @member {"reply"|"action"|undefined} suggestion - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @instance - */ - Object.defineProperty(RbmSuggestion.prototype, "suggestion", { - get: $util.oneOfGetter($oneOfFields = ["reply", "action"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this BatchUpdateIntentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateIntentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new RbmSuggestion instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion instance - */ - RbmSuggestion.create = function create(properties) { - return new RbmSuggestion(properties); - }; + return BatchUpdateIntentsResponse; + })(); - /** - * Encodes the specified RbmSuggestion message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion} message RbmSuggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.encode(message.reply, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.encode(message.action, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + v2beta1.BatchDeleteIntentsRequest = (function() { - /** - * Encodes the specified RbmSuggestion message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestion} message RbmSuggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a BatchDeleteIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IBatchDeleteIntentsRequest + * @property {string|null} [parent] BatchDeleteIntentsRequest parent + * @property {Array.|null} [intents] BatchDeleteIntentsRequest intents + */ - /** - * Decodes a RbmSuggestion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestion.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.v2beta1.Intent.Message.RbmSuggestion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.decode(reader, reader.uint32()); - break; - case 2: - message.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new BatchDeleteIntentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a BatchDeleteIntentsRequest. + * @implements IBatchDeleteIntentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest=} [properties] Properties to set + */ + function BatchDeleteIntentsRequest(properties) { + this.intents = []; + 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]]; + } - /** - * Decodes a RbmSuggestion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * BatchDeleteIntentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @instance + */ + BatchDeleteIntentsRequest.prototype.parent = ""; - /** - * Verifies a RbmSuggestion message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.reply != null && message.hasOwnProperty("reply")) { - properties.suggestion = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify(message.reply); - if (error) - return "reply." + error; - } - } - if (message.action != null && message.hasOwnProperty("action")) { - if (properties.suggestion === 1) - return "suggestion: multiple values"; - properties.suggestion = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify(message.action); - if (error) - return "action." + error; - } - } - return null; - }; + /** + * BatchDeleteIntentsRequest intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @instance + */ + BatchDeleteIntentsRequest.prototype.intents = $util.emptyArray; - /** - * Creates a RbmSuggestion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} RbmSuggestion - */ - RbmSuggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion(); - if (object.reply != null) { - if (typeof object.reply !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.reply: object expected"); - message.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.fromObject(object.reply); - } - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.action: object expected"); - message.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.fromObject(object.action); - } - return message; - }; + /** + * Creates a new BatchDeleteIntentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest instance + */ + BatchDeleteIntentsRequest.create = function create(properties) { + return new BatchDeleteIntentsRequest(properties); + }; - /** - * Creates a plain object from a RbmSuggestion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion} message RbmSuggestion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.reply != null && message.hasOwnProperty("reply")) { - object.reply = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.toObject(message.reply, options); - if (options.oneofs) - object.suggestion = "reply"; - } - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.toObject(message.action, options); - if (options.oneofs) - object.suggestion = "action"; - } - return object; - }; + /** + * Encodes the specified BatchDeleteIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} message BatchDeleteIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteIntentsRequest.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.intents != null && message.intents.length) + for (var i = 0; i < message.intents.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Intent.encode(message.intents[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Converts this RbmSuggestion to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified BatchDeleteIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} message BatchDeleteIntentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return RbmSuggestion; - })(); + /** + * Decodes a BatchDeleteIntentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteIntentsRequest.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.v2beta1.BatchDeleteIntentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + if (!(message.intents && message.intents.length)) + message.intents = []; + message.intents.push($root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Message.RbmSuggestedReply = (function() { + /** + * Decodes a BatchDeleteIntentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a RbmSuggestedReply. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmSuggestedReply - * @property {string|null} [text] RbmSuggestedReply text - * @property {string|null} [postbackData] RbmSuggestedReply postbackData - */ + /** + * Verifies a BatchDeleteIntentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeleteIntentsRequest.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.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.v2beta1.Intent.verify(message.intents[i]); + if (error) + return "intents." + error; + } + } + return null; + }; - /** - * Constructs a new RbmSuggestedReply. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmSuggestedReply. - * @implements IRbmSuggestedReply - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply=} [properties] Properties to set - */ - function RbmSuggestedReply(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 BatchDeleteIntentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + */ + BatchDeleteIntentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.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.v2beta1.BatchDeleteIntentsRequest.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); } + } + return message; + }; - /** - * RbmSuggestedReply text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @instance - */ - RbmSuggestedReply.prototype.text = ""; + /** + * Creates a plain object from a BatchDeleteIntentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} message BatchDeleteIntentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeleteIntentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.intents = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + } + return object; + }; - /** - * RbmSuggestedReply postbackData. - * @member {string} postbackData - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @instance - */ - RbmSuggestedReply.prototype.postbackData = ""; + /** + * Converts this BatchDeleteIntentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @instance + * @returns {Object.} JSON object + */ + BatchDeleteIntentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new RbmSuggestedReply instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply instance - */ - RbmSuggestedReply.create = function create(properties) { - return new RbmSuggestedReply(properties); - }; + return BatchDeleteIntentsRequest; + })(); - /** - * Encodes the specified RbmSuggestedReply message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply} message RbmSuggestedReply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedReply.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.postbackData != null && Object.hasOwnProperty.call(message, "postbackData")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.postbackData); - return writer; - }; + /** + * IntentView enum. + * @name google.cloud.dialogflow.v2beta1.IntentView + * @enum {number} + * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value + * @property {number} INTENT_VIEW_FULL=1 INTENT_VIEW_FULL value + */ + v2beta1.IntentView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTENT_VIEW_FULL"] = 1; + return values; + })(); - /** - * Encodes the specified RbmSuggestedReply message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedReply} message RbmSuggestedReply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedReply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.IntentBatch = (function() { - /** - * Decodes a RbmSuggestedReply message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedReply.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.v2beta1.Intent.Message.RbmSuggestedReply(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.postbackData = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of an IntentBatch. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IIntentBatch + * @property {Array.|null} [intents] IntentBatch intents + */ - /** - * Decodes a RbmSuggestedReply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedReply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new IntentBatch. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an IntentBatch. + * @implements IIntentBatch + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IIntentBatch=} [properties] Properties to set + */ + function IntentBatch(properties) { + this.intents = []; + 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 RbmSuggestedReply message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestedReply.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.postbackData != null && message.hasOwnProperty("postbackData")) - if (!$util.isString(message.postbackData)) - return "postbackData: string expected"; - return null; - }; + /** + * IntentBatch intents. + * @member {Array.} intents + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @instance + */ + IntentBatch.prototype.intents = $util.emptyArray; - /** - * Creates a RbmSuggestedReply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} RbmSuggestedReply - */ - RbmSuggestedReply.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply(); - if (object.text != null) - message.text = String(object.text); - if (object.postbackData != null) - message.postbackData = String(object.postbackData); - return message; - }; + /** + * Creates a new IntentBatch instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {google.cloud.dialogflow.v2beta1.IIntentBatch=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch instance + */ + IntentBatch.create = function create(properties) { + return new IntentBatch(properties); + }; - /** - * Creates a plain object from a RbmSuggestedReply message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply} message RbmSuggestedReply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestedReply.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.postbackData = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.postbackData != null && message.hasOwnProperty("postbackData")) - object.postbackData = message.postbackData; - return object; - }; + /** + * Encodes the specified IntentBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {google.cloud.dialogflow.v2beta1.IIntentBatch} message IntentBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentBatch.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.v2beta1.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Converts this RbmSuggestedReply to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestedReply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified IntentBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {google.cloud.dialogflow.v2beta1.IIntentBatch} message IntentBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentBatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return RbmSuggestedReply; - })(); + /** + * Decodes an IntentBatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentBatch.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.v2beta1.IntentBatch(); + 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.v2beta1.Intent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Message.RbmSuggestedAction = (function() { + /** + * Decodes an IntentBatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentBatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a RbmSuggestedAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IRbmSuggestedAction - * @property {string|null} [text] RbmSuggestedAction text - * @property {string|null} [postbackData] RbmSuggestedAction postbackData - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null} [dial] RbmSuggestedAction dial - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null} [openUrl] RbmSuggestedAction openUrl - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null} [shareLocation] RbmSuggestedAction shareLocation - */ + /** + * Verifies an IntentBatch message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentBatch.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.v2beta1.Intent.verify(message.intents[i]); + if (error) + return "intents." + error; + } + } + return null; + }; - /** - * Constructs a new RbmSuggestedAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a RbmSuggestedAction. - * @implements IRbmSuggestedAction - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction=} [properties] Properties to set - */ - function RbmSuggestedAction(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 an IntentBatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + */ + IntentBatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.IntentBatch) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.IntentBatch(); + if (object.intents) { + if (!Array.isArray(object.intents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.IntentBatch.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.v2beta1.IntentBatch.intents: object expected"); + message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); } + } + return message; + }; - /** - * RbmSuggestedAction text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - RbmSuggestedAction.prototype.text = ""; + /** + * Creates a plain object from an IntentBatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @static + * @param {google.cloud.dialogflow.v2beta1.IntentBatch} message IntentBatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentBatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.intents = []; + if (message.intents && message.intents.length) { + object.intents = []; + for (var j = 0; j < message.intents.length; ++j) + object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + } + return object; + }; - /** - * RbmSuggestedAction postbackData. - * @member {string} postbackData - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - RbmSuggestedAction.prototype.postbackData = ""; + /** + * Converts this IntentBatch to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @instance + * @returns {Object.} JSON object + */ + IntentBatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * RbmSuggestedAction dial. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial|null|undefined} dial - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - RbmSuggestedAction.prototype.dial = null; + return IntentBatch; + })(); - /** - * RbmSuggestedAction openUrl. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri|null|undefined} openUrl - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - RbmSuggestedAction.prototype.openUrl = null; + v2beta1.SessionEntityTypes = (function() { - /** - * RbmSuggestedAction shareLocation. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation|null|undefined} shareLocation - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - RbmSuggestedAction.prototype.shareLocation = null; + /** + * Constructs a new SessionEntityTypes service. + * @memberof google.cloud.dialogflow.v2beta1 + * @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); + } - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; - /** - * RbmSuggestedAction action. - * @member {"dial"|"openUrl"|"shareLocation"|undefined} action - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - */ - Object.defineProperty(RbmSuggestedAction.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["dial", "openUrl", "shareLocation"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates new SessionEntityTypes service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.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); + }; - /** - * Creates a new RbmSuggestedAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction instance - */ - RbmSuggestedAction.create = function create(properties) { - return new RbmSuggestedAction(properties); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#listSessionEntityTypes}. + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @typedef ListSessionEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse + */ - /** - * Encodes the specified RbmSuggestedAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction} message RbmSuggestedAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedAction.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.postbackData != null && Object.hasOwnProperty.call(message, "postbackData")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.postbackData); - if (message.dial != null && Object.hasOwnProperty.call(message, "dial")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.encode(message.dial, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.openUrl != null && Object.hasOwnProperty.call(message, "openUrl")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.encode(message.openUrl, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.shareLocation != null && Object.hasOwnProperty.call(message, "shareLocation")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.encode(message.shareLocation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse, request, callback); + }, "name", { value: "ListSessionEntityTypes" }); + + /** + * Calls ListSessionEntityTypes. + * @function listSessionEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#getSessionEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @typedef GetSessionEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + */ + + /** + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); + }, "name", { value: "GetSessionEntityType" }); - /** - * Encodes the specified RbmSuggestedAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IRbmSuggestedAction} message RbmSuggestedAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetSessionEntityType. + * @function getSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a RbmSuggestedAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedAction.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.v2beta1.Intent.Message.RbmSuggestedAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.postbackData = reader.string(); - break; - case 3: - message.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.decode(reader, reader.uint32()); - break; - case 4: - message.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.decode(reader, reader.uint32()); - break; - case 5: - message.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#createSessionEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @typedef CreateSessionEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + */ - /** - * Decodes a RbmSuggestedAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedAction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { + return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); + }, "name", { value: "CreateSessionEntityType" }); - /** - * Verifies a RbmSuggestedAction message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestedAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.postbackData != null && message.hasOwnProperty("postbackData")) - if (!$util.isString(message.postbackData)) - return "postbackData: string expected"; - if (message.dial != null && message.hasOwnProperty("dial")) { - properties.action = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify(message.dial); - if (error) - return "dial." + error; - } - } - if (message.openUrl != null && message.hasOwnProperty("openUrl")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify(message.openUrl); - if (error) - return "openUrl." + error; - } - } - if (message.shareLocation != null && message.hasOwnProperty("shareLocation")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify(message.shareLocation); - if (error) - return "shareLocation." + error; - } - } - return null; - }; + /** + * Calls CreateSessionEntityType. + * @function createSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a RbmSuggestedAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} RbmSuggestedAction - */ - RbmSuggestedAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction(); - if (object.text != null) - message.text = String(object.text); - if (object.postbackData != null) - message.postbackData = String(object.postbackData); - if (object.dial != null) { - if (typeof object.dial !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.dial: object expected"); - message.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.fromObject(object.dial); - } - if (object.openUrl != null) { - if (typeof object.openUrl !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.openUrl: object expected"); - message.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.fromObject(object.openUrl); - } - if (object.shareLocation != null) { - if (typeof object.shareLocation !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.shareLocation: object expected"); - message.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.fromObject(object.shareLocation); - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#updateSessionEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @typedef UpdateSessionEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + */ - /** - * Creates a plain object from a RbmSuggestedAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction} message RbmSuggestedAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestedAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.postbackData = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.postbackData != null && message.hasOwnProperty("postbackData")) - object.postbackData = message.postbackData; - if (message.dial != null && message.hasOwnProperty("dial")) { - object.dial = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.toObject(message.dial, options); - if (options.oneofs) - object.action = "dial"; - } - if (message.openUrl != null && message.hasOwnProperty("openUrl")) { - object.openUrl = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.toObject(message.openUrl, options); - if (options.oneofs) - object.action = "openUrl"; - } - if (message.shareLocation != null && message.hasOwnProperty("shareLocation")) { - object.shareLocation = $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.toObject(message.shareLocation, options); - if (options.oneofs) - object.action = "shareLocation"; - } - return object; - }; + /** + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); + }, "name", { value: "UpdateSessionEntityType" }); - /** - * Converts this RbmSuggestedAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestedAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls UpdateSessionEntityType. + * @function updateSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - RbmSuggestedAction.RbmSuggestedActionDial = (function() { + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#deleteSessionEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @typedef DeleteSessionEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Properties of a RbmSuggestedActionDial. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @interface IRbmSuggestedActionDial - * @property {string|null} [phoneNumber] RbmSuggestedActionDial phoneNumber - */ + /** + * Calls DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSessionEntityType" }); - /** - * Constructs a new RbmSuggestedActionDial. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @classdesc Represents a RbmSuggestedActionDial. - * @implements IRbmSuggestedActionDial - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial=} [properties] Properties to set - */ - function RbmSuggestedActionDial(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 DeleteSessionEntityType. + * @function deleteSessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * RbmSuggestedActionDial phoneNumber. - * @member {string} phoneNumber - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @instance - */ - RbmSuggestedActionDial.prototype.phoneNumber = ""; + return SessionEntityTypes; + })(); - /** - * Creates a new RbmSuggestedActionDial instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial instance - */ - RbmSuggestedActionDial.create = function create(properties) { - return new RbmSuggestedActionDial(properties); - }; + v2beta1.SessionEntityType = (function() { - /** - * Encodes the specified RbmSuggestedActionDial message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial} message RbmSuggestedActionDial message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionDial.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phoneNumber); - return writer; - }; + /** + * Properties of a SessionEntityType. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ISessionEntityType + * @property {string|null} [name] SessionEntityType name + * @property {google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode + * @property {Array.|null} [entities] SessionEntityType entities + */ - /** - * Encodes the specified RbmSuggestedActionDial message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionDial} message RbmSuggestedActionDial message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionDial.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new SessionEntityType. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a SessionEntityType. + * @implements ISessionEntityType + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * Decodes a RbmSuggestedActionDial message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionDial.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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.phoneNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * SessionEntityType name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @instance + */ + SessionEntityType.prototype.name = ""; - /** - * Decodes a RbmSuggestedActionDial message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionDial.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SessionEntityType entityOverrideMode. + * @member {google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode} entityOverrideMode + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @instance + */ + SessionEntityType.prototype.entityOverrideMode = 0; - /** - * Verifies a RbmSuggestedActionDial message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestedActionDial.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - return null; - }; + /** + * SessionEntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @instance + */ + SessionEntityType.prototype.entities = $util.emptyArray; + + /** + * Creates a new SessionEntityType instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType instance + */ + SessionEntityType.create = function create(properties) { + return new SessionEntityType(properties); + }; + + /** + * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEntityType.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 2, wireType 0 =*/16).int32(message.entityOverrideMode); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Creates a RbmSuggestedActionDial message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} RbmSuggestedActionDial - */ - RbmSuggestedActionDial.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; + /** + * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a RbmSuggestedActionDial message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial} message RbmSuggestedActionDial - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestedActionDial.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.phoneNumber = ""; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = message.phoneNumber; - return object; - }; + /** + * Decodes a SessionEntityType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.SessionEntityType} SessionEntityType + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SessionEntityType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.entityOverrideMode = reader.int32(); + break; + case 3: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this RbmSuggestedActionDial to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestedActionDial.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return RbmSuggestedActionDial; - })(); + /** + * Verifies a SessionEntityType message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @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) { + 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; + } + 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.v2beta1.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + return null; + }; - RbmSuggestedAction.RbmSuggestedActionOpenUri = (function() { + /** + * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType + */ + SessionEntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SessionEntityType) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.SessionEntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); + } + } + return message; + }; - /** - * Properties of a RbmSuggestedActionOpenUri. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @interface IRbmSuggestedActionOpenUri - * @property {string|null} [uri] RbmSuggestedActionOpenUri uri - */ + /** + * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} message SessionEntityType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEntityType.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 (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.v2beta1.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.v2beta1.EntityType.Entity.toObject(message.entities[j], options); + } + return object; + }; - /** - * Constructs a new RbmSuggestedActionOpenUri. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @classdesc Represents a RbmSuggestedActionOpenUri. - * @implements IRbmSuggestedActionOpenUri - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri=} [properties] Properties to set - */ - function RbmSuggestedActionOpenUri(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 SessionEntityType to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @instance + * @returns {Object.} JSON object + */ + SessionEntityType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * RbmSuggestedActionOpenUri uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @instance - */ - RbmSuggestedActionOpenUri.prototype.uri = ""; + /** + * EntityOverrideMode enum. + * @name google.cloud.dialogflow.v2beta1.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; + })(); - /** - * Creates a new RbmSuggestedActionOpenUri instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri instance - */ - RbmSuggestedActionOpenUri.create = function create(properties) { - return new RbmSuggestedActionOpenUri(properties); - }; + return SessionEntityType; + })(); - /** - * Encodes the specified RbmSuggestedActionOpenUri message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionOpenUri.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); - return writer; - }; + v2beta1.ListSessionEntityTypesRequest = (function() { - /** - * Encodes the specified RbmSuggestedActionOpenUri message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionOpenUri.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ListSessionEntityTypesRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListSessionEntityTypesRequest + * @property {string|null} [parent] ListSessionEntityTypesRequest parent + * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize + * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken + */ - /** - * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionOpenUri.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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.uri = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new ListSessionEntityTypesRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListSessionEntityTypesRequest. + * @implements IListSessionEntityTypesRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest=} [properties] Properties to set + */ + function ListSessionEntityTypesRequest(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]]; + } - /** - * Decodes a RbmSuggestedActionOpenUri message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionOpenUri.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ListSessionEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.parent = ""; - /** - * Verifies a RbmSuggestedActionOpenUri message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestedActionOpenUri.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"; - return null; - }; + /** + * ListSessionEntityTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.pageSize = 0; - /** - * Creates a RbmSuggestedActionOpenUri message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} RbmSuggestedActionOpenUri - */ - RbmSuggestedActionOpenUri.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; + /** + * ListSessionEntityTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @instance + */ + ListSessionEntityTypesRequest.prototype.pageToken = ""; - /** - * Creates a plain object from a RbmSuggestedActionOpenUri message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri} message RbmSuggestedActionOpenUri - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestedActionOpenUri.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; + /** + * Creates a new ListSessionEntityTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance + */ + ListSessionEntityTypesRequest.create = function create(properties) { + return new ListSessionEntityTypesRequest(properties); + }; - /** - * Converts this RbmSuggestedActionOpenUri to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestedActionOpenUri.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.v2beta1.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; + }; - return RbmSuggestedActionOpenUri; - })(); + /** + * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - RbmSuggestedAction.RbmSuggestedActionShareLocation = (function() { + /** + * Verifies a ListSessionEntityTypesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + 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; + }; - /** - * Properties of a RbmSuggestedActionShareLocation. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @interface IRbmSuggestedActionShareLocation - */ + /** + * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest + */ + ListSessionEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.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; + }; - /** - * Constructs a new RbmSuggestedActionShareLocation. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction - * @classdesc Represents a RbmSuggestedActionShareLocation. - * @implements IRbmSuggestedActionShareLocation - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation=} [properties] Properties to set - */ - function RbmSuggestedActionShareLocation(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 ListSessionEntityTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + }; - /** - * Creates a new RbmSuggestedActionShareLocation instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation instance - */ - RbmSuggestedActionShareLocation.create = function create(properties) { - return new RbmSuggestedActionShareLocation(properties); - }; + /** + * Converts this ListSessionEntityTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified RbmSuggestedActionShareLocation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionShareLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + return ListSessionEntityTypesRequest; + })(); - /** - * Encodes the specified RbmSuggestedActionShareLocation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.IRbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RbmSuggestedActionShareLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.ListSessionEntityTypesResponse = (function() { - /** - * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionShareLocation.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.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of a ListSessionEntityTypesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListSessionEntityTypesResponse + * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes + * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken + */ - /** - * Decodes a RbmSuggestedActionShareLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RbmSuggestedActionShareLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new ListSessionEntityTypesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListSessionEntityTypesResponse. + * @implements IListSessionEntityTypesResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse=} [properties] Properties to set + */ + 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]]; + } - /** - * Verifies a RbmSuggestedActionShareLocation message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RbmSuggestedActionShareLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * ListSessionEntityTypesResponse sessionEntityTypes. + * @member {Array.} sessionEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @instance + */ + ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; - /** - * Creates a RbmSuggestedActionShareLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} RbmSuggestedActionShareLocation - */ - RbmSuggestedActionShareLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation) - return object; - return new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation(); - }; + /** + * ListSessionEntityTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @instance + */ + ListSessionEntityTypesResponse.prototype.nextPageToken = ""; - /** - * Creates a plain object from a RbmSuggestedActionShareLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation} message RbmSuggestedActionShareLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RbmSuggestedActionShareLocation.toObject = function toObject() { - return {}; - }; + /** + * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance + */ + ListSessionEntityTypesResponse.create = function create(properties) { + return new ListSessionEntityTypesResponse(properties); + }; - /** - * Converts this RbmSuggestedActionShareLocation to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation - * @instance - * @returns {Object.} JSON object - */ - RbmSuggestedActionShareLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesResponse.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.v2beta1.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; + }; - return RbmSuggestedActionShareLocation; - })(); + /** + * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return RbmSuggestedAction; - })(); + /** + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse(); + 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.v2beta1.SessionEntityType.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Message.MediaContent = (function() { + /** + * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a MediaContent. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IMediaContent - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType|null} [mediaType] MediaContent mediaType - * @property {Array.|null} [mediaObjects] MediaContent mediaObjects - */ + /** + * Verifies a ListSessionEntityTypesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @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) { + 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.v2beta1.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; + }; - /** - * Constructs a new MediaContent. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a MediaContent. - * @implements IMediaContent - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent=} [properties] Properties to set - */ - function MediaContent(properties) { - this.mediaObjects = []; - 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 ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + */ + ListSessionEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse(); + if (object.sessionEntityTypes) { + if (!Array.isArray(object.sessionEntityTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); + message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityTypes[i]); } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * MediaContent mediaType. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType} mediaType - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @instance - */ - MediaContent.prototype.mediaType = 0; + /** + * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSessionEntityTypesResponse.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.v2beta1.SessionEntityType.toObject(message.sessionEntityTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSessionEntityTypesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MediaContent mediaObjects. - * @member {Array.} mediaObjects - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @instance - */ - MediaContent.prototype.mediaObjects = $util.emptyArray; + return ListSessionEntityTypesResponse; + })(); - /** - * Creates a new MediaContent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent instance - */ - MediaContent.create = function create(properties) { - return new MediaContent(properties); - }; + v2beta1.GetSessionEntityTypeRequest = (function() { - /** - * Encodes the specified MediaContent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent} message MediaContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mediaType); - if (message.mediaObjects != null && message.mediaObjects.length) - for (var i = 0; i < message.mediaObjects.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.encode(message.mediaObjects[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Properties of a GetSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGetSessionEntityTypeRequest + * @property {string|null} [name] GetSessionEntityTypeRequest name + */ - /** - * Encodes the specified MediaContent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IMediaContent} message MediaContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new GetSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GetSessionEntityTypeRequest. + * @implements IGetSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest=} [properties] Properties to set + */ + function GetSessionEntityTypeRequest(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]]; + } - /** - * Decodes a MediaContent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaContent.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.v2beta1.Intent.Message.MediaContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.mediaType = reader.int32(); - break; - case 2: - if (!(message.mediaObjects && message.mediaObjects.length)) - message.mediaObjects = []; - message.mediaObjects.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GetSessionEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @instance + */ + GetSessionEntityTypeRequest.prototype.name = ""; - /** - * Decodes a MediaContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance + */ + GetSessionEntityTypeRequest.create = function create(properties) { + return new GetSessionEntityTypeRequest(properties); + }; - /** - * Verifies a MediaContent message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MediaContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - switch (message.mediaType) { - default: - return "mediaType: enum value expected"; - case 0: - case 1: - break; - } - if (message.mediaObjects != null && message.hasOwnProperty("mediaObjects")) { - if (!Array.isArray(message.mediaObjects)) - return "mediaObjects: array expected"; - for (var i = 0; i < message.mediaObjects.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify(message.mediaObjects[i]); - if (error) - return "mediaObjects." + error; - } - } - return null; - }; + /** + * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSessionEntityTypeRequest.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; + }; - /** - * Creates a MediaContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} MediaContent - */ - MediaContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent(); - switch (object.mediaType) { - case "RESPONSE_MEDIA_TYPE_UNSPECIFIED": - case 0: - message.mediaType = 0; - break; - case "AUDIO": - case 1: - message.mediaType = 1; - break; - } - if (object.mediaObjects) { - if (!Array.isArray(object.mediaObjects)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.mediaObjects: array expected"); - message.mediaObjects = []; - for (var i = 0; i < object.mediaObjects.length; ++i) { - if (typeof object.mediaObjects[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.mediaObjects: object expected"); - message.mediaObjects[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.fromObject(object.mediaObjects[i]); - } - } - return message; - }; + /** + * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a MediaContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent} message MediaContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MediaContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.mediaObjects = []; - if (options.defaults) - object.mediaType = options.enums === String ? "RESPONSE_MEDIA_TYPE_UNSPECIFIED" : 0; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType[message.mediaType] : message.mediaType; - if (message.mediaObjects && message.mediaObjects.length) { - object.mediaObjects = []; - for (var j = 0; j < message.mediaObjects.length; ++j) - object.mediaObjects[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.toObject(message.mediaObjects[j], options); - } - return object; - }; + /** + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest(); + 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; + }; - /** - * Converts this MediaContent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @instance - * @returns {Object.} JSON object - */ - MediaContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResponseMediaType enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType - * @enum {number} - * @property {number} RESPONSE_MEDIA_TYPE_UNSPECIFIED=0 RESPONSE_MEDIA_TYPE_UNSPECIFIED value - * @property {number} AUDIO=1 AUDIO value - */ - MediaContent.ResponseMediaType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESPONSE_MEDIA_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO"] = 1; - return values; - })(); + /** + * Verifies a GetSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @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) { + 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; + }; - MediaContent.ResponseMediaObject = (function() { + /** + * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + */ + GetSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of a ResponseMediaObject. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @interface IResponseMediaObject - * @property {string|null} [name] ResponseMediaObject name - * @property {string|null} [description] ResponseMediaObject description - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [largeImage] ResponseMediaObject largeImage - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [icon] ResponseMediaObject icon - * @property {string|null} [contentUrl] ResponseMediaObject contentUrl - */ + /** + * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSessionEntityTypeRequest.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; + }; - /** - * Constructs a new ResponseMediaObject. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent - * @classdesc Represents a ResponseMediaObject. - * @implements IResponseMediaObject - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject=} [properties] Properties to set - */ - function ResponseMediaObject(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 GetSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ResponseMediaObject name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - ResponseMediaObject.prototype.name = ""; + return GetSessionEntityTypeRequest; + })(); - /** - * ResponseMediaObject description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - ResponseMediaObject.prototype.description = ""; + v2beta1.CreateSessionEntityTypeRequest = (function() { - /** - * ResponseMediaObject largeImage. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} largeImage - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - ResponseMediaObject.prototype.largeImage = null; + /** + * Properties of a CreateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ICreateSessionEntityTypeRequest + * @property {string|null} [parent] CreateSessionEntityTypeRequest parent + * @property {google.cloud.dialogflow.v2beta1.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType + */ - /** - * ResponseMediaObject icon. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} icon - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - ResponseMediaObject.prototype.icon = null; + /** + * Constructs a new CreateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CreateSessionEntityTypeRequest. + * @implements ICreateSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest=} [properties] Properties to set + */ + function CreateSessionEntityTypeRequest(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]]; + } - /** - * ResponseMediaObject contentUrl. - * @member {string} contentUrl - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - ResponseMediaObject.prototype.contentUrl = ""; + /** + * CreateSessionEntityTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @instance + */ + CreateSessionEntityTypeRequest.prototype.parent = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CreateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.v2beta1.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @instance + */ + CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + + /** + * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance + */ + CreateSessionEntityTypeRequest.create = function create(properties) { + return new CreateSessionEntityTypeRequest(properties); + }; + + /** + * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSessionEntityTypeRequest.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.v2beta1.SessionEntityType.encode(message.sessionEntityType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * ResponseMediaObject image. - * @member {"largeImage"|"icon"|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - */ - Object.defineProperty(ResponseMediaObject.prototype, "image", { - get: $util.oneOfGetter($oneOfFields = ["largeImage", "icon"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ResponseMediaObject instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject instance - */ - ResponseMediaObject.create = function create(properties) { - return new ResponseMediaObject(properties); - }; + /** + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest(); + 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.v2beta1.SessionEntityType.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ResponseMediaObject message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject} message ResponseMediaObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMediaObject.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.largeImage != null && Object.hasOwnProperty.call(message, "largeImage")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.largeImage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.icon != null && Object.hasOwnProperty.call(message, "icon")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.icon, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.contentUrl != null && Object.hasOwnProperty.call(message, "contentUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.contentUrl); - return writer; - }; + /** + * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ResponseMediaObject message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.IResponseMediaObject} message ResponseMediaObject message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseMediaObject.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a CreateSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @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) { + 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.v2beta1.SessionEntityType.verify(message.sessionEntityType); + if (error) + return "sessionEntityType." + error; + } + return null; + }; - /** - * Decodes a ResponseMediaObject message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMediaObject.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.v2beta1.Intent.Message.MediaContent.ResponseMediaObject(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 4: - message.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 5: - message.contentUrl = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + */ + CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityType); + } + return message; + }; - /** - * Decodes a ResponseMediaObject message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseMediaObject.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSessionEntityTypeRequest.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.v2beta1.SessionEntityType.toObject(message.sessionEntityType, options); + return object; + }; - /** - * Verifies a ResponseMediaObject message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseMediaObject.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.largeImage != null && message.hasOwnProperty("largeImage")) { - properties.image = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.largeImage); - if (error) - return "largeImage." + error; - } - } - if (message.icon != null && message.hasOwnProperty("icon")) { - if (properties.image === 1) - return "image: multiple values"; - properties.image = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.icon); - if (error) - return "icon." + error; - } - } - if (message.contentUrl != null && message.hasOwnProperty("contentUrl")) - if (!$util.isString(message.contentUrl)) - return "contentUrl: string expected"; - return null; - }; + /** + * Converts this CreateSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a ResponseMediaObject message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} ResponseMediaObject - */ - ResponseMediaObject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.largeImage != null) { - if (typeof object.largeImage !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.largeImage: object expected"); - message.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.largeImage); - } - if (object.icon != null) { - if (typeof object.icon !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.icon: object expected"); - message.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.icon); - } - if (object.contentUrl != null) - message.contentUrl = String(object.contentUrl); - return message; - }; + return CreateSessionEntityTypeRequest; + })(); - /** - * Creates a plain object from a ResponseMediaObject message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject} message ResponseMediaObject - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseMediaObject.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.contentUrl = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.largeImage != null && message.hasOwnProperty("largeImage")) { - object.largeImage = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.largeImage, options); - if (options.oneofs) - object.image = "largeImage"; - } - if (message.icon != null && message.hasOwnProperty("icon")) { - object.icon = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.icon, options); - if (options.oneofs) - object.image = "icon"; - } - if (message.contentUrl != null && message.hasOwnProperty("contentUrl")) - object.contentUrl = message.contentUrl; - return object; - }; + v2beta1.UpdateSessionEntityTypeRequest = (function() { - /** - * Converts this ResponseMediaObject to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject - * @instance - * @returns {Object.} JSON object - */ - ResponseMediaObject.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an UpdateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IUpdateSessionEntityTypeRequest + * @property {google.cloud.dialogflow.v2beta1.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask + */ - return ResponseMediaObject; - })(); + /** + * Constructs a new UpdateSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an UpdateSessionEntityTypeRequest. + * @implements IUpdateSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + */ + function UpdateSessionEntityTypeRequest(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 MediaContent; - })(); + /** + * UpdateSessionEntityTypeRequest sessionEntityType. + * @member {google.cloud.dialogflow.v2beta1.ISessionEntityType|null|undefined} sessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @instance + */ + UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; - Message.BrowseCarouselCard = (function() { + /** + * UpdateSessionEntityTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @instance + */ + UpdateSessionEntityTypeRequest.prototype.updateMask = null; - /** - * Properties of a BrowseCarouselCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IBrowseCarouselCard - * @property {Array.|null} [items] BrowseCarouselCard items - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions|null} [imageDisplayOptions] BrowseCarouselCard imageDisplayOptions - */ + /** + * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance + */ + UpdateSessionEntityTypeRequest.create = function create(properties) { + return new UpdateSessionEntityTypeRequest(properties); + }; - /** - * Constructs a new BrowseCarouselCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a BrowseCarouselCard. - * @implements IBrowseCarouselCard - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard=} [properties] Properties to set - */ - function BrowseCarouselCard(properties) { - this.items = []; - 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 UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) + $root.google.cloud.dialogflow.v2beta1.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; + }; - /** - * BrowseCarouselCard items. - * @member {Array.} items - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @instance - */ - BrowseCarouselCard.prototype.items = $util.emptyArray; + /** + * Encodes the specified UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * BrowseCarouselCard imageDisplayOptions. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions} imageDisplayOptions - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @instance - */ - BrowseCarouselCard.prototype.imageDisplayOptions = 0; + /** + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.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 BrowseCarouselCard instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard instance - */ - BrowseCarouselCard.create = function create(properties) { - return new BrowseCarouselCard(properties); - }; + /** + * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified BrowseCarouselCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard} message BrowseCarouselCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BrowseCarouselCard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.imageDisplayOptions != null && Object.hasOwnProperty.call(message, "imageDisplayOptions")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.imageDisplayOptions); - return writer; - }; + /** + * Verifies an UpdateSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) { + var error = $root.google.cloud.dialogflow.v2beta1.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 (error) + return "updateMask." + error; + } + return null; + }; - /** - * Encodes the specified BrowseCarouselCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IBrowseCarouselCard} message BrowseCarouselCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BrowseCarouselCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + */ + UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest(); + if (object.sessionEntityType != null) { + if (typeof object.sessionEntityType !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); + message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityType); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Decodes a BrowseCarouselCard message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BrowseCarouselCard.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.v2beta1.Intent.Message.BrowseCarouselCard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.decode(reader, reader.uint32())); - break; - case 2: - message.imageDisplayOptions = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sessionEntityType = null; + object.updateMask = null; + } + if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) + object.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.toObject(message.sessionEntityType, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Decodes a BrowseCarouselCard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BrowseCarouselCard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this UpdateSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a BrowseCarouselCard message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BrowseCarouselCard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify(message.items[i]); - if (error) - return "items." + error; - } - } - if (message.imageDisplayOptions != null && message.hasOwnProperty("imageDisplayOptions")) - switch (message.imageDisplayOptions) { - default: - return "imageDisplayOptions: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; + return UpdateSessionEntityTypeRequest; + })(); - /** - * Creates a BrowseCarouselCard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} BrowseCarouselCard - */ - BrowseCarouselCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items: object expected"); - message.items[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.fromObject(object.items[i]); - } - } - switch (object.imageDisplayOptions) { - case "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED": - case 0: - message.imageDisplayOptions = 0; - break; - case "GRAY": - case 1: - message.imageDisplayOptions = 1; - break; - case "WHITE": - case 2: - message.imageDisplayOptions = 2; - break; - case "CROPPED": - case 3: - message.imageDisplayOptions = 3; - break; - case "BLURRED_BACKGROUND": - case 4: - message.imageDisplayOptions = 4; - break; - } - return message; - }; + v2beta1.DeleteSessionEntityTypeRequest = (function() { - /** - * Creates a plain object from a BrowseCarouselCard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard} message BrowseCarouselCard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BrowseCarouselCard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (options.defaults) - object.imageDisplayOptions = options.enums === String ? "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED" : 0; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.toObject(message.items[j], options); - } - if (message.imageDisplayOptions != null && message.hasOwnProperty("imageDisplayOptions")) - object.imageDisplayOptions = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] : message.imageDisplayOptions; - return object; - }; + /** + * Properties of a DeleteSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IDeleteSessionEntityTypeRequest + * @property {string|null} [name] DeleteSessionEntityTypeRequest name + */ - /** - * Converts this BrowseCarouselCard to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @instance - * @returns {Object.} JSON object - */ - BrowseCarouselCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new DeleteSessionEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a DeleteSessionEntityTypeRequest. + * @implements IDeleteSessionEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + */ + function DeleteSessionEntityTypeRequest(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]]; + } - BrowseCarouselCard.BrowseCarouselCardItem = (function() { + /** + * DeleteSessionEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @instance + */ + DeleteSessionEntityTypeRequest.prototype.name = ""; - /** - * Properties of a BrowseCarouselCardItem. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @interface IBrowseCarouselCardItem - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null} [openUriAction] BrowseCarouselCardItem openUriAction - * @property {string|null} [title] BrowseCarouselCardItem title - * @property {string|null} [description] BrowseCarouselCardItem description - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] BrowseCarouselCardItem image - * @property {string|null} [footer] BrowseCarouselCardItem footer - */ + /** + * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance + */ + DeleteSessionEntityTypeRequest.create = function create(properties) { + return new DeleteSessionEntityTypeRequest(properties); + }; - /** - * Constructs a new BrowseCarouselCardItem. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard - * @classdesc Represents a BrowseCarouselCardItem. - * @implements IBrowseCarouselCardItem - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem=} [properties] Properties to set - */ - function BrowseCarouselCardItem(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 DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSessionEntityTypeRequest.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; + }; - /** - * BrowseCarouselCardItem openUriAction. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction|null|undefined} openUriAction - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - */ - BrowseCarouselCardItem.prototype.openUriAction = null; + /** + * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * BrowseCarouselCardItem title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - */ - BrowseCarouselCardItem.prototype.title = ""; + /** + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest(); + 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; + }; - /** - * BrowseCarouselCardItem description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - */ - BrowseCarouselCardItem.prototype.description = ""; + /** + * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * BrowseCarouselCardItem image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - */ - BrowseCarouselCardItem.prototype.image = null; + /** + * Verifies a DeleteSessionEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @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) { + 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; + }; - /** - * BrowseCarouselCardItem footer. - * @member {string} footer - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - */ - BrowseCarouselCardItem.prototype.footer = ""; + /** + * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + */ + DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSessionEntityTypeRequest.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; + }; - /** - * Creates a new BrowseCarouselCardItem instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem instance - */ - BrowseCarouselCardItem.create = function create(properties) { - return new BrowseCarouselCardItem(properties); - }; + /** + * Converts this DeleteSessionEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified BrowseCarouselCardItem message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem} message BrowseCarouselCardItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BrowseCarouselCardItem.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.openUriAction != null && Object.hasOwnProperty.call(message, "openUriAction")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.encode(message.openUriAction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.footer != null && Object.hasOwnProperty.call(message, "footer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.footer); - return writer; - }; + return DeleteSessionEntityTypeRequest; + })(); - /** - * Encodes the specified BrowseCarouselCardItem message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.IBrowseCarouselCardItem} message BrowseCarouselCardItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BrowseCarouselCardItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.EntityTypes = (function() { - /** - * Decodes a BrowseCarouselCardItem message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BrowseCarouselCardItem.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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.decode(reader, reader.uint32()); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 5: - message.footer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new EntityTypes service. + * @memberof google.cloud.dialogflow.v2beta1 + * @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); + } - /** - * Decodes a BrowseCarouselCardItem message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BrowseCarouselCardItem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + (EntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EntityTypes; - /** - * Verifies a BrowseCarouselCardItem message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BrowseCarouselCardItem.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify(message.openUriAction); - if (error) - return "openUriAction." + error; - } - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - if (message.footer != null && message.hasOwnProperty("footer")) - if (!$util.isString(message.footer)) - return "footer: string expected"; - return null; - }; + /** + * Creates new EntityTypes service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.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); + }; - /** - * Creates a BrowseCarouselCardItem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} BrowseCarouselCardItem - */ - BrowseCarouselCardItem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem(); - if (object.openUriAction != null) { - if (typeof object.openUriAction !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.openUriAction: object expected"); - message.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.fromObject(object.openUriAction); - } - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - if (object.footer != null) - message.footer = String(object.footer); - return message; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#listEntityTypes}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef ListEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse + */ - /** - * Creates a plain object from a BrowseCarouselCardItem message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem} message BrowseCarouselCardItem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BrowseCarouselCardItem.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.openUriAction = null; - object.title = ""; - object.description = ""; - object.image = null; - object.footer = ""; - } - if (message.openUriAction != null && message.hasOwnProperty("openUriAction")) - object.openUriAction = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.toObject(message.openUriAction, options); - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - if (message.footer != null && message.hasOwnProperty("footer")) - object.footer = message.footer; - return object; - }; + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse, request, callback); + }, "name", { value: "ListEntityTypes" }); - /** - * Converts this BrowseCarouselCardItem to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @instance - * @returns {Object.} JSON object - */ - BrowseCarouselCardItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ListEntityTypes. + * @function listEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - BrowseCarouselCardItem.OpenUrlAction = (function() { + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#getEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef GetEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType + */ - /** - * Properties of an OpenUrlAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @interface IOpenUrlAction - * @property {string|null} [url] OpenUrlAction url - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint|null} [urlTypeHint] OpenUrlAction urlTypeHint - */ + /** + * Calls GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); + }, "name", { value: "GetEntityType" }); - /** - * Constructs a new OpenUrlAction. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem - * @classdesc Represents an OpenUrlAction. - * @implements IOpenUrlAction - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction=} [properties] Properties to set - */ - function OpenUrlAction(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 GetEntityType. + * @function getEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * OpenUrlAction url. - * @member {string} url - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @instance - */ - OpenUrlAction.prototype.url = ""; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#createEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef CreateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType + */ - /** - * OpenUrlAction urlTypeHint. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint} urlTypeHint - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @instance - */ - OpenUrlAction.prototype.urlTypeHint = 0; + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); + }, "name", { value: "CreateEntityType" }); - /** - * Creates a new OpenUrlAction instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction instance - */ - OpenUrlAction.create = function create(properties) { - return new OpenUrlAction(properties); - }; + /** + * Calls CreateEntityType. + * @function createEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified OpenUrlAction message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction} message OpenUrlAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpenUrlAction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.urlTypeHint != null && Object.hasOwnProperty.call(message, "urlTypeHint")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.urlTypeHint); - return writer; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#updateEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef UpdateEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType + */ - /** - * Encodes the specified OpenUrlAction message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.IOpenUrlAction} message OpenUrlAction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpenUrlAction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); + }, "name", { value: "UpdateEntityType" }); - /** - * Decodes an OpenUrlAction message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpenUrlAction.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.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 3: - message.urlTypeHint = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls UpdateEntityType. + * @function updateEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes an OpenUrlAction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpenUrlAction.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.v2beta1.EntityTypes#deleteEntityType}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef DeleteEntityTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Verifies an OpenUrlAction message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OpenUrlAction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.urlTypeHint != null && message.hasOwnProperty("urlTypeHint")) - switch (message.urlTypeHint) { - default: - return "urlTypeHint: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntityType" }); - /** - * Creates an OpenUrlAction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} OpenUrlAction - */ - OpenUrlAction.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction(); - if (object.url != null) - message.url = String(object.url); - switch (object.urlTypeHint) { - case "URL_TYPE_HINT_UNSPECIFIED": - case 0: - message.urlTypeHint = 0; - break; - case "AMP_ACTION": - case 1: - message.urlTypeHint = 1; - break; - case "AMP_CONTENT": - case 2: - message.urlTypeHint = 2; - break; - } - return message; - }; + /** + * Calls DeleteEntityType. + * @function deleteEntityType + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from an OpenUrlAction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction} message OpenUrlAction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OpenUrlAction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.url = ""; - object.urlTypeHint = options.enums === String ? "URL_TYPE_HINT_UNSPECIFIED" : 0; - } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.urlTypeHint != null && message.hasOwnProperty("urlTypeHint")) - object.urlTypeHint = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] : message.urlTypeHint; - return object; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntityTypes}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef BatchUpdateEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Converts this OpenUrlAction to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction - * @instance - * @returns {Object.} JSON object - */ - OpenUrlAction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls BatchUpdateEntityTypes. + * @function batchUpdateEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} request BatchUpdateEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.batchUpdateEntityTypes = function batchUpdateEntityTypes(request, callback) { + return this.rpcCall(batchUpdateEntityTypes, $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchUpdateEntityTypes" }); - /** - * UrlTypeHint enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint - * @enum {number} - * @property {number} URL_TYPE_HINT_UNSPECIFIED=0 URL_TYPE_HINT_UNSPECIFIED value - * @property {number} AMP_ACTION=1 AMP_ACTION value - * @property {number} AMP_CONTENT=2 AMP_CONTENT value - */ - OpenUrlAction.UrlTypeHint = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "URL_TYPE_HINT_UNSPECIFIED"] = 0; - values[valuesById[1] = "AMP_ACTION"] = 1; - values[valuesById[2] = "AMP_CONTENT"] = 2; - return values; - })(); + /** + * Calls BatchUpdateEntityTypes. + * @function batchUpdateEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} request BatchUpdateEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return OpenUrlAction; - })(); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntityTypes}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef BatchDeleteEntityTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - return BrowseCarouselCardItem; - })(); + /** + * Calls BatchDeleteEntityTypes. + * @function batchDeleteEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} request BatchDeleteEntityTypesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.batchDeleteEntityTypes = function batchDeleteEntityTypes(request, callback) { + return this.rpcCall(batchDeleteEntityTypes, $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchDeleteEntityTypes" }); - /** - * ImageDisplayOptions enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions - * @enum {number} - * @property {number} IMAGE_DISPLAY_OPTIONS_UNSPECIFIED=0 IMAGE_DISPLAY_OPTIONS_UNSPECIFIED value - * @property {number} GRAY=1 GRAY value - * @property {number} WHITE=2 WHITE value - * @property {number} CROPPED=3 CROPPED value - * @property {number} BLURRED_BACKGROUND=4 BLURRED_BACKGROUND value - */ - BrowseCarouselCard.ImageDisplayOptions = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED"] = 0; - values[valuesById[1] = "GRAY"] = 1; - values[valuesById[2] = "WHITE"] = 2; - values[valuesById[3] = "CROPPED"] = 3; - values[valuesById[4] = "BLURRED_BACKGROUND"] = 4; - return values; - })(); + /** + * Calls BatchDeleteEntityTypes. + * @function batchDeleteEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} request BatchDeleteEntityTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return BrowseCarouselCard; - })(); + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchCreateEntities}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef BatchCreateEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - Message.TableCard = (function() { + /** + * Calls BatchCreateEntities. + * @function batchCreateEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} request BatchCreateEntitiesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntitiesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.batchCreateEntities = function batchCreateEntities(request, callback) { + return this.rpcCall(batchCreateEntities, $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchCreateEntities" }); - /** - * Properties of a TableCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITableCard - * @property {string|null} [title] TableCard title - * @property {string|null} [subtitle] TableCard subtitle - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null} [image] TableCard image - * @property {Array.|null} [columnProperties] TableCard columnProperties - * @property {Array.|null} [rows] TableCard rows - * @property {Array.|null} [buttons] TableCard buttons - */ + /** + * Calls BatchCreateEntities. + * @function batchCreateEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} request BatchCreateEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new TableCard. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TableCard. - * @implements ITableCard - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard=} [properties] Properties to set - */ - function TableCard(properties) { - this.columnProperties = []; - this.rows = []; - this.buttons = []; - 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.v2beta1.EntityTypes#batchUpdateEntities}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef BatchUpdateEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * TableCard title. - * @member {string} title - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.title = ""; + /** + * Calls BatchUpdateEntities. + * @function batchUpdateEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} request BatchUpdateEntitiesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntitiesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.batchUpdateEntities = function batchUpdateEntities(request, callback) { + return this.rpcCall(batchUpdateEntities, $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchUpdateEntities" }); - /** - * TableCard subtitle. - * @member {string} subtitle - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.subtitle = ""; + /** + * Calls BatchUpdateEntities. + * @function batchUpdateEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} request BatchUpdateEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * TableCard image. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.IImage|null|undefined} image - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.image = null; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntities}. + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @typedef BatchDeleteEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * TableCard columnProperties. - * @member {Array.} columnProperties - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.columnProperties = $util.emptyArray; + /** + * Calls BatchDeleteEntities. + * @function batchDeleteEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} request BatchDeleteEntitiesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntitiesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EntityTypes.prototype.batchDeleteEntities = function batchDeleteEntities(request, callback) { + return this.rpcCall(batchDeleteEntities, $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BatchDeleteEntities" }); - /** - * TableCard rows. - * @member {Array.} rows - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.rows = $util.emptyArray; + /** + * Calls BatchDeleteEntities. + * @function batchDeleteEntities + * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} request BatchDeleteEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * TableCard buttons. - * @member {Array.} buttons - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - */ - TableCard.prototype.buttons = $util.emptyArray; + return EntityTypes; + })(); - /** - * Creates a new TableCard instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard instance - */ - TableCard.create = function create(properties) { - return new TableCard(properties); - }; + v2beta1.EntityType = (function() { - /** - * Encodes the specified TableCard message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard} message TableCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.subtitle != null && Object.hasOwnProperty.call(message, "subtitle")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.columnProperties != null && message.columnProperties.length) - for (var i = 0; i < message.columnProperties.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.encode(message.columnProperties[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.encode(message.rows[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.buttons != null && message.buttons.length) - for (var i = 0; i < message.buttons.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.encode(message.buttons[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Properties of an EntityType. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IEntityType + * @property {string|null} [name] EntityType name + * @property {string|null} [displayName] EntityType displayName + * @property {google.cloud.dialogflow.v2beta1.EntityType.Kind|null} [kind] EntityType kind + * @property {google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode + * @property {Array.|null} [entities] EntityType entities + * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction + */ - /** - * Encodes the specified TableCard message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCard} message TableCard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new EntityType. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an EntityType. + * @implements IEntityType + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IEntityType=} [properties] Properties to set + */ + function EntityType(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]]; + } - /** - * Decodes a TableCard message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCard.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.v2beta1.Intent.Message.TableCard(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.subtitle = reader.string(); - break; - case 3: - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.columnProperties && message.columnProperties.length)) - message.columnProperties = []; - message.columnProperties.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.buttons && message.buttons.length)) - message.buttons = []; - message.buttons.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * EntityType name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.name = ""; + + /** + * EntityType displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.displayName = ""; - /** - * Decodes a TableCard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * EntityType kind. + * @member {google.cloud.dialogflow.v2beta1.EntityType.Kind} kind + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.kind = 0; - /** - * Verifies a TableCard message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableCard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - if (!$util.isString(message.subtitle)) - return "subtitle: string expected"; - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.verify(message.image); - if (error) - return "image." + error; - } - if (message.columnProperties != null && message.hasOwnProperty("columnProperties")) { - if (!Array.isArray(message.columnProperties)) - return "columnProperties: array expected"; - for (var i = 0; i < message.columnProperties.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify(message.columnProperties[i]); - if (error) - return "columnProperties." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.buttons != null && message.hasOwnProperty("buttons")) { - if (!Array.isArray(message.buttons)) - return "buttons: array expected"; - for (var i = 0; i < message.buttons.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.verify(message.buttons[i]); - if (error) - return "buttons." + error; - } - } - return null; - }; + /** + * EntityType autoExpansionMode. + * @member {google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode} autoExpansionMode + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.autoExpansionMode = 0; - /** - * Creates a TableCard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} TableCard - */ - TableCard.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCard(); - if (object.title != null) - message.title = String(object.title); - if (object.subtitle != null) - message.subtitle = String(object.subtitle); - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.image: object expected"); - message.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.fromObject(object.image); - } - if (object.columnProperties) { - if (!Array.isArray(object.columnProperties)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.columnProperties: array expected"); - message.columnProperties = []; - for (var i = 0; i < object.columnProperties.length; ++i) { - if (typeof object.columnProperties[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.columnProperties: object expected"); - message.columnProperties[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.fromObject(object.columnProperties[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.rows: object expected"); - message.rows[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.fromObject(object.rows[i]); - } - } - if (object.buttons) { - if (!Array.isArray(object.buttons)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.buttons: array expected"); - message.buttons = []; - for (var i = 0; i < object.buttons.length; ++i) { - if (typeof object.buttons[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.buttons: object expected"); - message.buttons[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.fromObject(object.buttons[i]); - } - } - return message; - }; + /** + * EntityType entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.entities = $util.emptyArray; - /** - * Creates a plain object from a TableCard message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCard} message TableCard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableCard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.columnProperties = []; - object.rows = []; - object.buttons = []; - } - if (options.defaults) { - object.title = ""; - object.subtitle = ""; - object.image = null; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) - object.subtitle = message.subtitle; - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.dialogflow.v2beta1.Intent.Message.Image.toObject(message.image, options); - if (message.columnProperties && message.columnProperties.length) { - object.columnProperties = []; - for (var j = 0; j < message.columnProperties.length; ++j) - object.columnProperties[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.toObject(message.columnProperties[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.toObject(message.rows[j], options); - } - if (message.buttons && message.buttons.length) { - object.buttons = []; - for (var j = 0; j < message.buttons.length; ++j) - object.buttons[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.toObject(message.buttons[j], options); - } - return object; - }; + /** + * EntityType enableFuzzyExtraction. + * @member {boolean} enableFuzzyExtraction + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + */ + EntityType.prototype.enableFuzzyExtraction = false; - /** - * Converts this TableCard to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCard - * @instance - * @returns {Object.} JSON object - */ - TableCard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new EntityType instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.IEntityType=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType instance + */ + EntityType.create = function create(properties) { + return new EntityType(properties); + }; - return TableCard; - })(); + /** + * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.IEntityType} message EntityType 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.v2beta1.EntityType.Entity.encode(message.entities[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; + }; - Message.ColumnProperties = (function() { + /** + * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.IEntityType} message EntityType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a ColumnProperties. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface IColumnProperties - * @property {string|null} [header] ColumnProperties header - * @property {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment|null} [horizontalAlignment] ColumnProperties horizontalAlignment - */ + /** + * Decodes an EntityType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType} EntityType + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.EntityType(); + 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.kind = reader.int32(); + break; + case 4: + message.autoExpansionMode = reader.int32(); + break; + case 6: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); + break; + case 7: + message.enableFuzzyExtraction = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new ColumnProperties. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a ColumnProperties. - * @implements IColumnProperties - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties=} [properties] Properties to set - */ - function ColumnProperties(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]]; + /** + * Decodes an EntityType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityType message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @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) { + 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.v2beta1.EntityType.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + if (typeof message.enableFuzzyExtraction !== "boolean") + return "enableFuzzyExtraction: boolean expected"; + return null; + }; + + /** + * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType + */ + EntityType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityType) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.EntityType.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); } + } + if (object.enableFuzzyExtraction != null) + message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); + return message; + }; + + /** + * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @static + * @param {google.cloud.dialogflow.v2beta1.EntityType} message EntityType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + 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.v2beta1.EntityType.Kind[message.kind] : message.kind; + if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType.Entity.toObject(message.entities[j], options); + } + if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) + object.enableFuzzyExtraction = message.enableFuzzyExtraction; + return object; + }; + + /** + * Converts this EntityType to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @instance + * @returns {Object.} JSON object + */ + EntityType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Kind enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + 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; + })(); - /** - * ColumnProperties header. - * @member {string} header - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @instance - */ - ColumnProperties.prototype.header = ""; + /** + * AutoExpansionMode enum. + * @name google.cloud.dialogflow.v2beta1.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 + */ + 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; + })(); - /** - * ColumnProperties horizontalAlignment. - * @member {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment} horizontalAlignment - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @instance - */ - ColumnProperties.prototype.horizontalAlignment = 0; + EntityType.Entity = (function() { - /** - * Creates a new ColumnProperties instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties instance - */ - ColumnProperties.create = function create(properties) { - return new ColumnProperties(properties); - }; + /** + * Properties of an Entity. + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @interface IEntity + * @property {string|null} [value] Entity value + * @property {Array.|null} [synonyms] Entity synonyms + */ - /** - * Encodes the specified ColumnProperties message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties} message ColumnProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.header); - if (message.horizontalAlignment != null && Object.hasOwnProperty.call(message, "horizontalAlignment")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.horizontalAlignment); - return writer; - }; + /** + * Constructs a new Entity. + * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.dialogflow.v2beta1.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]]; + } - /** - * Encodes the specified ColumnProperties message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.IColumnProperties} message ColumnProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Entity value. + * @member {string} value + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @instance + */ + Entity.prototype.value = ""; - /** - * Decodes a ColumnProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnProperties.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.v2beta1.Intent.Message.ColumnProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = reader.string(); - break; - case 2: - message.horizontalAlignment = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Entity synonyms. + * @member {Array.} synonyms + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @instance + */ + Entity.prototype.synonyms = $util.emptyArray; - /** - * Decodes a ColumnProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.v2beta1.EntityType.IEntity=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EntityType.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; - /** - * Verifies a ColumnProperties message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.header != null && message.hasOwnProperty("header")) - if (!$util.isString(message.header)) - return "header: string expected"; - if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) - switch (message.horizontalAlignment) { - default: - return "horizontalAlignment: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.v2beta1.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; + }; - /** - * Creates a ColumnProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} ColumnProperties - */ - ColumnProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties(); - if (object.header != null) - message.header = String(object.header); - switch (object.horizontalAlignment) { - case "HORIZONTAL_ALIGNMENT_UNSPECIFIED": - case 0: - message.horizontalAlignment = 0; - break; - case "LEADING": + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.EntityType.Entity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.horizontalAlignment = 1; + message.value = reader.string(); break; - case "CENTER": case 2: - message.horizontalAlignment = 2; + if (!(message.synonyms && message.synonyms.length)) + message.synonyms = []; + message.synonyms.push(reader.string()); break; - case "TRAILING": - case 3: - message.horizontalAlignment = 3; + default: + reader.skipType(tag & 7); break; } - return message; - }; - - /** - * Creates a plain object from a ColumnProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties} message ColumnProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.header = ""; - object.horizontalAlignment = options.enums === String ? "HORIZONTAL_ALIGNMENT_UNSPECIFIED" : 0; - } - if (message.header != null && message.hasOwnProperty("header")) - object.header = message.header; - if (message.horizontalAlignment != null && message.hasOwnProperty("horizontalAlignment")) - object.horizontalAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; - return object; - }; - - /** - * Converts this ColumnProperties to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties - * @instance - * @returns {Object.} JSON object - */ - ColumnProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * HorizontalAlignment enum. - * @name google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment - * @enum {number} - * @property {number} HORIZONTAL_ALIGNMENT_UNSPECIFIED=0 HORIZONTAL_ALIGNMENT_UNSPECIFIED value - * @property {number} LEADING=1 LEADING value - * @property {number} CENTER=2 CENTER value - * @property {number} TRAILING=3 TRAILING value - */ - ColumnProperties.HorizontalAlignment = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HORIZONTAL_ALIGNMENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEADING"] = 1; - values[valuesById[2] = "CENTER"] = 2; - values[valuesById[3] = "TRAILING"] = 3; - return values; - })(); - - return ColumnProperties; - })(); - - Message.TableCardRow = (function() { + } + return message; + }; - /** - * Properties of a TableCardRow. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITableCardRow - * @property {Array.|null} [cells] TableCardRow cells - * @property {boolean|null} [dividerAfter] TableCardRow dividerAfter - */ + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.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()); + }; - /** - * Constructs a new TableCardRow. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TableCardRow. - * @implements ITableCardRow - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow=} [properties] Properties to set - */ - function TableCardRow(properties) { - this.cells = []; - 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 Entity message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.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; + }; - /** - * TableCardRow cells. - * @member {Array.} cells - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @instance - */ - TableCardRow.prototype.cells = $util.emptyArray; - - /** - * TableCardRow dividerAfter. - * @member {boolean} dividerAfter - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @instance - */ - TableCardRow.prototype.dividerAfter = false; + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.EntityType.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityType.Entity) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.EntityType.Entity(); + if (object.value != null) + message.value = String(object.value); + if (object.synonyms) { + if (!Array.isArray(object.synonyms)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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 new TableCardRow instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow instance - */ - TableCardRow.create = function create(properties) { - return new TableCardRow(properties); - }; + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @static + * @param {google.cloud.dialogflow.v2beta1.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; + }; - /** - * Encodes the specified TableCardRow message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow} message TableCardRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCardRow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cells != null && message.cells.length) - for (var i = 0; i < message.cells.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.encode(message.cells[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dividerAfter != null && Object.hasOwnProperty.call(message, "dividerAfter")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dividerAfter); - return writer; - }; + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified TableCardRow message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardRow} message TableCardRow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCardRow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Entity; + })(); - /** - * Decodes a TableCardRow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCardRow.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.v2beta1.Intent.Message.TableCardRow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.cells && message.cells.length)) - message.cells = []; - message.cells.push($root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.decode(reader, reader.uint32())); - break; - case 2: - message.dividerAfter = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return EntityType; + })(); - /** - * Decodes a TableCardRow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCardRow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + v2beta1.ListEntityTypesRequest = (function() { - /** - * Verifies a TableCardRow message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableCardRow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cells != null && message.hasOwnProperty("cells")) { - if (!Array.isArray(message.cells)) - return "cells: array expected"; - for (var i = 0; i < message.cells.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify(message.cells[i]); - if (error) - return "cells." + error; - } - } - if (message.dividerAfter != null && message.hasOwnProperty("dividerAfter")) - if (typeof message.dividerAfter !== "boolean") - return "dividerAfter: boolean expected"; - return null; - }; + /** + * Properties of a ListEntityTypesRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @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 + */ - /** - * Creates a TableCardRow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} TableCardRow - */ - TableCardRow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow(); - if (object.cells) { - if (!Array.isArray(object.cells)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.cells: array expected"); - message.cells = []; - for (var i = 0; i < object.cells.length; ++i) { - if (typeof object.cells[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.cells: object expected"); - message.cells[i] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.fromObject(object.cells[i]); - } - } - if (object.dividerAfter != null) - message.dividerAfter = Boolean(object.dividerAfter); - return message; - }; + /** + * Constructs a new ListEntityTypesRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListEntityTypesRequest. + * @implements IListEntityTypesRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest=} [properties] Properties to set + */ + function ListEntityTypesRequest(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 TableCardRow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow} message TableCardRow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableCardRow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cells = []; - if (options.defaults) - object.dividerAfter = false; - if (message.cells && message.cells.length) { - object.cells = []; - for (var j = 0; j < message.cells.length; ++j) - object.cells[j] = $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.toObject(message.cells[j], options); - } - if (message.dividerAfter != null && message.hasOwnProperty("dividerAfter")) - object.dividerAfter = message.dividerAfter; - return object; - }; + /** + * ListEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.parent = ""; - /** - * Converts this TableCardRow to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow - * @instance - * @returns {Object.} JSON object - */ - TableCardRow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListEntityTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.languageCode = ""; - return TableCardRow; - })(); + /** + * ListEntityTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.pageSize = 0; - Message.TableCardCell = (function() { + /** + * ListEntityTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @instance + */ + ListEntityTypesRequest.prototype.pageToken = ""; - /** - * Properties of a TableCardCell. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @interface ITableCardCell - * @property {string|null} [text] TableCardCell text - */ + /** + * Creates a new ListEntityTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest instance + */ + ListEntityTypesRequest.create = function create(properties) { + return new ListEntityTypesRequest(properties); + }; - /** - * Constructs a new TableCardCell. - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message - * @classdesc Represents a TableCardCell. - * @implements ITableCardCell - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell=} [properties] Properties to set - */ - function TableCardCell(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 ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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 ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest(); + 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; + }; - /** - * TableCardCell text. - * @member {string} text - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @instance - */ - TableCardCell.prototype.text = ""; + /** + * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new TableCardCell instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell instance - */ - TableCardCell.create = function create(properties) { - return new TableCardCell(properties); - }; + /** + * Verifies a ListEntityTypesRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @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) { + 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; + }; - /** - * Encodes the specified TableCardCell message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell} message TableCardCell message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCardCell.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); - return writer; - }; + /** + * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + */ + ListEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest(); + 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; + }; - /** - * Encodes the specified TableCardCell message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.ITableCardCell} message TableCardCell message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableCardCell.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntityTypesRequest.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; + }; - /** - * Decodes a TableCardCell message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCardCell.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.v2beta1.Intent.Message.TableCardCell(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this ListEntityTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEntityTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a TableCardCell message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableCardCell.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return ListEntityTypesRequest; + })(); + + v2beta1.ListEntityTypesResponse = (function() { + + /** + * Properties of a ListEntityTypesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListEntityTypesResponse + * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes + * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken + */ + + /** + * Constructs a new ListEntityTypesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListEntityTypesResponse. + * @implements IListEntityTypesResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse=} [properties] Properties to set + */ + function ListEntityTypesResponse(properties) { + this.entityTypes = []; + 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 TableCardCell message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableCardCell.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"; - return null; - }; + /** + * ListEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @instance + */ + ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; - /** - * Creates a TableCardCell message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} TableCardCell - */ - TableCardCell.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell(); - if (object.text != null) - message.text = String(object.text); - return message; - }; + /** + * ListEntityTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @instance + */ + ListEntityTypesResponse.prototype.nextPageToken = ""; - /** - * Creates a plain object from a TableCardCell message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell} message TableCardCell - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableCardCell.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; + /** + * Creates a new ListEntityTypesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse instance + */ + ListEntityTypesResponse.create = function create(properties) { + return new ListEntityTypesResponse(properties); + }; - /** - * Converts this TableCardCell to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell - * @instance - * @returns {Object.} JSON object - */ - TableCardCell.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntityTypesResponse.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.v2beta1.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; + }; - return TableCardCell; - })(); + /** + * Encodes the specified ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return Message; - })(); + /** + * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse(); + 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.v2beta1.EntityType.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - Intent.FollowupIntentInfo = (function() { + /** + * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a FollowupIntentInfo. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @interface IFollowupIntentInfo - * @property {string|null} [followupIntentName] FollowupIntentInfo followupIntentName - * @property {string|null} [parentFollowupIntentName] FollowupIntentInfo parentFollowupIntentName - */ + /** + * Verifies a ListEntityTypesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @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) { + 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.v2beta1.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; + }; - /** - * Constructs a new FollowupIntentInfo. - * @memberof google.cloud.dialogflow.v2beta1.Intent - * @classdesc Represents a FollowupIntentInfo. - * @implements IFollowupIntentInfo - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo=} [properties] Properties to set - */ - function FollowupIntentInfo(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 ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + */ + ListEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * FollowupIntentInfo followupIntentName. - * @member {string} followupIntentName - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @instance - */ - FollowupIntentInfo.prototype.followupIntentName = ""; + /** + * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} message ListEntityTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEntityTypesResponse.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.v2beta1.EntityType.toObject(message.entityTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * FollowupIntentInfo parentFollowupIntentName. - * @member {string} parentFollowupIntentName - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @instance - */ - FollowupIntentInfo.prototype.parentFollowupIntentName = ""; + /** + * Converts this ListEntityTypesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEntityTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new FollowupIntentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo instance - */ - FollowupIntentInfo.create = function create(properties) { - return new FollowupIntentInfo(properties); - }; + return ListEntityTypesResponse; + })(); - /** - * Encodes the specified FollowupIntentInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo} message FollowupIntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FollowupIntentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.followupIntentName != null && Object.hasOwnProperty.call(message, "followupIntentName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.followupIntentName); - if (message.parentFollowupIntentName != null && Object.hasOwnProperty.call(message, "parentFollowupIntentName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parentFollowupIntentName); - return writer; - }; + v2beta1.GetEntityTypeRequest = (function() { - /** - * Encodes the specified FollowupIntentInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.IFollowupIntentInfo} message FollowupIntentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FollowupIntentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a GetEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGetEntityTypeRequest + * @property {string|null} [name] GetEntityTypeRequest name + * @property {string|null} [languageCode] GetEntityTypeRequest languageCode + */ - /** - * Decodes a FollowupIntentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FollowupIntentInfo.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.v2beta1.Intent.FollowupIntentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.followupIntentName = reader.string(); - break; - case 2: - message.parentFollowupIntentName = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new GetEntityTypeRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GetEntityTypeRequest. + * @implements IGetEntityTypeRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest=} [properties] Properties to set + */ + function GetEntityTypeRequest(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]]; + } - /** - * Decodes a FollowupIntentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FollowupIntentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * GetEntityTypeRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @instance + */ + GetEntityTypeRequest.prototype.name = ""; - /** - * Verifies a FollowupIntentInfo message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FollowupIntentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.followupIntentName != null && message.hasOwnProperty("followupIntentName")) - if (!$util.isString(message.followupIntentName)) - return "followupIntentName: string expected"; - if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) - if (!$util.isString(message.parentFollowupIntentName)) - return "parentFollowupIntentName: string expected"; - return null; - }; + /** + * GetEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @instance + */ + GetEntityTypeRequest.prototype.languageCode = ""; + + /** + * Creates a new GetEntityTypeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest instance + */ + GetEntityTypeRequest.create = function create(properties) { + return new GetEntityTypeRequest(properties); + }; + + /** + * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} 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.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.v2beta1.GetEntityTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest(); + 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; + }; - /** - * Creates a FollowupIntentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} FollowupIntentInfo - */ - FollowupIntentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo(); - if (object.followupIntentName != null) - message.followupIntentName = String(object.followupIntentName); - if (object.parentFollowupIntentName != null) - message.parentFollowupIntentName = String(object.parentFollowupIntentName); - return message; - }; + /** + * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a FollowupIntentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @static - * @param {google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo} message FollowupIntentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FollowupIntentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.followupIntentName = ""; - object.parentFollowupIntentName = ""; - } - if (message.followupIntentName != null && message.hasOwnProperty("followupIntentName")) - object.followupIntentName = message.followupIntentName; - if (message.parentFollowupIntentName != null && message.hasOwnProperty("parentFollowupIntentName")) - object.parentFollowupIntentName = message.parentFollowupIntentName; + /** + * Verifies a GetEntityTypeRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @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) { + 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. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + */ + GetEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Converts this FollowupIntentInfo to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo - * @instance - * @returns {Object.} JSON object - */ - FollowupIntentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} message GetEntityTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEntityTypeRequest.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; + }; - return FollowupIntentInfo; - })(); + /** + * Converts this GetEntityTypeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetEntityTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Intent; + return GetEntityTypeRequest; })(); - v2beta1.ListIntentsRequest = (function() { + v2beta1.CreateEntityTypeRequest = (function() { /** - * Properties of a ListIntentsRequest. + * Properties of a CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListIntentsRequest - * @property {string|null} [parent] ListIntentsRequest parent - * @property {string|null} [languageCode] ListIntentsRequest languageCode - * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] ListIntentsRequest intentView - * @property {number|null} [pageSize] ListIntentsRequest pageSize - * @property {string|null} [pageToken] ListIntentsRequest pageToken + * @interface ICreateEntityTypeRequest + * @property {string|null} [parent] CreateEntityTypeRequest parent + * @property {google.cloud.dialogflow.v2beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType + * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode */ /** - * Constructs a new ListIntentsRequest. + * Constructs a new CreateEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListIntentsRequest. - * @implements IListIntentsRequest + * @classdesc Represents a CreateEntityTypeRequest. + * @implements ICreateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest=} [properties] Properties to set */ - function ListIntentsRequest(properties) { + function CreateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116531,110 +117747,90 @@ } /** - * ListIntentsRequest parent. + * CreateEntityTypeRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.parent = ""; - - /** - * ListIntentsRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest - * @instance - */ - ListIntentsRequest.prototype.languageCode = ""; - - /** - * ListIntentsRequest intentView. - * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @instance */ - ListIntentsRequest.prototype.intentView = 0; + CreateEntityTypeRequest.prototype.parent = ""; /** - * ListIntentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * CreateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.v2beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @instance */ - ListIntentsRequest.prototype.pageSize = 0; + CreateEntityTypeRequest.prototype.entityType = null; /** - * ListIntentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * CreateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @instance */ - ListIntentsRequest.prototype.pageToken = ""; + CreateEntityTypeRequest.prototype.languageCode = ""; /** - * Creates a new ListIntentsRequest instance using the specified properties. + * Creates a new CreateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest instance */ - ListIntentsRequest.create = function create(properties) { - return new ListIntentsRequest(properties); + CreateEntityTypeRequest.create = function create(properties) { + return new CreateEntityTypeRequest(properties); }; /** - * Encodes the specified ListIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encode = function encode(message, writer) { + CreateEntityTypeRequest.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.v2beta1.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 2, wireType 2 =*/18).string(message.languageCode); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intentView); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified ListIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsRequest.verify|verify} messages. + * Encodes the specified CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsRequest} message ListIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsRequest message from the specified reader or buffer. + * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest * @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) { + 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.v2beta1.ListIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -116642,16 +117838,10 @@ message.parent = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32()); break; case 3: - message.intentView = reader.int32(); - break; - case 4: - message.pageSize = reader.int32(); - break; - case 5: - message.pageToken = reader.string(); + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -116662,155 +117852,131 @@ }; /** - * Decodes a ListIntentsRequest 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.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest * @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) { + CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsRequest message. + * Verifies a CreateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @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) { + CreateEntityTypeRequest.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.v2beta1.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.intentView != null && message.hasOwnProperty("intentView")) - switch (message.intentView) { - default: - return "intentView: enum value expected"; - case 0: - case 1: - 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 ListIntentsRequest 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.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsRequest} ListIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest */ - ListIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest) + CreateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListIntentsRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest(); if (object.parent != null) message.parent = String(object.parent); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityType); + } 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_FULL": - case 1: - message.intentView = 1; - 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 ListIntentsRequest 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.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListIntentsRequest} message ListIntentsRequest + * @param {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} message CreateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsRequest.toObject = function toObject(message, options) { + CreateEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; + object.entityType = null; object.languageCode = ""; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; - 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.v2beta1.EntityType.toObject(message.entityType, options); if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; - if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; - 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 ListIntentsRequest to JSON. + * Converts this CreateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - ListIntentsRequest.prototype.toJSON = function toJSON() { + CreateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListIntentsRequest; + return CreateEntityTypeRequest; })(); - v2beta1.ListIntentsResponse = (function() { + v2beta1.UpdateEntityTypeRequest = (function() { /** - * Properties of a ListIntentsResponse. + * Properties of an UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListIntentsResponse - * @property {Array.|null} [intents] ListIntentsResponse intents - * @property {string|null} [nextPageToken] ListIntentsResponse nextPageToken + * @interface IUpdateEntityTypeRequest + * @property {google.cloud.dialogflow.v2beta1.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType + * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask */ /** - * Constructs a new ListIntentsResponse. + * Constructs a new UpdateEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListIntentsResponse. - * @implements IListIntentsResponse + * @classdesc Represents an UpdateEntityTypeRequest. + * @implements IUpdateEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest=} [properties] Properties to set */ - function ListIntentsResponse(properties) { - this.intents = []; + function UpdateEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116818,91 +117984,101 @@ } /** - * ListIntentsResponse intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * UpdateEntityTypeRequest entityType. + * @member {google.cloud.dialogflow.v2beta1.IEntityType|null|undefined} entityType + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @instance */ - ListIntentsResponse.prototype.intents = $util.emptyArray; + UpdateEntityTypeRequest.prototype.entityType = null; /** - * ListIntentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * UpdateEntityTypeRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @instance */ - ListIntentsResponse.prototype.nextPageToken = ""; + UpdateEntityTypeRequest.prototype.languageCode = ""; /** - * Creates a new ListIntentsResponse instance using the specified properties. + * UpdateEntityTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @instance + */ + UpdateEntityTypeRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance */ - ListIntentsResponse.create = function create(properties) { - return new ListIntentsResponse(properties); + UpdateEntityTypeRequest.create = function create(properties) { + return new UpdateEntityTypeRequest(properties); }; /** - * Encodes the specified ListIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encode = function encode(message, writer) { + UpdateEntityTypeRequest.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.v2beta1.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.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + $root.google.cloud.dialogflow.v2beta1.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 ListIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListIntentsResponse.verify|verify} messages. + * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListIntentsResponse} message ListIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIntentsResponse message from the specified reader or buffer. + * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @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) { + 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.v2beta1.ListIntentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest(); 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.v2beta1.Intent.decode(reader, reader.uint32())); + message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.languageCode = reader.string(); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -116913,135 +118089,134 @@ }; /** - * Decodes a ListIntentsResponse 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.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest * @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) { + UpdateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIntentsResponse message. + * Verifies an UpdateEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @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) { + UpdateEntityTypeRequest.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.v2beta1.Intent.verify(message.intents[i]); - if (error) - return "intents." + error; - } + if (message.entityType != null && message.hasOwnProperty("entityType")) { + var error = $root.google.cloud.dialogflow.v2beta1.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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListIntentsResponse 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.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListIntentsResponse} ListIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest */ - ListIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse) + UpdateEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListIntentsResponse(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListIntentsResponse.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest(); + if (object.entityType != null) { + if (typeof object.entityType !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.entityType: object expected"); + message.entityType = $root.google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateEntityTypeRequest.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 ListIntentsResponse 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.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListIntentsResponse} message ListIntentsResponse + * @param {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} message UpdateEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIntentsResponse.toObject = function toObject(message, options) { + UpdateEntityTypeRequest.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.v2beta1.Intent.toObject(message.intents[j], options); + if (options.defaults) { + object.entityType = null; + object.languageCode = ""; + object.updateMask = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = $root.google.cloud.dialogflow.v2beta1.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 ListIntentsResponse to JSON. + * Converts this UpdateEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest * @instance * @returns {Object.} JSON object */ - ListIntentsResponse.prototype.toJSON = function toJSON() { + UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListIntentsResponse; + return UpdateEntityTypeRequest; })(); - v2beta1.GetIntentRequest = (function() { + v2beta1.DeleteEntityTypeRequest = (function() { /** - * Properties of a GetIntentRequest. + * Properties of a DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetIntentRequest - * @property {string|null} [name] GetIntentRequest name - * @property {string|null} [languageCode] GetIntentRequest languageCode - * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] GetIntentRequest intentView + * @interface IDeleteEntityTypeRequest + * @property {string|null} [name] DeleteEntityTypeRequest name */ /** - * Constructs a new GetIntentRequest. + * Constructs a new DeleteEntityTypeRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetIntentRequest. - * @implements IGetIntentRequest + * @classdesc Represents a DeleteEntityTypeRequest. + * @implements IDeleteEntityTypeRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest=} [properties] Properties to set */ - function GetIntentRequest(properties) { + function DeleteEntityTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117049,102 +118224,76 @@ } /** - * GetIntentRequest name. + * DeleteEntityTypeRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest - * @instance - */ - GetIntentRequest.prototype.name = ""; - - /** - * GetIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest - * @instance - */ - GetIntentRequest.prototype.languageCode = ""; - - /** - * GetIntentRequest intentView. - * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @instance */ - GetIntentRequest.prototype.intentView = 0; + DeleteEntityTypeRequest.prototype.name = ""; /** - * Creates a new GetIntentRequest instance using the specified properties. + * Creates a new DeleteEntityTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance */ - GetIntentRequest.create = function create(properties) { - return new GetIntentRequest(properties); + DeleteEntityTypeRequest.create = function create(properties) { + return new DeleteEntityTypeRequest(properties); }; /** - * Encodes the specified GetIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intentView); return writer; }; /** - * Encodes the specified GetIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetIntentRequest.verify|verify} messages. + * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetIntentRequest} message GetIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIntentRequest message from the specified reader or buffer. + * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @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) { + 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.v2beta1.GetIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest(); 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; - case 3: - message.intentView = reader.int32(); - break; default: reader.skipType(tag & 7); break; @@ -117154,140 +118303,111 @@ }; /** - * Decodes a GetIntentRequest 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.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest * @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) { + DeleteEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetIntentRequest message. + * Verifies a DeleteEntityTypeRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @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) { + 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.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: - break; - } return null; }; /** - * Creates a GetIntentRequest 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.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetIntentRequest} GetIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest */ - GetIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetIntentRequest) + DeleteEntityTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetIntentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest(); if (object.name != null) message.name = String(object.name); - 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_FULL": - case 1: - message.intentView = 1; - break; - } return message; }; /** - * Creates a plain object from a GetIntentRequest 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.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @static - * @param {google.cloud.dialogflow.v2beta1.GetIntentRequest} message GetIntentRequest + * @param {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} message DeleteEntityTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetIntentRequest.toObject = function toObject(message, options) { + DeleteEntityTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.languageCode = ""; - object.intentView = options.enums === String ? "INTENT_VIEW_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.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this GetIntentRequest to JSON. + * Converts this DeleteEntityTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest * @instance * @returns {Object.} JSON object */ - GetIntentRequest.prototype.toJSON = function toJSON() { + DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetIntentRequest; + return DeleteEntityTypeRequest; })(); - v2beta1.CreateIntentRequest = (function() { + v2beta1.BatchUpdateEntityTypesRequest = (function() { /** - * Properties of a CreateIntentRequest. + * Properties of a BatchUpdateEntityTypesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateIntentRequest - * @property {string|null} [parent] CreateIntentRequest parent - * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] CreateIntentRequest intent - * @property {string|null} [languageCode] CreateIntentRequest languageCode - * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] CreateIntentRequest intentView + * @interface IBatchUpdateEntityTypesRequest + * @property {string|null} [parent] BatchUpdateEntityTypesRequest parent + * @property {string|null} [entityTypeBatchUri] BatchUpdateEntityTypesRequest entityTypeBatchUri + * @property {google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null} [entityTypeBatchInline] BatchUpdateEntityTypesRequest entityTypeBatchInline + * @property {string|null} [languageCode] BatchUpdateEntityTypesRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateEntityTypesRequest updateMask */ /** - * Constructs a new CreateIntentRequest. + * Constructs a new BatchUpdateEntityTypesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateIntentRequest. - * @implements ICreateIntentRequest + * @classdesc Represents a BatchUpdateEntityTypesRequest. + * @implements IBatchUpdateEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest=} [properties] Properties to set */ - function CreateIntentRequest(properties) { + function BatchUpdateEntityTypesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117295,100 +118415,124 @@ } /** - * CreateIntentRequest parent. + * BatchUpdateEntityTypesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @instance */ - CreateIntentRequest.prototype.parent = ""; + BatchUpdateEntityTypesRequest.prototype.parent = ""; /** - * CreateIntentRequest intent. - * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * BatchUpdateEntityTypesRequest entityTypeBatchUri. + * @member {string|null|undefined} entityTypeBatchUri + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @instance */ - CreateIntentRequest.prototype.intent = null; + BatchUpdateEntityTypesRequest.prototype.entityTypeBatchUri = null; /** - * CreateIntentRequest languageCode. + * BatchUpdateEntityTypesRequest entityTypeBatchInline. + * @member {google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null|undefined} entityTypeBatchInline + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @instance + */ + BatchUpdateEntityTypesRequest.prototype.entityTypeBatchInline = null; + + /** + * BatchUpdateEntityTypesRequest languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @instance */ - CreateIntentRequest.prototype.languageCode = ""; + BatchUpdateEntityTypesRequest.prototype.languageCode = ""; /** - * CreateIntentRequest intentView. - * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * BatchUpdateEntityTypesRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @instance */ - CreateIntentRequest.prototype.intentView = 0; + BatchUpdateEntityTypesRequest.prototype.updateMask = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new CreateIntentRequest instance using the specified properties. + * BatchUpdateEntityTypesRequest entityTypeBatch. + * @member {"entityTypeBatchUri"|"entityTypeBatchInline"|undefined} entityTypeBatch + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @instance + */ + Object.defineProperty(BatchUpdateEntityTypesRequest.prototype, "entityTypeBatch", { + get: $util.oneOfGetter($oneOfFields = ["entityTypeBatchUri", "entityTypeBatchInline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchUpdateEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest instance */ - CreateIntentRequest.create = function create(properties) { - return new CreateIntentRequest(properties); + BatchUpdateEntityTypesRequest.create = function create(properties) { + return new BatchUpdateEntityTypesRequest(properties); }; /** - * Encodes the specified CreateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. + * Encodes the specified BatchUpdateEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encode = function encode(message, writer) { + BatchUpdateEntityTypesRequest.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.v2beta1.Intent.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entityTypeBatchUri != null && Object.hasOwnProperty.call(message, "entityTypeBatchUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypeBatchUri); + if (message.entityTypeBatchInline != null && Object.hasOwnProperty.call(message, "entityTypeBatchInline")) + $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.encode(message.entityTypeBatchInline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intentView); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateIntentRequest.verify|verify} messages. + * Encodes the specified BatchUpdateEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateIntentRequest} message CreateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer. + * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest * @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) { + BatchUpdateEntityTypesRequest.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.v2beta1.CreateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -117396,13 +118540,16 @@ message.parent = reader.string(); break; case 2: - message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32()); + message.entityTypeBatchUri = reader.string(); break; case 3: - message.languageCode = reader.string(); + message.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.decode(reader, reader.uint32()); break; case 4: - message.intentView = reader.int32(); + message.languageCode = reader.string(); + break; + case 5: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -117413,268 +118560,242 @@ }; /** - * Decodes a CreateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest * @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) { + BatchUpdateEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateIntentRequest message. + * Verifies a BatchUpdateEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @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) { + BatchUpdateEntityTypesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; 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.v2beta1.Intent.verify(message.intent); - if (error) - return "intent." + error; + if (message.entityTypeBatchUri != null && message.hasOwnProperty("entityTypeBatchUri")) { + properties.entityTypeBatch = 1; + if (!$util.isString(message.entityTypeBatchUri)) + return "entityTypeBatchUri: string expected"; + } + if (message.entityTypeBatchInline != null && message.hasOwnProperty("entityTypeBatchInline")) { + if (properties.entityTypeBatch === 1) + return "entityTypeBatch: multiple values"; + properties.entityTypeBatch = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify(message.entityTypeBatchInline); + if (error) + return "entityTypeBatchInline." + error; + } } 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: - break; - } + 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 CreateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateIntentRequest} CreateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest */ - CreateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest) + BatchUpdateEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateIntentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intent); + if (object.entityTypeBatchUri != null) + message.entityTypeBatchUri = String(object.entityTypeBatchUri); + if (object.entityTypeBatchInline != null) { + if (typeof object.entityTypeBatchInline !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.entityTypeBatchInline: object expected"); + message.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.fromObject(object.entityTypeBatchInline); } 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_FULL": - case 1: - message.intentView = 1; - break; + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a CreateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CreateIntentRequest} message CreateIntentRequest + * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateIntentRequest.toObject = function toObject(message, options) { + BatchUpdateEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.intent = null; object.languageCode = ""; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + object.updateMask = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intent, options); + if (message.entityTypeBatchUri != null && message.hasOwnProperty("entityTypeBatchUri")) { + object.entityTypeBatchUri = message.entityTypeBatchUri; + if (options.oneofs) + object.entityTypeBatch = "entityTypeBatchUri"; + } + if (message.entityTypeBatchInline != null && message.hasOwnProperty("entityTypeBatchInline")) { + object.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.toObject(message.entityTypeBatchInline, options); + if (options.oneofs) + object.entityTypeBatch = "entityTypeBatchInline"; + } if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; - if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this CreateIntentRequest to JSON. + * Converts this BatchUpdateEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest * @instance * @returns {Object.} JSON object */ - CreateIntentRequest.prototype.toJSON = function toJSON() { + BatchUpdateEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateIntentRequest; + return BatchUpdateEntityTypesRequest; })(); - v2beta1.UpdateIntentRequest = (function() { + v2beta1.BatchUpdateEntityTypesResponse = (function() { /** - * Properties of an UpdateIntentRequest. + * Properties of a BatchUpdateEntityTypesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateIntentRequest - * @property {google.cloud.dialogflow.v2beta1.IIntent|null} [intent] UpdateIntentRequest intent - * @property {string|null} [languageCode] UpdateIntentRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIntentRequest updateMask - * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] UpdateIntentRequest intentView + * @interface IBatchUpdateEntityTypesResponse + * @property {Array.|null} [entityTypes] BatchUpdateEntityTypesResponse entityTypes */ /** - * Constructs a new UpdateIntentRequest. + * Constructs a new BatchUpdateEntityTypesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateIntentRequest. - * @implements IUpdateIntentRequest + * @classdesc Represents a BatchUpdateEntityTypesResponse. + * @implements IBatchUpdateEntityTypesResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest=} [properties] Properties to set - */ - function UpdateIntentRequest(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]]; - } - - /** - * UpdateIntentRequest intent. - * @member {google.cloud.dialogflow.v2beta1.IIntent|null|undefined} intent - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.intent = null; - - /** - * UpdateIntentRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest - * @instance - */ - UpdateIntentRequest.prototype.languageCode = ""; - - /** - * UpdateIntentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest - * @instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse=} [properties] Properties to set */ - UpdateIntentRequest.prototype.updateMask = null; + function BatchUpdateEntityTypesResponse(properties) { + this.entityTypes = []; + 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]]; + } /** - * UpdateIntentRequest intentView. - * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * BatchUpdateEntityTypesResponse entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @instance */ - UpdateIntentRequest.prototype.intentView = 0; + BatchUpdateEntityTypesResponse.prototype.entityTypes = $util.emptyArray; /** - * Creates a new UpdateIntentRequest instance using the specified properties. + * Creates a new BatchUpdateEntityTypesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse instance */ - UpdateIntentRequest.create = function create(properties) { - return new UpdateIntentRequest(properties); + BatchUpdateEntityTypesResponse.create = function create(properties) { + return new BatchUpdateEntityTypesResponse(properties); }; /** - * Encodes the specified UpdateIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified BatchUpdateEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encode = function encode(message, writer) { + BatchUpdateEntityTypesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) - $root.google.cloud.dialogflow.v2beta1.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.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.intentView); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateIntentRequest.verify|verify} messages. + * Encodes the specified BatchUpdateEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateIntentRequest} message UpdateIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer. + * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse * @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) { + BatchUpdateEntityTypesResponse.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.v2beta1.UpdateIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.intent = $root.google.cloud.dialogflow.v2beta1.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()); - break; - case 4: - message.intentView = reader.int32(); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -117685,155 +118806,126 @@ }; /** - * Decodes an UpdateIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse * @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) { + BatchUpdateEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateIntentRequest message. + * Verifies a BatchUpdateEntityTypesResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @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) { + BatchUpdateEntityTypesResponse.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.v2beta1.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.intentView != null && message.hasOwnProperty("intentView")) - switch (message.intentView) { - default: - return "intentView: enum value expected"; - case 0: - case 1: - break; + 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.v2beta1.EntityType.verify(message.entityTypes[i]); + if (error) + return "entityTypes." + error; } + } return null; }; /** - * Creates an UpdateIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateEntityTypesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} UpdateIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse */ - UpdateIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest) + BatchUpdateEntityTypesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateIntentRequest(); - if (object.intent != null) { - if (typeof object.intent !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateIntentRequest.intent: object expected"); - message.intent = $root.google.cloud.dialogflow.v2beta1.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.v2beta1.UpdateIntentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - switch (object.intentView) { - case "INTENT_VIEW_UNSPECIFIED": - case 0: - message.intentView = 0; - break; - case "INTENT_VIEW_FULL": - case 1: - message.intentView = 1; - break; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.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.v2beta1.BatchUpdateEntityTypesResponse.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); + } } return message; }; /** - * Creates a plain object from an UpdateIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateEntityTypesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateIntentRequest} message UpdateIntentRequest + * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateIntentRequest.toObject = function toObject(message, options) { + BatchUpdateEntityTypesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.intent = null; - object.languageCode = ""; - object.updateMask = null; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.entityTypes = []; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityTypes[j], options); } - if (message.intent != null && message.hasOwnProperty("intent")) - object.intent = $root.google.cloud.dialogflow.v2beta1.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 (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this UpdateIntentRequest to JSON. + * Converts this BatchUpdateEntityTypesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse * @instance * @returns {Object.} JSON object */ - UpdateIntentRequest.prototype.toJSON = function toJSON() { + BatchUpdateEntityTypesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateIntentRequest; + return BatchUpdateEntityTypesResponse; })(); - v2beta1.DeleteIntentRequest = (function() { + v2beta1.BatchDeleteEntityTypesRequest = (function() { /** - * Properties of a DeleteIntentRequest. + * Properties of a BatchDeleteEntityTypesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteIntentRequest - * @property {string|null} [name] DeleteIntentRequest name + * @interface IBatchDeleteEntityTypesRequest + * @property {string|null} [parent] BatchDeleteEntityTypesRequest parent + * @property {Array.|null} [entityTypeNames] BatchDeleteEntityTypesRequest entityTypeNames */ /** - * Constructs a new DeleteIntentRequest. + * Constructs a new BatchDeleteEntityTypesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteIntentRequest. - * @implements IDeleteIntentRequest + * @classdesc Represents a BatchDeleteEntityTypesRequest. + * @implements IBatchDeleteEntityTypesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest=} [properties] Properties to set */ - function DeleteIntentRequest(properties) { + function BatchDeleteEntityTypesRequest(properties) { + this.entityTypeNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -117841,75 +118933,91 @@ } /** - * DeleteIntentRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * BatchDeleteEntityTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @instance */ - DeleteIntentRequest.prototype.name = ""; + BatchDeleteEntityTypesRequest.prototype.parent = ""; /** - * Creates a new DeleteIntentRequest instance using the specified properties. + * BatchDeleteEntityTypesRequest entityTypeNames. + * @member {Array.} entityTypeNames + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest + * @instance + */ + BatchDeleteEntityTypesRequest.prototype.entityTypeNames = $util.emptyArray; + + /** + * Creates a new BatchDeleteEntityTypesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest instance */ - DeleteIntentRequest.create = function create(properties) { - return new DeleteIntentRequest(properties); + BatchDeleteEntityTypesRequest.create = function create(properties) { + return new BatchDeleteEntityTypesRequest(properties); }; /** - * Encodes the specified DeleteIntentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified BatchDeleteEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encode = function encode(message, writer) { + BatchDeleteEntityTypesRequest.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.entityTypeNames != null && message.entityTypeNames.length) + for (var i = 0; i < message.entityTypeNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypeNames[i]); return writer; }; /** - * Encodes the specified DeleteIntentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteIntentRequest.verify|verify} messages. + * Encodes the specified BatchDeleteEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteIntentRequest} message DeleteIntentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIntentRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeleteEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer. + * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest * @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) { + BatchDeleteEntityTypesRequest.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.v2beta1.DeleteIntentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + if (!(message.entityTypeNames && message.entityTypeNames.length)) + message.entityTypeNames = []; + message.entityTypeNames.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -117920,112 +119028,131 @@ }; /** - * Decodes a DeleteIntentRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest * @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) { + BatchDeleteEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteIntentRequest message. + * Verifies a BatchDeleteEntityTypesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @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) { + BatchDeleteEntityTypesRequest.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.entityTypeNames != null && message.hasOwnProperty("entityTypeNames")) { + if (!Array.isArray(message.entityTypeNames)) + return "entityTypeNames: array expected"; + for (var i = 0; i < message.entityTypeNames.length; ++i) + if (!$util.isString(message.entityTypeNames[i])) + return "entityTypeNames: string[] expected"; + } return null; }; /** - * Creates a DeleteIntentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeleteEntityTypesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} DeleteIntentRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest */ - DeleteIntentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteIntentRequest) + BatchDeleteEntityTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteIntentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityTypeNames) { + if (!Array.isArray(object.entityTypeNames)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.entityTypeNames: array expected"); + message.entityTypeNames = []; + for (var i = 0; i < object.entityTypeNames.length; ++i) + message.entityTypeNames[i] = String(object.entityTypeNames[i]); + } return message; }; /** - * Creates a plain object from a DeleteIntentRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeleteEntityTypesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteIntentRequest} message DeleteIntentRequest + * @param {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteIntentRequest.toObject = function toObject(message, options) { + BatchDeleteEntityTypesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entityTypeNames = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entityTypeNames && message.entityTypeNames.length) { + object.entityTypeNames = []; + for (var j = 0; j < message.entityTypeNames.length; ++j) + object.entityTypeNames[j] = message.entityTypeNames[j]; + } return object; }; /** - * Converts this DeleteIntentRequest to JSON. + * Converts this BatchDeleteEntityTypesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteIntentRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest * @instance * @returns {Object.} JSON object */ - DeleteIntentRequest.prototype.toJSON = function toJSON() { + BatchDeleteEntityTypesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteIntentRequest; + return BatchDeleteEntityTypesRequest; })(); - v2beta1.BatchUpdateIntentsRequest = (function() { + v2beta1.BatchCreateEntitiesRequest = (function() { /** - * Properties of a BatchUpdateIntentsRequest. + * Properties of a BatchCreateEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchUpdateIntentsRequest - * @property {string|null} [parent] BatchUpdateIntentsRequest parent - * @property {string|null} [intentBatchUri] BatchUpdateIntentsRequest intentBatchUri - * @property {google.cloud.dialogflow.v2beta1.IIntentBatch|null} [intentBatchInline] BatchUpdateIntentsRequest intentBatchInline - * @property {string|null} [languageCode] BatchUpdateIntentsRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateIntentsRequest updateMask - * @property {google.cloud.dialogflow.v2beta1.IntentView|null} [intentView] BatchUpdateIntentsRequest intentView + * @interface IBatchCreateEntitiesRequest + * @property {string|null} [parent] BatchCreateEntitiesRequest parent + * @property {Array.|null} [entities] BatchCreateEntitiesRequest entities + * @property {string|null} [languageCode] BatchCreateEntitiesRequest languageCode */ /** - * Constructs a new BatchUpdateIntentsRequest. + * Constructs a new BatchCreateEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchUpdateIntentsRequest. - * @implements IBatchUpdateIntentsRequest + * @classdesc Represents a BatchCreateEntitiesRequest. + * @implements IBatchCreateEntitiesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest=} [properties] Properties to set */ - function BatchUpdateIntentsRequest(properties) { + function BatchCreateEntitiesRequest(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118033,134 +119160,91 @@ } /** - * BatchUpdateIntentsRequest parent. + * BatchCreateEntitiesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest - * @instance - */ - BatchUpdateIntentsRequest.prototype.parent = ""; - - /** - * BatchUpdateIntentsRequest intentBatchUri. - * @member {string|null|undefined} intentBatchUri - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @instance */ - BatchUpdateIntentsRequest.prototype.intentBatchUri = null; + BatchCreateEntitiesRequest.prototype.parent = ""; /** - * BatchUpdateIntentsRequest intentBatchInline. - * @member {google.cloud.dialogflow.v2beta1.IIntentBatch|null|undefined} intentBatchInline - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * BatchCreateEntitiesRequest entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @instance */ - BatchUpdateIntentsRequest.prototype.intentBatchInline = null; + BatchCreateEntitiesRequest.prototype.entities = $util.emptyArray; /** - * BatchUpdateIntentsRequest languageCode. + * BatchCreateEntitiesRequest languageCode. * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest - * @instance - */ - BatchUpdateIntentsRequest.prototype.languageCode = ""; - - /** - * BatchUpdateIntentsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest - * @instance - */ - BatchUpdateIntentsRequest.prototype.updateMask = null; - - /** - * BatchUpdateIntentsRequest intentView. - * @member {google.cloud.dialogflow.v2beta1.IntentView} intentView - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest - * @instance - */ - BatchUpdateIntentsRequest.prototype.intentView = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchUpdateIntentsRequest intentBatch. - * @member {"intentBatchUri"|"intentBatchInline"|undefined} intentBatch - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @instance */ - Object.defineProperty(BatchUpdateIntentsRequest.prototype, "intentBatch", { - get: $util.oneOfGetter($oneOfFields = ["intentBatchUri", "intentBatchInline"]), - set: $util.oneOfSetter($oneOfFields) - }); + BatchCreateEntitiesRequest.prototype.languageCode = ""; /** - * Creates a new BatchUpdateIntentsRequest instance using the specified properties. + * Creates a new BatchCreateEntitiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest instance + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest instance */ - BatchUpdateIntentsRequest.create = function create(properties) { - return new BatchUpdateIntentsRequest(properties); + BatchCreateEntitiesRequest.create = function create(properties) { + return new BatchCreateEntitiesRequest(properties); }; /** - * Encodes the specified BatchUpdateIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * Encodes the specified BatchCreateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} message BatchUpdateIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} message BatchCreateEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateIntentsRequest.encode = function encode(message, writer) { + BatchCreateEntitiesRequest.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.intentBatchUri != null && Object.hasOwnProperty.call(message, "intentBatchUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentBatchUri); - if (message.intentBatchInline != null && Object.hasOwnProperty.call(message, "intentBatchInline")) - $root.google.cloud.dialogflow.v2beta1.IntentBatch.encode(message.intentBatchInline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.intentView != null && Object.hasOwnProperty.call(message, "intentView")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.intentView); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified BatchUpdateIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.verify|verify} messages. + * Encodes the specified BatchCreateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsRequest} message BatchUpdateIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} message BatchCreateEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer. + * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateIntentsRequest.decode = function decode(reader, length) { + BatchCreateEntitiesRequest.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.v2beta1.BatchUpdateIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -118168,19 +119252,12 @@ message.parent = reader.string(); break; case 2: - message.intentBatchUri = reader.string(); - break; - case 3: - message.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.decode(reader, reader.uint32()); - break; - case 4: - message.languageCode = reader.string(); - break; - case 5: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); break; - case 6: - message.intentView = reader.int32(); + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -118191,184 +119268,146 @@ }; /** - * Decodes a BatchUpdateIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + BatchCreateEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchUpdateIntentsRequest message. + * Verifies a BatchCreateEntitiesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchUpdateIntentsRequest.verify = function verify(message) { + BatchCreateEntitiesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.intentBatchUri != null && message.hasOwnProperty("intentBatchUri")) { - properties.intentBatch = 1; - if (!$util.isString(message.intentBatchUri)) - return "intentBatchUri: string expected"; - } - if (message.intentBatchInline != null && message.hasOwnProperty("intentBatchInline")) { - if (properties.intentBatch === 1) - return "intentBatch: multiple values"; - properties.intentBatch = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.IntentBatch.verify(message.intentBatchInline); + 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.v2beta1.EntityType.Entity.verify(message.entities[i]); if (error) - return "intentBatchInline." + error; + return "entities." + 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.intentView != null && message.hasOwnProperty("intentView")) - switch (message.intentView) { - default: - return "intentView: enum value expected"; - case 0: - case 1: - break; - } return null; }; /** - * Creates a BatchUpdateIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} BatchUpdateIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest */ - BatchUpdateIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest) + BatchCreateEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.intentBatchUri != null) - message.intentBatchUri = String(object.intentBatchUri); - if (object.intentBatchInline != null) { - if (typeof object.intentBatchInline !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intentBatchInline: object expected"); - message.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.fromObject(object.intentBatchInline); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.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.v2beta1.BatchCreateEntitiesRequest.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); + } } if (object.languageCode != null) message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - switch (object.intentView) { - case "INTENT_VIEW_UNSPECIFIED": - case 0: - message.intentView = 0; - break; - case "INTENT_VIEW_FULL": - case 1: - message.intentView = 1; - break; - } return message; }; /** - * Creates a plain object from a BatchUpdateIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateEntitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest} message BatchUpdateIntentsRequest + * @param {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} message BatchCreateEntitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchUpdateIntentsRequest.toObject = function toObject(message, options) { + BatchCreateEntitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.entities = []; if (options.defaults) { object.parent = ""; object.languageCode = ""; - object.updateMask = null; - object.intentView = options.enums === String ? "INTENT_VIEW_UNSPECIFIED" : 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.intentBatchUri != null && message.hasOwnProperty("intentBatchUri")) { - object.intentBatchUri = message.intentBatchUri; - if (options.oneofs) - object.intentBatch = "intentBatchUri"; - } - if (message.intentBatchInline != null && message.hasOwnProperty("intentBatchInline")) { - object.intentBatchInline = $root.google.cloud.dialogflow.v2beta1.IntentBatch.toObject(message.intentBatchInline, options); - if (options.oneofs) - object.intentBatch = "intentBatchInline"; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.toObject(message.entities[j], 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.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; /** - * Converts this BatchUpdateIntentsRequest to JSON. + * Converts this BatchCreateEntitiesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest * @instance * @returns {Object.} JSON object */ - BatchUpdateIntentsRequest.prototype.toJSON = function toJSON() { + BatchCreateEntitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchUpdateIntentsRequest; + return BatchCreateEntitiesRequest; })(); - v2beta1.BatchUpdateIntentsResponse = (function() { + v2beta1.BatchUpdateEntitiesRequest = (function() { /** - * Properties of a BatchUpdateIntentsResponse. + * Properties of a BatchUpdateEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchUpdateIntentsResponse - * @property {Array.|null} [intents] BatchUpdateIntentsResponse intents + * @interface IBatchUpdateEntitiesRequest + * @property {string|null} [parent] BatchUpdateEntitiesRequest parent + * @property {Array.|null} [entities] BatchUpdateEntitiesRequest entities + * @property {string|null} [languageCode] BatchUpdateEntitiesRequest languageCode + * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateEntitiesRequest updateMask */ /** - * Constructs a new BatchUpdateIntentsResponse. + * Constructs a new BatchUpdateEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchUpdateIntentsResponse. - * @implements IBatchUpdateIntentsResponse + * @classdesc Represents a BatchUpdateEntitiesRequest. + * @implements IBatchUpdateEntitiesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest=} [properties] Properties to set */ - function BatchUpdateIntentsResponse(properties) { - this.intents = []; + function BatchUpdateEntitiesRequest(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118376,78 +119415,117 @@ } /** - * BatchUpdateIntentsResponse intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * BatchUpdateEntitiesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @instance */ - BatchUpdateIntentsResponse.prototype.intents = $util.emptyArray; + BatchUpdateEntitiesRequest.prototype.parent = ""; /** - * Creates a new BatchUpdateIntentsResponse instance using the specified properties. + * BatchUpdateEntitiesRequest entities. + * @member {Array.} entities + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest + * @instance + */ + BatchUpdateEntitiesRequest.prototype.entities = $util.emptyArray; + + /** + * BatchUpdateEntitiesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest + * @instance + */ + BatchUpdateEntitiesRequest.prototype.languageCode = ""; + + /** + * BatchUpdateEntitiesRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest + * @instance + */ + BatchUpdateEntitiesRequest.prototype.updateMask = null; + + /** + * Creates a new BatchUpdateEntitiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse instance + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest instance */ - BatchUpdateIntentsResponse.create = function create(properties) { - return new BatchUpdateIntentsResponse(properties); + BatchUpdateEntitiesRequest.create = function create(properties) { + return new BatchUpdateEntitiesRequest(properties); }; /** - * Encodes the specified BatchUpdateIntentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * Encodes the specified BatchUpdateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse} message BatchUpdateIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateIntentsResponse.encode = function encode(message, writer) { + BatchUpdateEntitiesRequest.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.v2beta1.Intent.encode(message.intents[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.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], 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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchUpdateIntentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.verify|verify} messages. + * Encodes the specified BatchUpdateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateIntentsResponse} message BatchUpdateIntentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateIntentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BatchUpdateEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchUpdateIntentsResponse message from the specified reader or buffer. + * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateIntentsResponse.decode = function decode(reader, length) { + BatchUpdateEntitiesRequest.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.v2beta1.BatchUpdateIntentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest(); 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.v2beta1.Intent.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + case 2: + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); + break; + case 3: + message.languageCode = reader.string(); + break; + case 4: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -118458,126 +119536,158 @@ }; /** - * Decodes a BatchUpdateIntentsResponse message from the specified reader or buffer, length delimited. + * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateIntentsResponse.decodeDelimited = function decodeDelimited(reader) { + BatchUpdateEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchUpdateIntentsResponse message. + * Verifies a BatchUpdateEntitiesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchUpdateIntentsResponse.verify = function verify(message) { + BatchUpdateEntitiesRequest.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.v2beta1.Intent.verify(message.intents[i]); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + 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.v2beta1.EntityType.Entity.verify(message.entities[i]); if (error) - return "intents." + error; + return "entities." + 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 a BatchUpdateIntentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BatchUpdateEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} BatchUpdateIntentsResponse + * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest */ - BatchUpdateIntentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse) + BatchUpdateEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse.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.v2beta1.BatchUpdateIntentsResponse.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.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.v2beta1.BatchUpdateEntitiesRequest.entities: object expected"); + message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); } } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a BatchUpdateIntentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BatchUpdateEntitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse} message BatchUpdateIntentsResponse + * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchUpdateIntentsResponse.toObject = function toObject(message, options) { + BatchUpdateEntitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.intents = []; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + object.entities = []; + if (options.defaults) { + object.parent = ""; + object.languageCode = ""; + object.updateMask = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.toObject(message.entities[j], 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 BatchUpdateIntentsResponse to JSON. + * Converts this BatchUpdateEntitiesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse + * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest * @instance * @returns {Object.} JSON object */ - BatchUpdateIntentsResponse.prototype.toJSON = function toJSON() { + BatchUpdateEntitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchUpdateIntentsResponse; + return BatchUpdateEntitiesRequest; })(); - v2beta1.BatchDeleteIntentsRequest = (function() { + v2beta1.BatchDeleteEntitiesRequest = (function() { /** - * Properties of a BatchDeleteIntentsRequest. + * Properties of a BatchDeleteEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchDeleteIntentsRequest - * @property {string|null} [parent] BatchDeleteIntentsRequest parent - * @property {Array.|null} [intents] BatchDeleteIntentsRequest intents + * @interface IBatchDeleteEntitiesRequest + * @property {string|null} [parent] BatchDeleteEntitiesRequest parent + * @property {Array.|null} [entityValues] BatchDeleteEntitiesRequest entityValues + * @property {string|null} [languageCode] BatchDeleteEntitiesRequest languageCode */ /** - * Constructs a new BatchDeleteIntentsRequest. + * Constructs a new BatchDeleteEntitiesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchDeleteIntentsRequest. - * @implements IBatchDeleteIntentsRequest + * @classdesc Represents a BatchDeleteEntitiesRequest. + * @implements IBatchDeleteEntitiesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest=} [properties] Properties to set */ - function BatchDeleteIntentsRequest(properties) { - this.intents = []; + function BatchDeleteEntitiesRequest(properties) { + this.entityValues = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118585,81 +119695,91 @@ } /** - * BatchDeleteIntentsRequest parent. + * BatchDeleteEntitiesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @instance */ - BatchDeleteIntentsRequest.prototype.parent = ""; + BatchDeleteEntitiesRequest.prototype.parent = ""; /** - * BatchDeleteIntentsRequest intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * BatchDeleteEntitiesRequest entityValues. + * @member {Array.} entityValues + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @instance */ - BatchDeleteIntentsRequest.prototype.intents = $util.emptyArray; + BatchDeleteEntitiesRequest.prototype.entityValues = $util.emptyArray; /** - * Creates a new BatchDeleteIntentsRequest instance using the specified properties. + * BatchDeleteEntitiesRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest + * @instance + */ + BatchDeleteEntitiesRequest.prototype.languageCode = ""; + + /** + * Creates a new BatchDeleteEntitiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest instance + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest instance */ - BatchDeleteIntentsRequest.create = function create(properties) { - return new BatchDeleteIntentsRequest(properties); + BatchDeleteEntitiesRequest.create = function create(properties) { + return new BatchDeleteEntitiesRequest(properties); }; /** - * Encodes the specified BatchDeleteIntentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * Encodes the specified BatchDeleteEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} message BatchDeleteIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchDeleteIntentsRequest.encode = function encode(message, writer) { + BatchDeleteEntitiesRequest.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.intents != null && message.intents.length) - for (var i = 0; i < message.intents.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Intent.encode(message.intents[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entityValues != null && message.entityValues.length) + for (var i = 0; i < message.entityValues.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityValues[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); return writer; }; /** - * Encodes the specified BatchDeleteIntentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.verify|verify} messages. + * Encodes the specified BatchDeleteEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteIntentsRequest} message BatchDeleteIntentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchDeleteIntentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + BatchDeleteEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchDeleteIntentsRequest message from the specified reader or buffer. + * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchDeleteIntentsRequest.decode = function decode(reader, length) { + BatchDeleteEntitiesRequest.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.v2beta1.BatchDeleteIntentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -118667,9 +119787,12 @@ message.parent = reader.string(); break; case 2: - if (!(message.intents && message.intents.length)) - message.intents = []; - message.intents.push($root.google.cloud.dialogflow.v2beta1.Intent.decode(reader, reader.uint32())); + if (!(message.entityValues && message.entityValues.length)) + message.entityValues = []; + message.entityValues.push(reader.string()); + break; + case 3: + message.languageCode = reader.string(); break; default: reader.skipType(tag & 7); @@ -118680,148 +119803,138 @@ }; /** - * Decodes a BatchDeleteIntentsRequest message from the specified reader or buffer, length delimited. + * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchDeleteIntentsRequest.decodeDelimited = function decodeDelimited(reader) { + BatchDeleteEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchDeleteIntentsRequest message. + * Verifies a BatchDeleteEntitiesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchDeleteIntentsRequest.verify = function verify(message) { + BatchDeleteEntitiesRequest.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.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.v2beta1.Intent.verify(message.intents[i]); - if (error) - return "intents." + error; - } + if (message.entityValues != null && message.hasOwnProperty("entityValues")) { + if (!Array.isArray(message.entityValues)) + return "entityValues: array expected"; + for (var i = 0; i < message.entityValues.length; ++i) + if (!$util.isString(message.entityValues[i])) + return "entityValues: string[] expected"; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a BatchDeleteIntentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BatchDeleteEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} BatchDeleteIntentsRequest + * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest */ - BatchDeleteIntentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.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.v2beta1.BatchDeleteIntentsRequest.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); - } + BatchDeleteEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entityValues) { + if (!Array.isArray(object.entityValues)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.entityValues: array expected"); + message.entityValues = []; + for (var i = 0; i < object.entityValues.length; ++i) + message.entityValues[i] = String(object.entityValues[i]); } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a BatchDeleteIntentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchDeleteEntitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest} message BatchDeleteIntentsRequest + * @param {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchDeleteIntentsRequest.toObject = function toObject(message, options) { + BatchDeleteEntitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.intents = []; - if (options.defaults) + object.entityValues = []; + if (options.defaults) { object.parent = ""; + object.languageCode = ""; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + if (message.entityValues && message.entityValues.length) { + object.entityValues = []; + for (var j = 0; j < message.entityValues.length; ++j) + object.entityValues[j] = message.entityValues[j]; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this BatchDeleteIntentsRequest to JSON. + * Converts this BatchDeleteEntitiesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest + * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest * @instance * @returns {Object.} JSON object */ - BatchDeleteIntentsRequest.prototype.toJSON = function toJSON() { + BatchDeleteEntitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchDeleteIntentsRequest; - })(); - - /** - * IntentView enum. - * @name google.cloud.dialogflow.v2beta1.IntentView - * @enum {number} - * @property {number} INTENT_VIEW_UNSPECIFIED=0 INTENT_VIEW_UNSPECIFIED value - * @property {number} INTENT_VIEW_FULL=1 INTENT_VIEW_FULL value - */ - v2beta1.IntentView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTENT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTENT_VIEW_FULL"] = 1; - return values; + return BatchDeleteEntitiesRequest; })(); - v2beta1.IntentBatch = (function() { + v2beta1.EntityTypeBatch = (function() { /** - * Properties of an IntentBatch. + * Properties of an EntityTypeBatch. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IIntentBatch - * @property {Array.|null} [intents] IntentBatch intents + * @interface IEntityTypeBatch + * @property {Array.|null} [entityTypes] EntityTypeBatch entityTypes */ /** - * Constructs a new IntentBatch. + * Constructs a new EntityTypeBatch. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an IntentBatch. - * @implements IIntentBatch + * @classdesc Represents an EntityTypeBatch. + * @implements IEntityTypeBatch * @constructor - * @param {google.cloud.dialogflow.v2beta1.IIntentBatch=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch=} [properties] Properties to set */ - function IntentBatch(properties) { - this.intents = []; + function EntityTypeBatch(properties) { + this.entityTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -118829,78 +119942,78 @@ } /** - * IntentBatch intents. - * @member {Array.} intents - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * EntityTypeBatch entityTypes. + * @member {Array.} entityTypes + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @instance */ - IntentBatch.prototype.intents = $util.emptyArray; + EntityTypeBatch.prototype.entityTypes = $util.emptyArray; /** - * Creates a new IntentBatch instance using the specified properties. + * Creates a new EntityTypeBatch instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static - * @param {google.cloud.dialogflow.v2beta1.IIntentBatch=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch instance + * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch instance */ - IntentBatch.create = function create(properties) { - return new IntentBatch(properties); + EntityTypeBatch.create = function create(properties) { + return new EntityTypeBatch(properties); }; /** - * Encodes the specified IntentBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * Encodes the specified EntityTypeBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static - * @param {google.cloud.dialogflow.v2beta1.IIntentBatch} message IntentBatch message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch} message EntityTypeBatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentBatch.encode = function encode(message, writer) { + EntityTypeBatch.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.v2beta1.Intent.encode(message.intents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entityTypes != null && message.entityTypes.length) + for (var i = 0; i < message.entityTypes.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified IntentBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.IntentBatch.verify|verify} messages. + * Encodes the specified EntityTypeBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static - * @param {google.cloud.dialogflow.v2beta1.IIntentBatch} message IntentBatch message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch} message EntityTypeBatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentBatch.encodeDelimited = function encodeDelimited(message, writer) { + EntityTypeBatch.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentBatch message from the specified reader or buffer. + * Decodes an EntityTypeBatch message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentBatch.decode = function decode(reader, length) { + EntityTypeBatch.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.v2beta1.IntentBatch(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch(); 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.v2beta1.Intent.decode(reader, reader.uint32())); + if (!(message.entityTypes && message.entityTypes.length)) + message.entityTypes = []; + message.entityTypes.push($root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -118911,327 +120024,363 @@ }; /** - * Decodes an IntentBatch message from the specified reader or buffer, length delimited. + * Decodes an EntityTypeBatch message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentBatch.decodeDelimited = function decodeDelimited(reader) { + EntityTypeBatch.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentBatch message. + * Verifies an EntityTypeBatch message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IntentBatch.verify = function verify(message) { + EntityTypeBatch.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.v2beta1.Intent.verify(message.intents[i]); + 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.v2beta1.EntityType.verify(message.entityTypes[i]); if (error) - return "intents." + error; + return "entityTypes." + error; } } return null; }; /** - * Creates an IntentBatch message from a plain object. Also converts values to their respective internal types. + * Creates an EntityTypeBatch message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.IntentBatch} IntentBatch + * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch */ - IntentBatch.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.IntentBatch) + EntityTypeBatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.IntentBatch(); - if (object.intents) { - if (!Array.isArray(object.intents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.IntentBatch.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.v2beta1.IntentBatch.intents: object expected"); - message.intents[i] = $root.google.cloud.dialogflow.v2beta1.Intent.fromObject(object.intents[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch(); + if (object.entityTypes) { + if (!Array.isArray(object.entityTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.EntityTypeBatch.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.v2beta1.EntityTypeBatch.entityTypes: object expected"); + message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); } } return message; }; /** - * Creates a plain object from an IntentBatch message. Also converts values to other types if specified. + * Creates a plain object from an EntityTypeBatch message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @static - * @param {google.cloud.dialogflow.v2beta1.IntentBatch} message IntentBatch + * @param {google.cloud.dialogflow.v2beta1.EntityTypeBatch} message EntityTypeBatch * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IntentBatch.toObject = function toObject(message, options) { + EntityTypeBatch.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.intents = []; - if (message.intents && message.intents.length) { - object.intents = []; - for (var j = 0; j < message.intents.length; ++j) - object.intents[j] = $root.google.cloud.dialogflow.v2beta1.Intent.toObject(message.intents[j], options); + object.entityTypes = []; + if (message.entityTypes && message.entityTypes.length) { + object.entityTypes = []; + for (var j = 0; j < message.entityTypes.length; ++j) + object.entityTypes[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityTypes[j], options); } return object; }; /** - * Converts this IntentBatch to JSON. + * Converts this EntityTypeBatch to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.IntentBatch + * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch * @instance * @returns {Object.} JSON object */ - IntentBatch.prototype.toJSON = function toJSON() { + EntityTypeBatch.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return IntentBatch; + return EntityTypeBatch; })(); - v2beta1.SessionEntityTypes = (function() { + v2beta1.Conversations = (function() { /** - * Constructs a new SessionEntityTypes service. + * Constructs a new Conversations service. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SessionEntityTypes + * @classdesc Represents a Conversations * @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) { + function Conversations(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - (SessionEntityTypes.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SessionEntityTypes; + (Conversations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Conversations; /** - * Creates new SessionEntityTypes service using the specified rpc implementation. + * Creates new Conversations service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @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. + * @returns {Conversations} RPC service. Useful where requests and/or responses are streamed. */ - SessionEntityTypes.create = function create(rpcImpl, requestDelimited, responseDelimited) { + Conversations.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#listSessionEntityTypes}. - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes - * @typedef ListSessionEntityTypesCallback + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#createConversation}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef CreateConversationCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} [response] ListSessionEntityTypesResponse + * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation */ /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypesCallback} callback Node-style callback called with the error, if any, and ListSessionEntityTypesResponse + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.CreateConversationCallback} callback Node-style callback called with the error, if any, and Conversation * @returns {undefined} * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.listSessionEntityTypes = function listSessionEntityTypes(request, callback) { - return this.rpcCall(listSessionEntityTypes, $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest, $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse, request, callback); - }, "name", { value: "ListSessionEntityTypes" }); + Object.defineProperty(Conversations.prototype.createConversation = function createConversation(request, callback) { + return this.rpcCall(createConversation, $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); + }, "name", { value: "CreateConversation" }); /** - * Calls ListSessionEntityTypes. - * @function listSessionEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} request ListSessionEntityTypesRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#getSessionEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes - * @typedef GetSessionEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listConversations}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef ListConversationsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.ListConversationsResponse} [response] ListConversationsResponse */ /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} request ListConversationsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.ListConversationsCallback} callback Node-style callback called with the error, if any, and ListConversationsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.getSessionEntityType = function getSessionEntityType(request, callback) { - return this.rpcCall(getSessionEntityType, $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); - }, "name", { value: "GetSessionEntityType" }); + Object.defineProperty(Conversations.prototype.listConversations = function listConversations(request, callback) { + return this.rpcCall(listConversations, $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest, $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse, request, callback); + }, "name", { value: "ListConversations" }); /** - * Calls GetSessionEntityType. - * @function getSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} request GetSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} request ListConversationsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#createSessionEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes - * @typedef CreateSessionEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#getConversation}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef GetConversationCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation */ /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} request GetConversationRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.GetConversationCallback} callback Node-style callback called with the error, if any, and Conversation * @returns {undefined} * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.createSessionEntityType = function createSessionEntityType(request, callback) { - return this.rpcCall(createSessionEntityType, $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); - }, "name", { value: "CreateSessionEntityType" }); + Object.defineProperty(Conversations.prototype.getConversation = function getConversation(request, callback) { + return this.rpcCall(getConversation, $root.google.cloud.dialogflow.v2beta1.GetConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); + }, "name", { value: "GetConversation" }); /** - * Calls CreateSessionEntityType. - * @function createSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} request CreateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} request GetConversationRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#updateSessionEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes - * @typedef UpdateSessionEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#completeConversation}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef CompleteConversationCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} [response] SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation */ /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls CompleteConversation. + * @function completeConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} request CompleteConversationRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.CompleteConversationCallback} callback Node-style callback called with the error, if any, and Conversation * @returns {undefined} * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.updateSessionEntityType = function updateSessionEntityType(request, callback) { - return this.rpcCall(updateSessionEntityType, $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.SessionEntityType, request, callback); - }, "name", { value: "UpdateSessionEntityType" }); + Object.defineProperty(Conversations.prototype.completeConversation = function completeConversation(request, callback) { + return this.rpcCall(completeConversation, $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); + }, "name", { value: "CompleteConversation" }); /** - * Calls UpdateSessionEntityType. - * @function updateSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls CompleteConversation. + * @function completeConversation + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} request UpdateSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} request CompleteConversationRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.SessionEntityTypes#deleteSessionEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes - * @typedef DeleteSessionEntityTypeCallback + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#batchCreateMessages}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef BatchCreateMessagesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} [response] BatchCreateMessagesResponse */ /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls BatchCreateMessages. + * @function batchCreateMessages + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} request BatchCreateMessagesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.BatchCreateMessagesCallback} callback Node-style callback called with the error, if any, and BatchCreateMessagesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(SessionEntityTypes.prototype.deleteSessionEntityType = function deleteSessionEntityType(request, callback) { - return this.rpcCall(deleteSessionEntityType, $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSessionEntityType" }); + Object.defineProperty(Conversations.prototype.batchCreateMessages = function batchCreateMessages(request, callback) { + return this.rpcCall(batchCreateMessages, $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest, $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse, request, callback); + }, "name", { value: "BatchCreateMessages" }); /** - * Calls DeleteSessionEntityType. - * @function deleteSessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityTypes + * Calls BatchCreateMessages. + * @function batchCreateMessages + * @memberof google.cloud.dialogflow.v2beta1.Conversations * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} request DeleteSessionEntityTypeRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} request BatchCreateMessagesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ - return SessionEntityTypes; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listMessages}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef ListMessagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListMessagesResponse} [response] ListMessagesResponse + */ + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} request ListMessagesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.ListMessagesCallback} callback Node-style callback called with the error, if any, and ListMessagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Conversations.prototype.listMessages = function listMessages(request, callback) { + return this.rpcCall(listMessages, $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest, $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse, request, callback); + }, "name", { value: "ListMessages" }); + + /** + * Calls ListMessages. + * @function listMessages + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} request ListMessagesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Conversations; })(); - v2beta1.SessionEntityType = (function() { + v2beta1.Conversation = (function() { /** - * Properties of a SessionEntityType. + * Properties of a Conversation. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ISessionEntityType - * @property {string|null} [name] SessionEntityType name - * @property {google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode|null} [entityOverrideMode] SessionEntityType entityOverrideMode - * @property {Array.|null} [entities] SessionEntityType entities + * @interface IConversation + * @property {string|null} [name] Conversation name + * @property {google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|null} [lifecycleState] Conversation lifecycleState + * @property {string|null} [conversationProfile] Conversation conversationProfile + * @property {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null} [phoneNumber] Conversation phoneNumber + * @property {google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|null} [conversationStage] Conversation conversationStage + * @property {google.protobuf.ITimestamp|null} [startTime] Conversation startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Conversation endTime */ /** - * Constructs a new SessionEntityType. + * Constructs a new Conversation. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a SessionEntityType. - * @implements ISessionEntityType + * @classdesc Represents a Conversation. + * @implements IConversation * @constructor - * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IConversation=} [properties] Properties to set */ - function SessionEntityType(properties) { - this.entities = []; + function Conversation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119239,91 +120388,130 @@ } /** - * SessionEntityType name. + * Conversation name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @instance */ - SessionEntityType.prototype.name = ""; + Conversation.prototype.name = ""; /** - * SessionEntityType entityOverrideMode. - * @member {google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode} entityOverrideMode - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * Conversation lifecycleState. + * @member {google.cloud.dialogflow.v2beta1.Conversation.LifecycleState} lifecycleState + * @memberof google.cloud.dialogflow.v2beta1.Conversation + * @instance + */ + Conversation.prototype.lifecycleState = 0; + + /** + * Conversation conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.Conversation + * @instance + */ + Conversation.prototype.conversationProfile = ""; + + /** + * Conversation phoneNumber. + * @member {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null|undefined} phoneNumber + * @memberof google.cloud.dialogflow.v2beta1.Conversation + * @instance + */ + Conversation.prototype.phoneNumber = null; + + /** + * Conversation conversationStage. + * @member {google.cloud.dialogflow.v2beta1.Conversation.ConversationStage} conversationStage + * @memberof google.cloud.dialogflow.v2beta1.Conversation + * @instance + */ + Conversation.prototype.conversationStage = 0; + + /** + * Conversation startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @instance */ - SessionEntityType.prototype.entityOverrideMode = 0; + Conversation.prototype.startTime = null; /** - * SessionEntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * Conversation endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @instance */ - SessionEntityType.prototype.entities = $util.emptyArray; + Conversation.prototype.endTime = null; /** - * Creates a new SessionEntityType instance using the specified properties. + * Creates a new Conversation instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static - * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType instance + * @param {google.cloud.dialogflow.v2beta1.IConversation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation instance */ - SessionEntityType.create = function create(properties) { - return new SessionEntityType(properties); + Conversation.create = function create(properties) { + return new Conversation(properties); }; /** - * Encodes the specified SessionEntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static - * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversation} message Conversation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encode = function encode(message, writer) { + Conversation.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 2, wireType 0 =*/16).int32(message.entityOverrideMode); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lifecycleState); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversationProfile); + if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.encode(message.phoneNumber, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.conversationStage != null && Object.hasOwnProperty.call(message, "conversationStage")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.conversationStage); return writer; }; /** - * Encodes the specified SessionEntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SessionEntityType.verify|verify} messages. + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static - * @param {google.cloud.dialogflow.v2beta1.ISessionEntityType} message SessionEntityType message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversation} message Conversation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEntityType.encodeDelimited = function encodeDelimited(message, writer) { + Conversation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEntityType message from the specified reader or buffer. + * Decodes a Conversation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation * @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) { + Conversation.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.v2beta1.SessionEntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Conversation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -119331,12 +120519,22 @@ message.name = reader.string(); break; case 2: - message.entityOverrideMode = reader.int32(); + message.lifecycleState = reader.int32(); break; case 3: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); + message.conversationProfile = reader.string(); + break; + case 4: + message.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.decode(reader, reader.uint32()); + break; + case 7: + message.conversationStage = reader.int32(); + break; + case 5: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -119347,410 +120545,239 @@ }; /** - * Decodes a SessionEntityType message from the specified reader or buffer, length delimited. + * Decodes a Conversation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation * @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) { + Conversation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEntityType message. + * Verifies a Conversation message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @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) { + Conversation.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) { + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + switch (message.lifecycleState) { default: - return "entityOverrideMode: enum value expected"; + return "lifecycleState: 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.v2beta1.EntityType.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + var error = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify(message.phoneNumber); + if (error) + return "phoneNumber." + error; + } + if (message.conversationStage != null && message.hasOwnProperty("conversationStage")) + switch (message.conversationStage) { + default: + return "conversationStage: enum value expected"; + case 0: + case 1: + case 2: + break; } + 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; } return null; }; /** - * Creates a SessionEntityType message from a plain object. Also converts values to their respective internal types. + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.SessionEntityType} SessionEntityType + * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation */ - SessionEntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.SessionEntityType) + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Conversation) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.SessionEntityType(); + var message = new $root.google.cloud.dialogflow.v2beta1.Conversation(); if (object.name != null) message.name = String(object.name); - switch (object.entityOverrideMode) { - case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": + switch (object.lifecycleState) { + case "LIFECYCLE_STATE_UNSPECIFIED": case 0: - message.entityOverrideMode = 0; + message.lifecycleState = 0; break; - case "ENTITY_OVERRIDE_MODE_OVERRIDE": + case "IN_PROGRESS": case 1: - message.entityOverrideMode = 1; + message.lifecycleState = 1; break; - case "ENTITY_OVERRIDE_MODE_SUPPLEMENT": + case "COMPLETED": case 2: - message.entityOverrideMode = 2; + message.lifecycleState = 2; break; } - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.SessionEntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); - } + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + if (object.phoneNumber != null) { + if (typeof object.phoneNumber !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Conversation.phoneNumber: object expected"); + message.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.fromObject(object.phoneNumber); + } + switch (object.conversationStage) { + case "CONVERSATION_STAGE_UNSPECIFIED": + case 0: + message.conversationStage = 0; + break; + case "VIRTUAL_AGENT_STAGE": + case 1: + message.conversationStage = 1; + break; + case "HUMAN_ASSIST_STAGE": + case 2: + message.conversationStage = 2; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Conversation.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.v2beta1.Conversation.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } return message; }; /** - * Creates a plain object from a SessionEntityType message. Also converts values to other types if specified. + * Creates a plain object from a Conversation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @static - * @param {google.cloud.dialogflow.v2beta1.SessionEntityType} message SessionEntityType + * @param {google.cloud.dialogflow.v2beta1.Conversation} message Conversation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEntityType.toObject = function toObject(message, options) { + Conversation.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; + object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; + object.conversationProfile = ""; + object.phoneNumber = null; + object.startTime = null; + object.endTime = null; + object.conversationStage = options.enums === String ? "CONVERSATION_STAGE_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.v2beta1.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.v2beta1.EntityType.Entity.toObject(message.entities[j], options); - } + if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) + object.lifecycleState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.LifecycleState[message.lifecycleState] : message.lifecycleState; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.toObject(message.phoneNumber, 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.conversationStage != null && message.hasOwnProperty("conversationStage")) + object.conversationStage = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.ConversationStage[message.conversationStage] : message.conversationStage; return object; }; /** - * Converts this SessionEntityType to JSON. + * Converts this Conversation to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.SessionEntityType + * @memberof google.cloud.dialogflow.v2beta1.Conversation * @instance * @returns {Object.} JSON object */ - SessionEntityType.prototype.toJSON = function toJSON() { + Conversation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * EntityOverrideMode enum. - * @name google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode + * LifecycleState enum. + * @name google.cloud.dialogflow.v2beta1.Conversation.LifecycleState * @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 + * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} COMPLETED=2 COMPLETED value */ - SessionEntityType.EntityOverrideMode = (function() { + Conversation.LifecycleState = (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; + values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "COMPLETED"] = 2; return values; })(); - return SessionEntityType; - })(); - - v2beta1.ListSessionEntityTypesRequest = (function() { - - /** - * Properties of a ListSessionEntityTypesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListSessionEntityTypesRequest - * @property {string|null} [parent] ListSessionEntityTypesRequest parent - * @property {number|null} [pageSize] ListSessionEntityTypesRequest pageSize - * @property {string|null} [pageToken] ListSessionEntityTypesRequest pageToken - */ - - /** - * Constructs a new ListSessionEntityTypesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListSessionEntityTypesRequest. - * @implements IListSessionEntityTypesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest=} [properties] Properties to set - */ - function ListSessionEntityTypesRequest(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]]; - } - - /** - * ListSessionEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @instance - */ - ListSessionEntityTypesRequest.prototype.parent = ""; - - /** - * ListSessionEntityTypesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @instance - */ - ListSessionEntityTypesRequest.prototype.pageSize = 0; - - /** - * ListSessionEntityTypesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @instance - */ - ListSessionEntityTypesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSessionEntityTypesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest instance - */ - ListSessionEntityTypesRequest.create = function create(properties) { - return new ListSessionEntityTypesRequest(properties); - }; - - /** - * Encodes the specified ListSessionEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Encodes the specified ListSessionEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesRequest} message ListSessionEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSessionEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.v2beta1.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; - }; - - /** - * Decodes a ListSessionEntityTypesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSessionEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSessionEntityTypesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - 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; - }; - - /** - * Creates a ListSessionEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} ListSessionEntityTypesRequest - */ - ListSessionEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.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 ListSessionEntityTypesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest} message ListSessionEntityTypesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - }; - /** - * Converts this ListSessionEntityTypesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest - * @instance - * @returns {Object.} JSON object + * ConversationStage enum. + * @name google.cloud.dialogflow.v2beta1.Conversation.ConversationStage + * @enum {number} + * @property {number} CONVERSATION_STAGE_UNSPECIFIED=0 CONVERSATION_STAGE_UNSPECIFIED value + * @property {number} VIRTUAL_AGENT_STAGE=1 VIRTUAL_AGENT_STAGE value + * @property {number} HUMAN_ASSIST_STAGE=2 HUMAN_ASSIST_STAGE value */ - ListSessionEntityTypesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Conversation.ConversationStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONVERSATION_STAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTUAL_AGENT_STAGE"] = 1; + values[valuesById[2] = "HUMAN_ASSIST_STAGE"] = 2; + return values; + })(); - return ListSessionEntityTypesRequest; + return Conversation; })(); - v2beta1.ListSessionEntityTypesResponse = (function() { + v2beta1.ConversationPhoneNumber = (function() { /** - * Properties of a ListSessionEntityTypesResponse. + * Properties of a ConversationPhoneNumber. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListSessionEntityTypesResponse - * @property {Array.|null} [sessionEntityTypes] ListSessionEntityTypesResponse sessionEntityTypes - * @property {string|null} [nextPageToken] ListSessionEntityTypesResponse nextPageToken + * @interface IConversationPhoneNumber + * @property {string|null} [phoneNumber] ConversationPhoneNumber phoneNumber */ /** - * Constructs a new ListSessionEntityTypesResponse. + * Constructs a new ConversationPhoneNumber. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListSessionEntityTypesResponse. - * @implements IListSessionEntityTypesResponse + * @classdesc Represents a ConversationPhoneNumber. + * @implements IConversationPhoneNumber * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber=} [properties] Properties to set */ - function ListSessionEntityTypesResponse(properties) { - this.sessionEntityTypes = []; + function ConversationPhoneNumber(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119758,91 +120785,75 @@ } /** - * ListSessionEntityTypesResponse sessionEntityTypes. - * @member {Array.} sessionEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse - * @instance - */ - ListSessionEntityTypesResponse.prototype.sessionEntityTypes = $util.emptyArray; - - /** - * ListSessionEntityTypesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * ConversationPhoneNumber phoneNumber. + * @member {string} phoneNumber + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @instance */ - ListSessionEntityTypesResponse.prototype.nextPageToken = ""; + ConversationPhoneNumber.prototype.phoneNumber = ""; /** - * Creates a new ListSessionEntityTypesResponse instance using the specified properties. + * Creates a new ConversationPhoneNumber instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse instance + * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber instance */ - ListSessionEntityTypesResponse.create = function create(properties) { - return new ListSessionEntityTypesResponse(properties); + ConversationPhoneNumber.create = function create(properties) { + return new ConversationPhoneNumber(properties); }; /** - * Encodes the specified ListSessionEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified ConversationPhoneNumber message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber} message ConversationPhoneNumber message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encode = function encode(message, writer) { + ConversationPhoneNumber.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.v2beta1.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.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phoneNumber); return writer; }; /** - * Encodes the specified ListSessionEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.verify|verify} messages. + * Encodes the specified ConversationPhoneNumber message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static - * @param {google.cloud.dialogflow.v2beta1.IListSessionEntityTypesResponse} message ListSessionEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber} message ConversationPhoneNumber message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ConversationPhoneNumber.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer. + * Decodes a ConversationPhoneNumber message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber * @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) { + ConversationPhoneNumber.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.v2beta1.ListSessionEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber(); 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.v2beta1.SessionEntityType.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.phoneNumber = reader.string(); break; default: reader.skipType(tag & 7); @@ -119853,133 +120864,109 @@ }; /** - * Decodes a ListSessionEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a ConversationPhoneNumber message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber * @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) { + ConversationPhoneNumber.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionEntityTypesResponse message. + * Verifies a ConversationPhoneNumber message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @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) { + ConversationPhoneNumber.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.v2beta1.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"; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (!$util.isString(message.phoneNumber)) + return "phoneNumber: string expected"; return null; }; /** - * Creates a ListSessionEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationPhoneNumber message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} ListSessionEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber */ - ListSessionEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse) + ConversationPhoneNumber.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse(); - if (object.sessionEntityTypes) { - if (!Array.isArray(object.sessionEntityTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListSessionEntityTypesResponse.sessionEntityTypes: object expected"); - message.sessionEntityTypes[i] = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityTypes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber(); + if (object.phoneNumber != null) + message.phoneNumber = String(object.phoneNumber); return message; }; /** - * Creates a plain object from a ListSessionEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ConversationPhoneNumber message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @static - * @param {google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse} message ListSessionEntityTypesResponse + * @param {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} message ConversationPhoneNumber * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionEntityTypesResponse.toObject = function toObject(message, options) { + ConversationPhoneNumber.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.v2beta1.SessionEntityType.toObject(message.sessionEntityTypes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.phoneNumber = ""; + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + object.phoneNumber = message.phoneNumber; return object; }; /** - * Converts this ListSessionEntityTypesResponse to JSON. + * Converts this ConversationPhoneNumber to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber * @instance * @returns {Object.} JSON object */ - ListSessionEntityTypesResponse.prototype.toJSON = function toJSON() { + ConversationPhoneNumber.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListSessionEntityTypesResponse; + return ConversationPhoneNumber; })(); - v2beta1.GetSessionEntityTypeRequest = (function() { + v2beta1.CreateConversationRequest = (function() { /** - * Properties of a GetSessionEntityTypeRequest. + * Properties of a CreateConversationRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetSessionEntityTypeRequest - * @property {string|null} [name] GetSessionEntityTypeRequest name + * @interface ICreateConversationRequest + * @property {string|null} [parent] CreateConversationRequest parent + * @property {google.cloud.dialogflow.v2beta1.IConversation|null} [conversation] CreateConversationRequest conversation + * @property {string|null} [conversationId] CreateConversationRequest conversationId */ /** - * Constructs a new GetSessionEntityTypeRequest. + * Constructs a new CreateConversationRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetSessionEntityTypeRequest. - * @implements IGetSessionEntityTypeRequest + * @classdesc Represents a CreateConversationRequest. + * @implements ICreateConversationRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest=} [properties] Properties to set */ - function GetSessionEntityTypeRequest(properties) { + function CreateConversationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119987,75 +120974,101 @@ } /** - * GetSessionEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * CreateConversationRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @instance */ - GetSessionEntityTypeRequest.prototype.name = ""; + CreateConversationRequest.prototype.parent = ""; /** - * Creates a new GetSessionEntityTypeRequest instance using the specified properties. + * CreateConversationRequest conversation. + * @member {google.cloud.dialogflow.v2beta1.IConversation|null|undefined} conversation + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversation = null; + + /** + * CreateConversationRequest conversationId. + * @member {string} conversationId + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversationId = ""; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest instance */ - GetSessionEntityTypeRequest.create = function create(properties) { - return new GetSessionEntityTypeRequest(properties); + CreateConversationRequest.create = function create(properties) { + return new CreateConversationRequest(properties); }; /** - * Encodes the specified GetSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encode = function encode(message, writer) { + CreateConversationRequest.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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.cloud.dialogflow.v2beta1.Conversation.encode(message.conversation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversationId); return writer; }; /** - * Encodes the specified GetSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetSessionEntityTypeRequest} message GetSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a CreateConversationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest * @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) { + CreateConversationRequest.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.v2beta1.GetSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest(); 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.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.decode(reader, reader.uint32()); + break; + case 3: + message.conversationId = reader.string(); break; default: reader.skipType(tag & 7); @@ -120066,108 +121079,132 @@ }; /** - * Decodes a GetSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest * @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) { + CreateConversationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSessionEntityTypeRequest message. + * Verifies a CreateConversationRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @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) { + CreateConversationRequest.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.conversation != null && message.hasOwnProperty("conversation")) { + var error = $root.google.cloud.dialogflow.v2beta1.Conversation.verify(message.conversation); + if (error) + return "conversation." + error; + } + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + if (!$util.isString(message.conversationId)) + return "conversationId: string expected"; return null; }; /** - * Creates a GetSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} GetSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest */ - GetSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest) + CreateConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateConversationRequest.conversation: object expected"); + message.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.fromObject(object.conversation); + } + if (object.conversationId != null) + message.conversationId = String(object.conversationId); return message; }; /** - * Creates a plain object from a GetSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest} message GetSessionEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.CreateConversationRequest} message CreateConversationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSessionEntityTypeRequest.toObject = function toObject(message, options) { + CreateConversationRequest.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.conversation = null; + object.conversationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.toObject(message.conversation, options); + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + object.conversationId = message.conversationId; return object; }; /** - * Converts this GetSessionEntityTypeRequest to JSON. + * Converts this CreateConversationRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest * @instance * @returns {Object.} JSON object */ - GetSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + CreateConversationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSessionEntityTypeRequest; + return CreateConversationRequest; })(); - v2beta1.CreateSessionEntityTypeRequest = (function() { + v2beta1.ListConversationsRequest = (function() { /** - * Properties of a CreateSessionEntityTypeRequest. + * Properties of a ListConversationsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateSessionEntityTypeRequest - * @property {string|null} [parent] CreateSessionEntityTypeRequest parent - * @property {google.cloud.dialogflow.v2beta1.ISessionEntityType|null} [sessionEntityType] CreateSessionEntityTypeRequest sessionEntityType + * @interface IListConversationsRequest + * @property {string|null} [parent] ListConversationsRequest parent + * @property {number|null} [pageSize] ListConversationsRequest pageSize + * @property {string|null} [pageToken] ListConversationsRequest pageToken + * @property {string|null} [filter] ListConversationsRequest filter */ /** - * Constructs a new CreateSessionEntityTypeRequest. + * Constructs a new ListConversationsRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateSessionEntityTypeRequest. - * @implements ICreateSessionEntityTypeRequest + * @classdesc Represents a ListConversationsRequest. + * @implements IListConversationsRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest=} [properties] Properties to set */ - function CreateSessionEntityTypeRequest(properties) { + function ListConversationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120175,80 +121212,100 @@ } /** - * CreateSessionEntityTypeRequest parent. + * ListConversationsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @instance */ - CreateSessionEntityTypeRequest.prototype.parent = ""; + ListConversationsRequest.prototype.parent = ""; /** - * CreateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.v2beta1.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * ListConversationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @instance */ - CreateSessionEntityTypeRequest.prototype.sessionEntityType = null; + ListConversationsRequest.prototype.pageSize = 0; /** - * Creates a new CreateSessionEntityTypeRequest instance using the specified properties. + * ListConversationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageToken = ""; + + /** + * ListConversationsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.filter = ""; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest instance */ - CreateSessionEntityTypeRequest.create = function create(properties) { - return new CreateSessionEntityTypeRequest(properties); + ListConversationsRequest.create = function create(properties) { + return new ListConversationsRequest(properties); }; /** - * Encodes the specified CreateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encode = function encode(message, writer) { + ListConversationsRequest.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.v2beta1.SessionEntityType.encode(message.sessionEntityType, 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); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified CreateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a ListConversationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest * @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) { + ListConversationsRequest.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.v2beta1.CreateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -120256,7 +121313,13 @@ message.parent = reader.string(); break; case 2: - message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 4: + message.filter = reader.string(); break; default: reader.skipType(tag & 7); @@ -120267,122 +121330,134 @@ }; /** - * Decodes a CreateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest * @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) { + ListConversationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSessionEntityTypeRequest message. + * Verifies a ListConversationsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @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) { + ListConversationsRequest.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.v2beta1.SessionEntityType.verify(message.sessionEntityType); - if (error) - return "sessionEntityType." + 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"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a CreateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} CreateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest */ - CreateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest) + ListConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityType); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a CreateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest} message CreateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.ListConversationsRequest} message ListConversationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSessionEntityTypeRequest.toObject = function toObject(message, options) { + ListConversationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.sessionEntityType = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.toObject(message.sessionEntityType, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this CreateSessionEntityTypeRequest to JSON. + * Converts this ListConversationsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest * @instance * @returns {Object.} JSON object */ - CreateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + ListConversationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateSessionEntityTypeRequest; + return ListConversationsRequest; })(); - v2beta1.UpdateSessionEntityTypeRequest = (function() { + v2beta1.ListConversationsResponse = (function() { /** - * Properties of an UpdateSessionEntityTypeRequest. + * Properties of a ListConversationsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateSessionEntityTypeRequest - * @property {google.cloud.dialogflow.v2beta1.ISessionEntityType|null} [sessionEntityType] UpdateSessionEntityTypeRequest sessionEntityType - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSessionEntityTypeRequest updateMask + * @interface IListConversationsResponse + * @property {Array.|null} [conversations] ListConversationsResponse conversations + * @property {string|null} [nextPageToken] ListConversationsResponse nextPageToken */ /** - * Constructs a new UpdateSessionEntityTypeRequest. + * Constructs a new ListConversationsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateSessionEntityTypeRequest. - * @implements IUpdateSessionEntityTypeRequest + * @classdesc Represents a ListConversationsResponse. + * @implements IListConversationsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse=} [properties] Properties to set */ - function UpdateSessionEntityTypeRequest(properties) { + function ListConversationsResponse(properties) { + this.conversations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120390,88 +121465,91 @@ } /** - * UpdateSessionEntityTypeRequest sessionEntityType. - * @member {google.cloud.dialogflow.v2beta1.ISessionEntityType|null|undefined} sessionEntityType - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * ListConversationsResponse conversations. + * @member {Array.} conversations + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @instance */ - UpdateSessionEntityTypeRequest.prototype.sessionEntityType = null; + ListConversationsResponse.prototype.conversations = $util.emptyArray; /** - * UpdateSessionEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * ListConversationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @instance */ - UpdateSessionEntityTypeRequest.prototype.updateMask = null; + ListConversationsResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateSessionEntityTypeRequest instance using the specified properties. + * Creates a new ListConversationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse instance */ - UpdateSessionEntityTypeRequest.create = function create(properties) { - return new UpdateSessionEntityTypeRequest(properties); + ListConversationsResponse.create = function create(properties) { + return new ListConversationsResponse(properties); }; /** - * Encodes the specified UpdateSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encode = function encode(message, writer) { + ListConversationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessionEntityType != null && Object.hasOwnProperty.call(message, "sessionEntityType")) - $root.google.cloud.dialogflow.v2beta1.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.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Conversation.encode(message.conversations[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 UpdateSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a ListConversationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse * @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) { + ListConversationsResponse.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.v2beta1.UpdateSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.decode(reader, reader.uint32()); + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.google.cloud.dialogflow.v2beta1.Conversation.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); @@ -120482,126 +121560,133 @@ }; /** - * Decodes an UpdateSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse * @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) { + ListConversationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSessionEntityTypeRequest message. + * Verifies a ListConversationsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @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) { + ListConversationsResponse.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.v2beta1.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 (error) - return "updateMask." + error; + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} UpdateSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse */ - UpdateSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest) + ListConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest(); - if (object.sessionEntityType != null) { - if (typeof object.sessionEntityType !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.sessionEntityType: object expected"); - message.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.fromObject(object.sessionEntityType); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse(); + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationsResponse.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationsResponse.conversations: object expected"); + message.conversations[i] = $root.google.cloud.dialogflow.v2beta1.Conversation.fromObject(object.conversations[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest} message UpdateSessionEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.ListConversationsResponse} message ListConversationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSessionEntityTypeRequest.toObject = function toObject(message, options) { + ListConversationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sessionEntityType = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.conversations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.google.cloud.dialogflow.v2beta1.Conversation.toObject(message.conversations[j], options); } - if (message.sessionEntityType != null && message.hasOwnProperty("sessionEntityType")) - object.sessionEntityType = $root.google.cloud.dialogflow.v2beta1.SessionEntityType.toObject(message.sessionEntityType, 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 UpdateSessionEntityTypeRequest to JSON. + * Converts this ListConversationsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse * @instance * @returns {Object.} JSON object */ - UpdateSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + ListConversationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSessionEntityTypeRequest; + return ListConversationsResponse; })(); - v2beta1.DeleteSessionEntityTypeRequest = (function() { + v2beta1.GetConversationRequest = (function() { /** - * Properties of a DeleteSessionEntityTypeRequest. + * Properties of a GetConversationRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteSessionEntityTypeRequest - * @property {string|null} [name] DeleteSessionEntityTypeRequest name + * @interface IGetConversationRequest + * @property {string|null} [name] GetConversationRequest name */ /** - * Constructs a new DeleteSessionEntityTypeRequest. + * Constructs a new GetConversationRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteSessionEntityTypeRequest. - * @implements IDeleteSessionEntityTypeRequest + * @classdesc Represents a GetConversationRequest. + * @implements IGetConversationRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest=} [properties] Properties to set */ - function DeleteSessionEntityTypeRequest(properties) { + function GetConversationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -120609,35 +121694,35 @@ } /** - * DeleteSessionEntityTypeRequest name. + * GetConversationRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @instance */ - DeleteSessionEntityTypeRequest.prototype.name = ""; + GetConversationRequest.prototype.name = ""; /** - * Creates a new DeleteSessionEntityTypeRequest instance using the specified properties. + * Creates a new GetConversationRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest instance */ - DeleteSessionEntityTypeRequest.create = function create(properties) { - return new DeleteSessionEntityTypeRequest(properties); + GetConversationRequest.create = function create(properties) { + return new GetConversationRequest(properties); }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} message GetConversationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encode = function encode(message, writer) { + GetConversationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -120646,33 +121731,33 @@ }; /** - * Encodes the specified DeleteSessionEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest.verify|verify} messages. + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} message GetConversationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSessionEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer. + * Decodes a GetConversationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest * @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) { + GetConversationRequest.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.v2beta1.DeleteSessionEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetConversationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -120688,30 +121773,30 @@ }; /** - * Decodes a DeleteSessionEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest * @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) { + GetConversationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSessionEntityTypeRequest message. + * Verifies a GetConversationRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @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) { + GetConversationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -120721,32 +121806,32 @@ }; /** - * Creates a DeleteSessionEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} DeleteSessionEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest */ - DeleteSessionEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest) + GetConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetConversationRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.GetConversationRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteSessionEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest} message DeleteSessionEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.GetConversationRequest} message GetConversationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSessionEntityTypeRequest.toObject = function toObject(message, options) { + GetConversationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -120758,408 +121843,441 @@ }; /** - * Converts this DeleteSessionEntityTypeRequest to JSON. + * Converts this GetConversationRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest * @instance * @returns {Object.} JSON object */ - DeleteSessionEntityTypeRequest.prototype.toJSON = function toJSON() { + GetConversationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSessionEntityTypeRequest; + return GetConversationRequest; })(); - v2beta1.EntityTypes = (function() { + v2beta1.CompleteConversationRequest = (function() { /** - * Constructs a new EntityTypes service. + * Properties of a CompleteConversationRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @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.v2beta1.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.v2beta1.EntityTypes#listEntityTypes}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef ListEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} [response] ListEntityTypesResponse - */ - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesRequest, $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse, request, callback); - }, "name", { value: "ListEntityTypes" }); - - /** - * Calls ListEntityTypes. - * @function listEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} request ListEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#getEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef GetEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType - */ - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.GetEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); - }, "name", { value: "GetEntityType" }); - - /** - * Calls GetEntityType. - * @function getEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} request GetEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @interface ICompleteConversationRequest + * @property {string|null} [name] CompleteConversationRequest name */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#createEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef CreateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType + * Constructs a new CompleteConversationRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CompleteConversationRequest. + * @implements ICompleteConversationRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest=} [properties] Properties to set */ + function CompleteConversationRequest(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 CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * CompleteConversationRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.CreateEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); - }, "name", { value: "CreateEntityType" }); + CompleteConversationRequest.prototype.name = ""; /** - * Calls CreateEntityType. - * @function createEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} request CreateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new CompleteConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest instance */ + CompleteConversationRequest.create = function create(properties) { + return new CompleteConversationRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#updateEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef UpdateEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.EntityType} [response] EntityType + * Encodes the specified CompleteConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} message CompleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CompleteConversationRequest.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; + }; /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityTypeCallback} callback Node-style callback called with the error, if any, and EntityType - * @returns {undefined} - * @variation 1 + * Encodes the specified CompleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} message CompleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(EntityTypes.prototype.updateEntityType = function updateEntityType(request, callback) { - return this.rpcCall(updateEntityType, $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest, $root.google.cloud.dialogflow.v2beta1.EntityType, request, callback); - }, "name", { value: "UpdateEntityType" }); + CompleteConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateEntityType. - * @function updateEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} request UpdateEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CompleteConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CompleteConversationRequest.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.v2beta1.CompleteConversationRequest(); + 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; + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#deleteEntityType}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef DeleteEntityTypeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a CompleteConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CompleteConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityTypeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies a CompleteConversationRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(EntityTypes.prototype.deleteEntityType = function deleteEntityType(request, callback) { - return this.rpcCall(deleteEntityType, $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntityType" }); + CompleteConversationRequest.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; + }; /** - * Calls DeleteEntityType. - * @function deleteEntityType - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} request DeleteEntityTypeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CompleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest */ + CompleteConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntityTypes}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef BatchUpdateEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a CompleteConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} message CompleteConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CompleteConversationRequest.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; + }; /** - * Calls BatchUpdateEntityTypes. - * @function batchUpdateEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * Converts this CompleteConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} request BatchUpdateEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(EntityTypes.prototype.batchUpdateEntityTypes = function batchUpdateEntityTypes(request, callback) { - return this.rpcCall(batchUpdateEntityTypes, $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchUpdateEntityTypes" }); + CompleteConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompleteConversationRequest; + })(); + + v2beta1.CreateMessageRequest = (function() { /** - * Calls BatchUpdateEntityTypes. - * @function batchUpdateEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} request BatchUpdateEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a CreateMessageRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ICreateMessageRequest + * @property {string|null} [parent] CreateMessageRequest parent + * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [message] CreateMessageRequest message */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntityTypes}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef BatchDeleteEntityTypesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new CreateMessageRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CreateMessageRequest. + * @implements ICreateMessageRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest=} [properties] Properties to set */ + function CreateMessageRequest(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 BatchDeleteEntityTypes. - * @function batchDeleteEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * CreateMessageRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} request BatchDeleteEntityTypesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(EntityTypes.prototype.batchDeleteEntityTypes = function batchDeleteEntityTypes(request, callback) { - return this.rpcCall(batchDeleteEntityTypes, $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchDeleteEntityTypes" }); + CreateMessageRequest.prototype.parent = ""; /** - * Calls BatchDeleteEntityTypes. - * @function batchDeleteEntityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * CreateMessageRequest message. + * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} message + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} request BatchDeleteEntityTypesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateMessageRequest.prototype.message = null; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchCreateEntities}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef BatchCreateEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new CreateMessageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest instance */ + CreateMessageRequest.create = function create(properties) { + return new CreateMessageRequest(properties); + }; /** - * Calls BatchCreateEntities. - * @function batchCreateEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} request BatchCreateEntitiesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntitiesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateMessageRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest} message CreateMessageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(EntityTypes.prototype.batchCreateEntities = function batchCreateEntities(request, callback) { - return this.rpcCall(batchCreateEntities, $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchCreateEntities" }); + CreateMessageRequest.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.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls BatchCreateEntities. - * @function batchCreateEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} request BatchCreateEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CreateMessageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest} message CreateMessageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateMessageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchUpdateEntities}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef BatchUpdateEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a CreateMessageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateMessageRequest.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.v2beta1.CreateMessageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.message = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls BatchUpdateEntities. - * @function batchUpdateEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} request BatchUpdateEntitiesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntitiesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes a CreateMessageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(EntityTypes.prototype.batchUpdateEntities = function batchUpdateEntities(request, callback) { - return this.rpcCall(batchUpdateEntities, $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchUpdateEntities" }); + CreateMessageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls BatchUpdateEntities. - * @function batchUpdateEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} request BatchUpdateEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a CreateMessageRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + CreateMessageRequest.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.message != null && message.hasOwnProperty("message")) { + var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.message); + if (error) + return "message." + error; + } + return null; + }; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.EntityTypes#batchDeleteEntities}. - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @typedef BatchDeleteEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a CreateMessageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest */ + CreateMessageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateMessageRequest.message: object expected"); + message.message = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.message); + } + return message; + }; /** - * Calls BatchDeleteEntities. - * @function batchDeleteEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} request BatchDeleteEntitiesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntitiesCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a CreateMessageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.CreateMessageRequest} message CreateMessageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(EntityTypes.prototype.batchDeleteEntities = function batchDeleteEntities(request, callback) { - return this.rpcCall(batchDeleteEntities, $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "BatchDeleteEntities" }); + CreateMessageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.message = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.message, options); + return object; + }; /** - * Calls BatchDeleteEntities. - * @function batchDeleteEntities - * @memberof google.cloud.dialogflow.v2beta1.EntityTypes + * Converts this CreateMessageRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} request BatchDeleteEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + CreateMessageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EntityTypes; + return CreateMessageRequest; })(); - v2beta1.EntityType = (function() { + v2beta1.BatchCreateMessagesRequest = (function() { /** - * Properties of an EntityType. + * Properties of a BatchCreateMessagesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IEntityType - * @property {string|null} [name] EntityType name - * @property {string|null} [displayName] EntityType displayName - * @property {google.cloud.dialogflow.v2beta1.EntityType.Kind|null} [kind] EntityType kind - * @property {google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode|null} [autoExpansionMode] EntityType autoExpansionMode - * @property {Array.|null} [entities] EntityType entities - * @property {boolean|null} [enableFuzzyExtraction] EntityType enableFuzzyExtraction + * @interface IBatchCreateMessagesRequest + * @property {string|null} [parent] BatchCreateMessagesRequest parent + * @property {Array.|null} [requests] BatchCreateMessagesRequest requests */ /** - * Constructs a new EntityType. + * Constructs a new BatchCreateMessagesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an EntityType. - * @implements IEntityType + * @classdesc Represents a BatchCreateMessagesRequest. + * @implements IBatchCreateMessagesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IEntityType=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest=} [properties] Properties to set */ - function EntityType(properties) { - this.entities = []; + function BatchCreateMessagesRequest(properties) { + this.requests = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121167,143 +122285,91 @@ } /** - * EntityType name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @instance - */ - EntityType.prototype.name = ""; - - /** - * EntityType displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @instance - */ - EntityType.prototype.displayName = ""; - - /** - * EntityType kind. - * @member {google.cloud.dialogflow.v2beta1.EntityType.Kind} kind - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @instance - */ - EntityType.prototype.kind = 0; - - /** - * EntityType autoExpansionMode. - * @member {google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode} autoExpansionMode - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @instance - */ - EntityType.prototype.autoExpansionMode = 0; - - /** - * EntityType entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * BatchCreateMessagesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @instance */ - EntityType.prototype.entities = $util.emptyArray; + BatchCreateMessagesRequest.prototype.parent = ""; /** - * EntityType enableFuzzyExtraction. - * @member {boolean} enableFuzzyExtraction - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * BatchCreateMessagesRequest requests. + * @member {Array.} requests + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @instance */ - EntityType.prototype.enableFuzzyExtraction = false; + BatchCreateMessagesRequest.prototype.requests = $util.emptyArray; /** - * Creates a new EntityType instance using the specified properties. + * Creates a new BatchCreateMessagesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityType=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType instance + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest instance */ - EntityType.create = function create(properties) { - return new EntityType(properties); + BatchCreateMessagesRequest.create = function create(properties) { + return new BatchCreateMessagesRequest(properties); }; /** - * Encodes the specified EntityType message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. + * Encodes the specified BatchCreateMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} message BatchCreateMessagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encode = function encode(message, writer) { + BatchCreateMessagesRequest.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.v2beta1.EntityType.Entity.encode(message.entities[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); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified EntityType message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.verify|verify} messages. + * Encodes the specified BatchCreateMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityType} message EntityType message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} message BatchCreateMessagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityType.encodeDelimited = function encodeDelimited(message, writer) { + BatchCreateMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityType message from the specified reader or buffer. + * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest * @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) { + BatchCreateMessagesRequest.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.v2beta1.EntityType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest(); 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(); - break; - case 3: - message.kind = reader.int32(); - break; - case 4: - message.autoExpansionMode = reader.int32(); - break; - case 6: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); - break; - case 7: - message.enableFuzzyExtraction = reader.bool(); + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -121314,463 +122380,344 @@ }; /** - * Decodes an EntityType message from the specified reader or buffer, length delimited. + * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest * @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) { + BatchCreateMessagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityType message. + * Verifies a BatchCreateMessagesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @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) { + BatchCreateMessagesRequest.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.v2beta1.EntityType.Entity.verify(message.entities[i]); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify(message.requests[i]); if (error) - return "entities." + error; + return "requests." + error; } } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - if (typeof message.enableFuzzyExtraction !== "boolean") - return "enableFuzzyExtraction: boolean expected"; return null; }; /** - * Creates an EntityType message from a plain object. Also converts values to their respective internal types. + * Creates a BatchCreateMessagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EntityType} EntityType + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest */ - EntityType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityType) + BatchCreateMessagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.EntityType.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.requests: object expected"); + message.requests[i] = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.fromObject(object.requests[i]); } } - if (object.enableFuzzyExtraction != null) - message.enableFuzzyExtraction = Boolean(object.enableFuzzyExtraction); return message; }; /** - * Creates a plain object from an EntityType message. Also converts values to other types if specified. + * Creates a plain object from a BatchCreateMessagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.EntityType} message EntityType + * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} message BatchCreateMessagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityType.toObject = function toObject(message, options) { + BatchCreateMessagesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entities = []; - 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.v2beta1.EntityType.Kind[message.kind] : message.kind; - if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType.Entity.toObject(message.entities[j], options); + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.toObject(message.requests[j], options); } - if (message.enableFuzzyExtraction != null && message.hasOwnProperty("enableFuzzyExtraction")) - object.enableFuzzyExtraction = message.enableFuzzyExtraction; return object; }; /** - * Converts this EntityType to JSON. + * Converts this BatchCreateMessagesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EntityType + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest * @instance * @returns {Object.} JSON object */ - EntityType.prototype.toJSON = function toJSON() { + BatchCreateMessagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return BatchCreateMessagesRequest; + })(); + + v2beta1.BatchCreateMessagesResponse = (function() { + /** - * Kind enum. - * @name google.cloud.dialogflow.v2beta1.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 + * Properties of a BatchCreateMessagesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IBatchCreateMessagesResponse + * @property {Array.|null} [messages] BatchCreateMessagesResponse messages */ - 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; - })(); /** - * AutoExpansionMode enum. - * @name google.cloud.dialogflow.v2beta1.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 + * Constructs a new BatchCreateMessagesResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a BatchCreateMessagesResponse. + * @implements IBatchCreateMessagesResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse=} [properties] Properties to set */ - 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; - })(); - - EntityType.Entity = (function() { - - /** - * Properties of an Entity. - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @interface IEntity - * @property {string|null} [value] Entity value - * @property {Array.|null} [synonyms] Entity synonyms - */ - - /** - * Constructs a new Entity. - * @memberof google.cloud.dialogflow.v2beta1.EntityType - * @classdesc Represents an Entity. - * @implements IEntity - * @constructor - * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.EntityType.Entity - * @instance - */ - Entity.prototype.value = ""; - - /** - * Entity synonyms. - * @member {Array.} synonyms - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @instance - */ - Entity.prototype.synonyms = $util.emptyArray; - - /** - * Creates a new Entity instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.v2beta1.EntityType.IEntity=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EntityType.Entity} Entity instance - */ - Entity.create = function create(properties) { - return new Entity(properties); - }; + function BatchCreateMessagesResponse(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]]; + } - /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.Entity.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.v2beta1.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; - }; + /** + * BatchCreateMessagesResponse messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @instance + */ + BatchCreateMessagesResponse.prototype.messages = $util.emptyArray; - /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityType.Entity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.v2beta1.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(); - }; + /** + * Creates a new BatchCreateMessagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse instance + */ + BatchCreateMessagesResponse.create = function create(properties) { + return new BatchCreateMessagesResponse(properties); + }; - /** - * Decodes an Entity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.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.v2beta1.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; - }; + /** + * Encodes the specified BatchCreateMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse} message BatchCreateMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateMessagesResponse.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.v2beta1.Message.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes an Entity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.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()); - }; + /** + * Encodes the specified BatchCreateMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse} message BatchCreateMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Entity message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.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"; + /** + * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateMessagesResponse.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.v2beta1.BatchCreateMessagesResponse(); + 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.v2beta1.Message.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EntityType.Entity} Entity - */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityType.Entity) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.EntityType.Entity(); - if (object.value != null) - message.value = String(object.value); - if (object.synonyms) { - if (!Array.isArray(object.synonyms)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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; - }; + /** + * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @static - * @param {google.cloud.dialogflow.v2beta1.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]; + /** + * Verifies a BatchCreateMessagesResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateMessagesResponse.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.v2beta1.Message.verify(message.messages[i]); + if (error) + return "messages." + error; } + } + return null; + }; + + /** + * Creates a BatchCreateMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + */ + BatchCreateMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse) return object; - }; + var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.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.v2beta1.BatchCreateMessagesResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.messages[i]); + } + } + return message; + }; - /** - * Converts this Entity to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EntityType.Entity - * @instance - * @returns {Object.} JSON object - */ - Entity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BatchCreateMessagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} message BatchCreateMessagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateMessagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.messages[j], options); + } + return object; + }; - return Entity; - })(); + /** + * Converts this BatchCreateMessagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateMessagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return EntityType; + return BatchCreateMessagesResponse; })(); - v2beta1.ListEntityTypesRequest = (function() { + v2beta1.ListMessagesRequest = (function() { /** - * Properties of a ListEntityTypesRequest. + * Properties of a ListMessagesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @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 IListMessagesRequest + * @property {string|null} [parent] ListMessagesRequest parent + * @property {string|null} [filter] ListMessagesRequest filter + * @property {number|null} [pageSize] ListMessagesRequest pageSize + * @property {string|null} [pageToken] ListMessagesRequest pageToken */ /** - * Constructs a new ListEntityTypesRequest. + * Constructs a new ListMessagesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListEntityTypesRequest. - * @implements IListEntityTypesRequest + * @classdesc Represents a ListMessagesRequest. + * @implements IListMessagesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest=} [properties] Properties to set */ - function ListEntityTypesRequest(properties) { + function ListMessagesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -121778,113 +122725,113 @@ } /** - * ListEntityTypesRequest parent. + * ListMessagesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @instance */ - ListEntityTypesRequest.prototype.parent = ""; + ListMessagesRequest.prototype.parent = ""; /** - * ListEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * ListMessagesRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @instance */ - ListEntityTypesRequest.prototype.languageCode = ""; + ListMessagesRequest.prototype.filter = ""; /** - * ListEntityTypesRequest pageSize. + * ListMessagesRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @instance */ - ListEntityTypesRequest.prototype.pageSize = 0; + ListMessagesRequest.prototype.pageSize = 0; /** - * ListEntityTypesRequest pageToken. + * ListMessagesRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @instance */ - ListEntityTypesRequest.prototype.pageToken = ""; + ListMessagesRequest.prototype.pageToken = ""; /** - * Creates a new ListEntityTypesRequest instance using the specified properties. + * Creates a new ListMessagesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest instance */ - ListEntityTypesRequest.create = function create(properties) { - return new ListEntityTypesRequest(properties); + ListMessagesRequest.create = function create(properties) { + return new ListMessagesRequest(properties); }; /** - * Encodes the specified ListEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} message ListMessagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encode = function encode(message, writer) { + ListMessagesRequest.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); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified ListEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.verify|verify} messages. + * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesRequest} message ListEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} message ListMessagesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer. + * Decodes a ListMessagesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest * @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) { + ListMessagesRequest.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.v2beta1.ListEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.parent = reader.string(); break; - case 2: - message.languageCode = reader.string(); + case 4: + message.filter = reader.string(); break; - case 3: + case 2: message.pageSize = reader.int32(); break; - case 4: + case 3: message.pageToken = reader.string(); break; default: @@ -121896,38 +122843,38 @@ }; /** - * Decodes a ListEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest * @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) { + ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesRequest message. + * Verifies a ListMessagesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @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) { + ListMessagesRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -121938,21 +122885,21 @@ }; /** - * Creates a ListEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMessagesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} ListEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest */ - ListEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest) + ListMessagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.filter != null) + message.filter = String(object.filter); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -121961,69 +122908,69 @@ }; /** - * Creates a plain object from a ListEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesRequest} message ListEntityTypesRequest + * @param {google.cloud.dialogflow.v2beta1.ListMessagesRequest} message ListMessagesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesRequest.toObject = function toObject(message, options) { + ListMessagesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.languageCode = ""; object.pageSize = 0; object.pageToken = ""; + object.filter = ""; } 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this ListEntityTypesRequest to JSON. + * Converts this ListMessagesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest * @instance * @returns {Object.} JSON object */ - ListEntityTypesRequest.prototype.toJSON = function toJSON() { + ListMessagesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEntityTypesRequest; + return ListMessagesRequest; })(); - v2beta1.ListEntityTypesResponse = (function() { + v2beta1.ListMessagesResponse = (function() { /** - * Properties of a ListEntityTypesResponse. + * Properties of a ListMessagesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListEntityTypesResponse - * @property {Array.|null} [entityTypes] ListEntityTypesResponse entityTypes - * @property {string|null} [nextPageToken] ListEntityTypesResponse nextPageToken + * @interface IListMessagesResponse + * @property {Array.|null} [messages] ListMessagesResponse messages + * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken */ /** - * Constructs a new ListEntityTypesResponse. + * Constructs a new ListMessagesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListEntityTypesResponse. - * @implements IListEntityTypesResponse + * @classdesc Represents a ListMessagesResponse. + * @implements IListMessagesResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse=} [properties] Properties to set */ - function ListEntityTypesResponse(properties) { - this.entityTypes = []; + function ListMessagesResponse(properties) { + this.messages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122031,88 +122978,88 @@ } /** - * ListEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * ListMessagesResponse messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @instance */ - ListEntityTypesResponse.prototype.entityTypes = $util.emptyArray; + ListMessagesResponse.prototype.messages = $util.emptyArray; /** - * ListEntityTypesResponse nextPageToken. + * ListMessagesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @instance */ - ListEntityTypesResponse.prototype.nextPageToken = ""; + ListMessagesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListEntityTypesResponse instance using the specified properties. + * Creates a new ListMessagesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse instance + * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse instance */ - ListEntityTypesResponse.create = function create(properties) { - return new ListEntityTypesResponse(properties); + ListMessagesResponse.create = function create(properties) { + return new ListMessagesResponse(properties); }; /** - * Encodes the specified ListEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse} message ListMessagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encode = function encode(message, writer) { + ListMessagesResponse.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.v2beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.messages[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 ListEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.verify|verify} messages. + * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.IListEntityTypesResponse} message ListEntityTypesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse} message ListMessagesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer. + * Decodes a ListMessagesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse * @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) { + ListMessagesResponse.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.v2beta1.ListEntityTypesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse(); 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.v2beta1.EntityType.decode(reader, reader.uint32())); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32())); break; case 2: message.nextPageToken = reader.string(); @@ -122126,39 +123073,39 @@ }; /** - * Decodes a ListEntityTypesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse * @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) { + ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntityTypesResponse message. + * Verifies a ListMessagesResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @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) { + ListMessagesResponse.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.v2beta1.EntityType.verify(message.entityTypes[i]); + 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.v2beta1.Message.verify(message.messages[i]); if (error) - return "entityTypes." + error; + return "messages." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -122168,25 +123115,25 @@ }; /** - * Creates a ListEntityTypesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} ListEntityTypesResponse + * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse */ - ListEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse) + ListMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); + var message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListMessagesResponse.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.v2beta1.ListMessagesResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.messages[i]); } } if (object.nextPageToken != null) @@ -122195,26 +123142,26 @@ }; /** - * Creates a plain object from a ListEntityTypesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ListEntityTypesResponse} message ListEntityTypesResponse + * @param {google.cloud.dialogflow.v2beta1.ListMessagesResponse} message ListMessagesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntityTypesResponse.toObject = function toObject(message, options) { + ListMessagesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.entityTypes = []; + object.messages = []; 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.v2beta1.EntityType.toObject(message.entityTypes[j], 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.v2beta1.Message.toObject(message.messages[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -122222,38 +123169,40 @@ }; /** - * Converts this ListEntityTypesResponse to JSON. + * Converts this ListMessagesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListEntityTypesResponse + * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse * @instance * @returns {Object.} JSON object */ - ListEntityTypesResponse.prototype.toJSON = function toJSON() { + ListMessagesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListEntityTypesResponse; + return ListMessagesResponse; })(); - v2beta1.GetEntityTypeRequest = (function() { + v2beta1.ConversationEvent = (function() { /** - * Properties of a GetEntityTypeRequest. + * Properties of a ConversationEvent. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetEntityTypeRequest - * @property {string|null} [name] GetEntityTypeRequest name - * @property {string|null} [languageCode] GetEntityTypeRequest languageCode + * @interface IConversationEvent + * @property {string|null} [conversation] ConversationEvent conversation + * @property {google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null} [type] ConversationEvent type + * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus + * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload */ /** - * Constructs a new GetEntityTypeRequest. + * Constructs a new ConversationEvent. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetEntityTypeRequest. - * @implements IGetEntityTypeRequest + * @classdesc Represents a ConversationEvent. + * @implements IConversationEvent * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set */ - function GetEntityTypeRequest(properties) { + function ConversationEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122261,88 +123210,128 @@ } /** - * GetEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * ConversationEvent conversation. + * @member {string} conversation + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @instance */ - GetEntityTypeRequest.prototype.name = ""; + ConversationEvent.prototype.conversation = ""; /** - * GetEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * ConversationEvent type. + * @member {google.cloud.dialogflow.v2beta1.ConversationEvent.Type} type + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.type = 0; + + /** + * ConversationEvent errorStatus. + * @member {google.rpc.IStatus|null|undefined} errorStatus + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.errorStatus = null; + + /** + * ConversationEvent newMessagePayload. + * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} newMessagePayload + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.newMessagePayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationEvent payload. + * @member {"newMessagePayload"|undefined} payload + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @instance */ - GetEntityTypeRequest.prototype.languageCode = ""; + Object.defineProperty(ConversationEvent.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GetEntityTypeRequest instance using the specified properties. + * Creates a new ConversationEvent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent instance */ - GetEntityTypeRequest.create = function create(properties) { - return new GetEntityTypeRequest(properties); + ConversationEvent.create = function create(properties) { + return new ConversationEvent(properties); }; /** - * Encodes the specified GetEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encode = function encode(message, writer) { + ConversationEvent.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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) + $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.verify|verify} messages. + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2beta1.IGetEntityTypeRequest} message GetEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer. + * Decodes a ConversationEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent * @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) { + ConversationEvent.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.v2beta1.GetEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.conversation = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.type = reader.int32(); + break; + case 3: + message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 4: + message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -122353,118 +123342,482 @@ }; /** - * Decodes a GetEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent * @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) { + ConversationEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntityTypeRequest message. + * Verifies a ConversationEvent message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @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) { + ConversationEvent.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.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + 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 5: + case 4: + break; + } + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { + var error = $root.google.rpc.Status.verify(message.errorStatus); + if (error) + return "errorStatus." + error; + } + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + properties.payload = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.newMessagePayload); + if (error) + return "newMessagePayload." + error; + } + } return null; }; /** - * Creates a GetEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} GetEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent */ - GetEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest) + ConversationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationEvent) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest(); - 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.v2beta1.ConversationEvent(); + if (object.conversation != null) + message.conversation = String(object.conversation); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONVERSATION_STARTED": + case 1: + message.type = 1; + break; + case "CONVERSATION_FINISHED": + case 2: + message.type = 2; + break; + case "HUMAN_INTERVENTION_NEEDED": + case 3: + message.type = 3; + break; + case "NEW_MESSAGE": + case 5: + message.type = 5; + break; + case "UNRECOVERABLE_ERROR": + case 4: + message.type = 4; + break; + } + if (object.errorStatus != null) { + if (typeof object.errorStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.errorStatus: object expected"); + message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + } + if (object.newMessagePayload != null) { + if (typeof object.newMessagePayload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.newMessagePayload: object expected"); + message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.newMessagePayload); + } return message; }; /** - * Creates a plain object from a GetEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2beta1.GetEntityTypeRequest} message GetEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.ConversationEvent} message ConversationEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityTypeRequest.toObject = function toObject(message, options) { + ConversationEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.languageCode = ""; + object.conversation = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.errorStatus = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] : message.type; + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + object.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.newMessagePayload, options); + if (options.oneofs) + object.payload = "newMessagePayload"; } - 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 ConversationEvent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent * @instance * @returns {Object.} JSON object */ - GetEntityTypeRequest.prototype.toJSON = function toJSON() { + ConversationEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetEntityTypeRequest; + /** + * Type enum. + * @name google.cloud.dialogflow.v2beta1.ConversationEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value + * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value + * @property {number} HUMAN_INTERVENTION_NEEDED=3 HUMAN_INTERVENTION_NEEDED value + * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value + * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value + */ + ConversationEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONVERSATION_STARTED"] = 1; + values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; + values[valuesById[3] = "HUMAN_INTERVENTION_NEEDED"] = 3; + values[valuesById[5] = "NEW_MESSAGE"] = 5; + values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; + return values; + })(); + + return ConversationEvent; })(); - v2beta1.CreateEntityTypeRequest = (function() { + v2beta1.ConversationProfiles = (function() { /** - * Properties of a CreateEntityTypeRequest. + * Constructs a new ConversationProfiles service. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateEntityTypeRequest - * @property {string|null} [parent] CreateEntityTypeRequest parent - * @property {google.cloud.dialogflow.v2beta1.IEntityType|null} [entityType] CreateEntityTypeRequest entityType - * @property {string|null} [languageCode] CreateEntityTypeRequest languageCode + * @classdesc Represents a ConversationProfiles + * @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 ConversationProfiles(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConversationProfiles.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationProfiles; /** - * Constructs a new CreateEntityTypeRequest. + * Creates new ConversationProfiles service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @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 {ConversationProfiles} RPC service. Useful where requests and/or responses are streamed. + */ + ConversationProfiles.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#listConversationProfiles}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef ListConversationProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} [response] ListConversationProfilesResponse + */ + + /** + * Calls ListConversationProfiles. + * @function listConversationProfiles + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfilesCallback} callback Node-style callback called with the error, if any, and ListConversationProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.listConversationProfiles = function listConversationProfiles(request, callback) { + return this.rpcCall(listConversationProfiles, $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest, $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse, request, callback); + }, "name", { value: "ListConversationProfiles" }); + + /** + * Calls ListConversationProfiles. + * @function listConversationProfiles + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#getConversationProfile}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef GetConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile + */ + + /** + * Calls GetConversationProfile. + * @function getConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.getConversationProfile = function getConversationProfile(request, callback) { + return this.rpcCall(getConversationProfile, $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); + }, "name", { value: "GetConversationProfile" }); + + /** + * Calls GetConversationProfile. + * @function getConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#createConversationProfile}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef CreateConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile + */ + + /** + * Calls CreateConversationProfile. + * @function createConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.createConversationProfile = function createConversationProfile(request, callback) { + return this.rpcCall(createConversationProfile, $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); + }, "name", { value: "CreateConversationProfile" }); + + /** + * Calls CreateConversationProfile. + * @function createConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#updateConversationProfile}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef UpdateConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile + */ + + /** + * Calls UpdateConversationProfile. + * @function updateConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.updateConversationProfile = function updateConversationProfile(request, callback) { + return this.rpcCall(updateConversationProfile, $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); + }, "name", { value: "UpdateConversationProfile" }); + + /** + * Calls UpdateConversationProfile. + * @function updateConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#deleteConversationProfile}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef DeleteConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversationProfile. + * @function deleteConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.deleteConversationProfile = function deleteConversationProfile(request, callback) { + return this.rpcCall(deleteConversationProfile, $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversationProfile" }); + + /** + * Calls DeleteConversationProfile. + * @function deleteConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#setSuggestionFeatureConfig}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef SetSuggestionFeatureConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SetSuggestionFeatureConfig. + * @function setSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.SetSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.setSuggestionFeatureConfig = function setSuggestionFeatureConfig(request, callback) { + return this.rpcCall(setSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SetSuggestionFeatureConfig" }); + + /** + * Calls SetSuggestionFeatureConfig. + * @function setSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#clearSuggestionFeatureConfig}. + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @typedef ClearSuggestionFeatureConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ClearSuggestionFeatureConfig. + * @function clearSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.ClearSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.clearSuggestionFeatureConfig = function clearSuggestionFeatureConfig(request, callback) { + return this.rpcCall(clearSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ClearSuggestionFeatureConfig" }); + + /** + * Calls ClearSuggestionFeatureConfig. + * @function clearSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConversationProfiles; + })(); + + v2beta1.ConversationProfile = (function() { + + /** + * Properties of a ConversationProfile. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateEntityTypeRequest. - * @implements ICreateEntityTypeRequest + * @interface IConversationProfile + * @property {string|null} [name] ConversationProfile name + * @property {string|null} [displayName] ConversationProfile displayName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversationProfile createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConversationProfile updateTime + * @property {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null} [automatedAgentConfig] ConversationProfile automatedAgentConfig + * @property {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null} [humanAgentAssistantConfig] ConversationProfile humanAgentAssistantConfig + * @property {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null} [humanAgentHandoffConfig] ConversationProfile humanAgentHandoffConfig + * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [notificationConfig] ConversationProfile notificationConfig + * @property {google.cloud.dialogflow.v2beta1.ILoggingConfig|null} [loggingConfig] ConversationProfile loggingConfig + * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [newMessageEventNotificationConfig] ConversationProfile newMessageEventNotificationConfig + * @property {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null} [sttConfig] ConversationProfile sttConfig + * @property {string|null} [languageCode] ConversationProfile languageCode + * @property {string|null} [timeZone] ConversationProfile timeZone + * @property {string|null} [securitySettings] ConversationProfile securitySettings + */ + + /** + * Constructs a new ConversationProfile. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ConversationProfile. + * @implements IConversationProfile * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IConversationProfile=} [properties] Properties to set */ - function CreateEntityTypeRequest(properties) { + function ConversationProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122472,338 +123825,244 @@ } /** - * CreateEntityTypeRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest + * ConversationProfile name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - CreateEntityTypeRequest.prototype.parent = ""; + ConversationProfile.prototype.name = ""; /** - * CreateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.v2beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest + * ConversationProfile displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - CreateEntityTypeRequest.prototype.entityType = null; + ConversationProfile.prototype.displayName = ""; /** - * CreateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest + * ConversationProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - CreateEntityTypeRequest.prototype.languageCode = ""; - - /** - * Creates a new CreateEntityTypeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest instance - */ - CreateEntityTypeRequest.create = function create(properties) { - return new CreateEntityTypeRequest(properties); - }; - - /** - * Encodes the specified CreateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntityTypeRequest.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.v2beta1.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 CreateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateEntityTypeRequest} message CreateEntityTypeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ConversationProfile.prototype.createTime = null; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ConversationProfile updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - 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.v2beta1.CreateEntityTypeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32()); - break; - case 3: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + ConversationProfile.prototype.updateTime = null; /** - * Decodes a CreateEntityTypeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ConversationProfile automatedAgentConfig. + * @member {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null|undefined} automatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - CreateEntityTypeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + ConversationProfile.prototype.automatedAgentConfig = null; /** - * Verifies a CreateEntityTypeRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ConversationProfile humanAgentAssistantConfig. + * @member {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null|undefined} humanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - CreateEntityTypeRequest.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.v2beta1.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"; - return null; - }; + ConversationProfile.prototype.humanAgentAssistantConfig = null; /** - * Creates a CreateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} CreateEntityTypeRequest + * ConversationProfile humanAgentHandoffConfig. + * @member {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null|undefined} humanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - CreateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityType); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + ConversationProfile.prototype.humanAgentHandoffConfig = null; /** - * Creates a plain object from a CreateEntityTypeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest} message CreateEntityTypeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ConversationProfile notificationConfig. + * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - CreateEntityTypeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entityType = null; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityType, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + ConversationProfile.prototype.notificationConfig = null; /** - * Converts this CreateEntityTypeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest + * ConversationProfile loggingConfig. + * @member {google.cloud.dialogflow.v2beta1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance - * @returns {Object.} JSON object */ - CreateEntityTypeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateEntityTypeRequest; - })(); - - v2beta1.UpdateEntityTypeRequest = (function() { + ConversationProfile.prototype.loggingConfig = null; /** - * Properties of an UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateEntityTypeRequest - * @property {google.cloud.dialogflow.v2beta1.IEntityType|null} [entityType] UpdateEntityTypeRequest entityType - * @property {string|null} [languageCode] UpdateEntityTypeRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntityTypeRequest updateMask + * ConversationProfile newMessageEventNotificationConfig. + * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} newMessageEventNotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ + ConversationProfile.prototype.newMessageEventNotificationConfig = null; /** - * Constructs a new UpdateEntityTypeRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateEntityTypeRequest. - * @implements IUpdateEntityTypeRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest=} [properties] Properties to set + * ConversationProfile sttConfig. + * @member {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null|undefined} sttConfig + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @instance */ - function UpdateEntityTypeRequest(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]]; - } + ConversationProfile.prototype.sttConfig = null; /** - * UpdateEntityTypeRequest entityType. - * @member {google.cloud.dialogflow.v2beta1.IEntityType|null|undefined} entityType - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * ConversationProfile languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - UpdateEntityTypeRequest.prototype.entityType = null; + ConversationProfile.prototype.languageCode = ""; /** - * UpdateEntityTypeRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * ConversationProfile timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - UpdateEntityTypeRequest.prototype.languageCode = ""; + ConversationProfile.prototype.timeZone = ""; /** - * UpdateEntityTypeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * ConversationProfile securitySettings. + * @member {string} securitySettings + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance */ - UpdateEntityTypeRequest.prototype.updateMask = null; + ConversationProfile.prototype.securitySettings = ""; /** - * Creates a new UpdateEntityTypeRequest instance using the specified properties. + * Creates a new ConversationProfile instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IConversationProfile=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile instance */ - UpdateEntityTypeRequest.create = function create(properties) { - return new UpdateEntityTypeRequest(properties); + ConversationProfile.create = function create(properties) { + return new ConversationProfile(properties); }; /** - * Encodes the specified UpdateEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationProfile} message ConversationProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encode = function encode(message, writer) { + ConversationProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) - $root.google.cloud.dialogflow.v2beta1.EntityType.encode(message.entityType, writer.uint32(/* id 1, wireType 2 =*/10).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.automatedAgentConfig != null && Object.hasOwnProperty.call(message, "automatedAgentConfig")) + $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.encode(message.automatedAgentConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.humanAgentAssistantConfig != null && Object.hasOwnProperty.call(message, "humanAgentAssistantConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.encode(message.humanAgentAssistantConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.humanAgentHandoffConfig != null && Object.hasOwnProperty.call(message, "humanAgentHandoffConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.encode(message.humanAgentHandoffConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.dialogflow.v2beta1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.newMessageEventNotificationConfig != null && Object.hasOwnProperty.call(message, "newMessageEventNotificationConfig")) + $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.newMessageEventNotificationConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sttConfig != null && Object.hasOwnProperty.call(message, "sttConfig")) + $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.encode(message.sttConfig, writer.uint32(/* id 9, wireType 2 =*/74).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 10, wireType 2 =*/82).string(message.languageCode); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); return writer; }; /** - * Encodes the specified UpdateEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.verify|verify} messages. + * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateEntityTypeRequest} message UpdateEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IConversationProfile} message ConversationProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer. + * Decodes a ConversationProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile * @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) { + ConversationProfile.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.v2beta1.UpdateEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ConversationProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.decode(reader, reader.uint32()); + message.name = reader.string(); break; case 2: - message.languageCode = reader.string(); + message.displayName = reader.string(); + break; + case 11: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 12: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.decode(reader, reader.uint32()); + break; + case 4: + message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.decode(reader, reader.uint32()); + break; + case 5: + message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.decode(reader, reader.uint32()); + break; + case 6: + message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); + break; + case 7: + message.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.decode(reader, reader.uint32()); + break; + case 8: + message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); + break; + case 9: + message.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.decode(reader, reader.uint32()); + break; + case 10: + message.languageCode = reader.string(); + break; + case 14: + message.timeZone = reader.string(); + break; + case 13: + message.securitySettings = reader.string(); break; default: reader.skipType(tag & 7); @@ -122814,134 +124073,257 @@ }; /** - * Decodes an UpdateEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile * @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) { + ConversationProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntityTypeRequest message. + * Verifies a ConversationProfile message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @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) { + ConversationProfile.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.v2beta1.EntityType.verify(message.entityType); + 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "entityType." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify(message.automatedAgentConfig); + if (error) + return "automatedAgentConfig." + error; + } + if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify(message.humanAgentAssistantConfig); + if (error) + return "humanAgentAssistantConfig." + error; + } + if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify(message.humanAgentHandoffConfig); + if (error) + return "humanAgentHandoffConfig." + error; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.newMessageEventNotificationConfig); + if (error) + return "newMessageEventNotificationConfig." + error; + } + if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify(message.sttConfig); + if (error) + return "sttConfig." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + if (!$util.isString(message.securitySettings)) + return "securitySettings: string expected"; + return null; + }; + + /** + * Creates a ConversationProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile + */ + ConversationProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationProfile) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ConversationProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.automatedAgentConfig != null) { + if (typeof object.automatedAgentConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.automatedAgentConfig: object expected"); + message.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.fromObject(object.automatedAgentConfig); + } + if (object.humanAgentAssistantConfig != null) { + if (typeof object.humanAgentAssistantConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.humanAgentAssistantConfig: object expected"); + message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.fromObject(object.humanAgentAssistantConfig); + } + if (object.humanAgentHandoffConfig != null) { + if (typeof object.humanAgentHandoffConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.humanAgentHandoffConfig: object expected"); + message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.fromObject(object.humanAgentHandoffConfig); + } + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.notificationConfig); } - 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 (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.fromObject(object.loggingConfig); } - return null; - }; - - /** - * Creates an UpdateEntityTypeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} UpdateEntityTypeRequest - */ - UpdateEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest(); - if (object.entityType != null) { - if (typeof object.entityType !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.entityType: object expected"); - message.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityType); + if (object.newMessageEventNotificationConfig != null) { + if (typeof object.newMessageEventNotificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.newMessageEventNotificationConfig: object expected"); + message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.newMessageEventNotificationConfig); + } + if (object.sttConfig != null) { + if (typeof object.sttConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.sttConfig: object expected"); + message.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.fromObject(object.sttConfig); } if (object.languageCode != null) message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.securitySettings != null) + message.securitySettings = String(object.securitySettings); return message; }; /** - * Creates a plain object from an UpdateEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest} message UpdateEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} message ConversationProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntityTypeRequest.toObject = function toObject(message, options) { + ConversationProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.entityType = null; + object.name = ""; + object.displayName = ""; + object.automatedAgentConfig = null; + object.humanAgentAssistantConfig = null; + object.humanAgentHandoffConfig = null; + object.notificationConfig = null; + object.loggingConfig = null; + object.newMessageEventNotificationConfig = null; + object.sttConfig = null; object.languageCode = ""; - object.updateMask = null; + object.createTime = null; + object.updateTime = null; + object.securitySettings = ""; + object.timeZone = ""; } - if (message.entityType != null && message.hasOwnProperty("entityType")) - object.entityType = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityType, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) + object.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.toObject(message.automatedAgentConfig, options); + if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) + object.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.toObject(message.humanAgentAssistantConfig, options); + if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) + object.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.toObject(message.humanAgentHandoffConfig, options); + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) + object.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.newMessageEventNotificationConfig, options); + if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) + object.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.toObject(message.sttConfig, 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.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = message.securitySettings; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; return object; }; /** - * Converts this UpdateEntityTypeRequest to JSON. + * Converts this ConversationProfile to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile * @instance * @returns {Object.} JSON object */ - UpdateEntityTypeRequest.prototype.toJSON = function toJSON() { + ConversationProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateEntityTypeRequest; + return ConversationProfile; })(); - v2beta1.DeleteEntityTypeRequest = (function() { + v2beta1.AutomatedAgentConfig = (function() { /** - * Properties of a DeleteEntityTypeRequest. + * Properties of an AutomatedAgentConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteEntityTypeRequest - * @property {string|null} [name] DeleteEntityTypeRequest name + * @interface IAutomatedAgentConfig + * @property {string|null} [agent] AutomatedAgentConfig agent */ /** - * Constructs a new DeleteEntityTypeRequest. + * Constructs a new AutomatedAgentConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteEntityTypeRequest. - * @implements IDeleteEntityTypeRequest + * @classdesc Represents an AutomatedAgentConfig. + * @implements IAutomatedAgentConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig=} [properties] Properties to set */ - function DeleteEntityTypeRequest(properties) { + function AutomatedAgentConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -122949,75 +124331,75 @@ } /** - * DeleteEntityTypeRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * AutomatedAgentConfig agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @instance */ - DeleteEntityTypeRequest.prototype.name = ""; + AutomatedAgentConfig.prototype.agent = ""; /** - * Creates a new DeleteEntityTypeRequest instance using the specified properties. + * Creates a new AutomatedAgentConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest instance + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig instance */ - DeleteEntityTypeRequest.create = function create(properties) { - return new DeleteEntityTypeRequest(properties); + AutomatedAgentConfig.create = function create(properties) { + return new AutomatedAgentConfig(properties); }; /** - * Encodes the specified DeleteEntityTypeRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encode = function encode(message, writer) { + AutomatedAgentConfig.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.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); return writer; }; /** - * Encodes the specified DeleteEntityTypeRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest.verify|verify} messages. + * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteEntityTypeRequest} message DeleteEntityTypeRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + AutomatedAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig * @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) { + AutomatedAgentConfig.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.v2beta1.DeleteEntityTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.agent = reader.string(); break; default: reader.skipType(tag & 7); @@ -123028,111 +124410,110 @@ }; /** - * Decodes a DeleteEntityTypeRequest message from the specified reader or buffer, length delimited. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig * @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) { + AutomatedAgentConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntityTypeRequest message. + * Verifies an AutomatedAgentConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @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) { + AutomatedAgentConfig.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.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; return null; }; /** - * Creates a DeleteEntityTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} DeleteEntityTypeRequest + * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig */ - DeleteEntityTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest) + AutomatedAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig(); + if (object.agent != null) + message.agent = String(object.agent); return message; }; /** - * Creates a plain object from a DeleteEntityTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest} message DeleteEntityTypeRequest + * @param {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} message AutomatedAgentConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntityTypeRequest.toObject = function toObject(message, options) { + AutomatedAgentConfig.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.agent = ""; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; return object; }; /** - * Converts this DeleteEntityTypeRequest to JSON. + * Converts this AutomatedAgentConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest + * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig * @instance * @returns {Object.} JSON object */ - DeleteEntityTypeRequest.prototype.toJSON = function toJSON() { + AutomatedAgentConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteEntityTypeRequest; + return AutomatedAgentConfig; })(); - v2beta1.BatchUpdateEntityTypesRequest = (function() { + v2beta1.HumanAgentAssistantConfig = (function() { /** - * Properties of a BatchUpdateEntityTypesRequest. + * Properties of a HumanAgentAssistantConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchUpdateEntityTypesRequest - * @property {string|null} [parent] BatchUpdateEntityTypesRequest parent - * @property {string|null} [entityTypeBatchUri] BatchUpdateEntityTypesRequest entityTypeBatchUri - * @property {google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null} [entityTypeBatchInline] BatchUpdateEntityTypesRequest entityTypeBatchInline - * @property {string|null} [languageCode] BatchUpdateEntityTypesRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateEntityTypesRequest updateMask + * @interface IHumanAgentAssistantConfig + * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [notificationConfig] HumanAgentAssistantConfig notificationConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null} [humanAgentSuggestionConfig] HumanAgentAssistantConfig humanAgentSuggestionConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null} [endUserSuggestionConfig] HumanAgentAssistantConfig endUserSuggestionConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null} [messageAnalysisConfig] HumanAgentAssistantConfig messageAnalysisConfig */ /** - * Constructs a new BatchUpdateEntityTypesRequest. + * Constructs a new HumanAgentAssistantConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchUpdateEntityTypesRequest. - * @implements IBatchUpdateEntityTypesRequest + * @classdesc Represents a HumanAgentAssistantConfig. + * @implements IHumanAgentAssistantConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig=} [properties] Properties to set */ - function BatchUpdateEntityTypesRequest(properties) { + function HumanAgentAssistantConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -123140,141 +124521,114 @@ } /** - * BatchUpdateEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest - * @instance - */ - BatchUpdateEntityTypesRequest.prototype.parent = ""; - - /** - * BatchUpdateEntityTypesRequest entityTypeBatchUri. - * @member {string|null|undefined} entityTypeBatchUri - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest - * @instance - */ - BatchUpdateEntityTypesRequest.prototype.entityTypeBatchUri = null; - - /** - * BatchUpdateEntityTypesRequest entityTypeBatchInline. - * @member {google.cloud.dialogflow.v2beta1.IEntityTypeBatch|null|undefined} entityTypeBatchInline - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * HumanAgentAssistantConfig notificationConfig. + * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @instance */ - BatchUpdateEntityTypesRequest.prototype.entityTypeBatchInline = null; + HumanAgentAssistantConfig.prototype.notificationConfig = null; /** - * BatchUpdateEntityTypesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * HumanAgentAssistantConfig humanAgentSuggestionConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} humanAgentSuggestionConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @instance */ - BatchUpdateEntityTypesRequest.prototype.languageCode = ""; + HumanAgentAssistantConfig.prototype.humanAgentSuggestionConfig = null; /** - * BatchUpdateEntityTypesRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * HumanAgentAssistantConfig endUserSuggestionConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} endUserSuggestionConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @instance */ - BatchUpdateEntityTypesRequest.prototype.updateMask = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + HumanAgentAssistantConfig.prototype.endUserSuggestionConfig = null; /** - * BatchUpdateEntityTypesRequest entityTypeBatch. - * @member {"entityTypeBatchUri"|"entityTypeBatchInline"|undefined} entityTypeBatch - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * HumanAgentAssistantConfig messageAnalysisConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null|undefined} messageAnalysisConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @instance */ - Object.defineProperty(BatchUpdateEntityTypesRequest.prototype, "entityTypeBatch", { - get: $util.oneOfGetter($oneOfFields = ["entityTypeBatchUri", "entityTypeBatchInline"]), - set: $util.oneOfSetter($oneOfFields) - }); + HumanAgentAssistantConfig.prototype.messageAnalysisConfig = null; /** - * Creates a new BatchUpdateEntityTypesRequest instance using the specified properties. + * Creates a new HumanAgentAssistantConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig instance */ - BatchUpdateEntityTypesRequest.create = function create(properties) { - return new BatchUpdateEntityTypesRequest(properties); + HumanAgentAssistantConfig.create = function create(properties) { + return new HumanAgentAssistantConfig(properties); }; /** - * Encodes the specified BatchUpdateEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. + * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntityTypesRequest.encode = function encode(message, writer) { + HumanAgentAssistantConfig.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.entityTypeBatchUri != null && Object.hasOwnProperty.call(message, "entityTypeBatchUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypeBatchUri); - if (message.entityTypeBatchInline != null && Object.hasOwnProperty.call(message, "entityTypeBatchInline")) - $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.encode(message.entityTypeBatchInline, 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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.humanAgentSuggestionConfig != null && Object.hasOwnProperty.call(message, "humanAgentSuggestionConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.encode(message.humanAgentSuggestionConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endUserSuggestionConfig != null && Object.hasOwnProperty.call(message, "endUserSuggestionConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.encode(message.endUserSuggestionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.messageAnalysisConfig != null && Object.hasOwnProperty.call(message, "messageAnalysisConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.encode(message.messageAnalysisConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchUpdateEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.verify|verify} messages. + * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchUpdateEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + HumanAgentAssistantConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntityTypesRequest.decode = function decode(reader, length) { + HumanAgentAssistantConfig.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.v2beta1.BatchUpdateEntityTypesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; case 2: - message.entityTypeBatchUri = reader.string(); + message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); break; case 3: - message.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.decode(reader, reader.uint32()); + message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); break; case 4: - message.languageCode = reader.string(); + message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); break; case 5: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -123285,2413 +124639,2678 @@ }; /** - * Decodes a BatchUpdateEntityTypesRequest message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchUpdateEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { + HumanAgentAssistantConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchUpdateEntityTypesRequest message. + * Verifies a HumanAgentAssistantConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchUpdateEntityTypesRequest.verify = function verify(message) { + HumanAgentAssistantConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.entityTypeBatchUri != null && message.hasOwnProperty("entityTypeBatchUri")) { - properties.entityTypeBatch = 1; - if (!$util.isString(message.entityTypeBatchUri)) - return "entityTypeBatchUri: string expected"; + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; } - if (message.entityTypeBatchInline != null && message.hasOwnProperty("entityTypeBatchInline")) { - if (properties.entityTypeBatch === 1) - return "entityTypeBatch: multiple values"; - properties.entityTypeBatch = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify(message.entityTypeBatchInline); - if (error) - return "entityTypeBatchInline." + error; - } + if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify(message.humanAgentSuggestionConfig); + if (error) + return "humanAgentSuggestionConfig." + 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 (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify(message.endUserSuggestionConfig); if (error) - return "updateMask." + error; + return "endUserSuggestionConfig." + error; + } + if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify(message.messageAnalysisConfig); + if (error) + return "messageAnalysisConfig." + error; } return null; }; /** - * Creates a BatchUpdateEntityTypesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} BatchUpdateEntityTypesRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig */ - BatchUpdateEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest) + HumanAgentAssistantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityTypeBatchUri != null) - message.entityTypeBatchUri = String(object.entityTypeBatchUri); - if (object.entityTypeBatchInline != null) { - if (typeof object.entityTypeBatchInline !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.entityTypeBatchInline: object expected"); - message.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.fromObject(object.entityTypeBatchInline); + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig(); + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.notificationConfig); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.humanAgentSuggestionConfig != null) { + if (typeof object.humanAgentSuggestionConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.humanAgentSuggestionConfig: object expected"); + message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.humanAgentSuggestionConfig); + } + if (object.endUserSuggestionConfig != null) { + if (typeof object.endUserSuggestionConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.endUserSuggestionConfig: object expected"); + message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.endUserSuggestionConfig); + } + if (object.messageAnalysisConfig != null) { + if (typeof object.messageAnalysisConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.messageAnalysisConfig: object expected"); + message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.fromObject(object.messageAnalysisConfig); } return message; }; /** - * Creates a plain object from a BatchUpdateEntityTypesRequest message. Also converts values to other types if specified. + * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest} message BatchUpdateEntityTypesRequest + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} message HumanAgentAssistantConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchUpdateEntityTypesRequest.toObject = function toObject(message, options) { + HumanAgentAssistantConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.updateMask = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityTypeBatchUri != null && message.hasOwnProperty("entityTypeBatchUri")) { - object.entityTypeBatchUri = message.entityTypeBatchUri; - if (options.oneofs) - object.entityTypeBatch = "entityTypeBatchUri"; - } - if (message.entityTypeBatchInline != null && message.hasOwnProperty("entityTypeBatchInline")) { - object.entityTypeBatchInline = $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch.toObject(message.entityTypeBatchInline, options); - if (options.oneofs) - object.entityTypeBatch = "entityTypeBatchInline"; - } - 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); + object.notificationConfig = null; + object.humanAgentSuggestionConfig = null; + object.endUserSuggestionConfig = null; + object.messageAnalysisConfig = null; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.notificationConfig, options); + if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) + object.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.humanAgentSuggestionConfig, options); + if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) + object.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.endUserSuggestionConfig, options); + if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) + object.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.toObject(message.messageAnalysisConfig, options); return object; }; /** - * Converts this BatchUpdateEntityTypesRequest to JSON. + * Converts this HumanAgentAssistantConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @instance * @returns {Object.} JSON object */ - BatchUpdateEntityTypesRequest.prototype.toJSON = function toJSON() { + HumanAgentAssistantConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchUpdateEntityTypesRequest; - })(); + HumanAgentAssistantConfig.SuggestionTriggerSettings = (function() { - v2beta1.BatchUpdateEntityTypesResponse = (function() { + /** + * Properties of a SuggestionTriggerSettings. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface ISuggestionTriggerSettings + * @property {boolean|null} [noSmallTalk] SuggestionTriggerSettings noSmallTalk + * @property {boolean|null} [onlyEndUser] SuggestionTriggerSettings onlyEndUser + */ - /** - * Properties of a BatchUpdateEntityTypesResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchUpdateEntityTypesResponse - * @property {Array.|null} [entityTypes] BatchUpdateEntityTypesResponse entityTypes - */ + /** + * Constructs a new SuggestionTriggerSettings. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionTriggerSettings. + * @implements ISuggestionTriggerSettings + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set + */ + function SuggestionTriggerSettings(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 BatchUpdateEntityTypesResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchUpdateEntityTypesResponse. - * @implements IBatchUpdateEntityTypesResponse - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse=} [properties] Properties to set - */ - function BatchUpdateEntityTypesResponse(properties) { - this.entityTypes = []; - 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]]; - } + /** + * SuggestionTriggerSettings noSmallTalk. + * @member {boolean} noSmallTalk + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + */ + SuggestionTriggerSettings.prototype.noSmallTalk = false; - /** - * BatchUpdateEntityTypesResponse entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @instance - */ - BatchUpdateEntityTypesResponse.prototype.entityTypes = $util.emptyArray; + /** + * SuggestionTriggerSettings onlyEndUser. + * @member {boolean} onlyEndUser + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + */ + SuggestionTriggerSettings.prototype.onlyEndUser = false; - /** - * Creates a new BatchUpdateEntityTypesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse instance - */ - BatchUpdateEntityTypesResponse.create = function create(properties) { - return new BatchUpdateEntityTypesResponse(properties); - }; + /** + * Creates a new SuggestionTriggerSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings instance + */ + SuggestionTriggerSettings.create = function create(properties) { + return new SuggestionTriggerSettings(properties); + }; - /** - * Encodes the specified BatchUpdateEntityTypesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchUpdateEntityTypesResponse.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.v2beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionTriggerSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noSmallTalk != null && Object.hasOwnProperty.call(message, "noSmallTalk")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.noSmallTalk); + if (message.onlyEndUser != null && Object.hasOwnProperty.call(message, "onlyEndUser")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.onlyEndUser); + return writer; + }; - /** - * Encodes the specified BatchUpdateEntityTypesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchUpdateEntityTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionTriggerSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a BatchUpdateEntityTypesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchUpdateEntityTypesResponse.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.v2beta1.BatchUpdateEntityTypesResponse(); - 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.v2beta1.EntityType.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionTriggerSettings.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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.noSmallTalk = reader.bool(); + break; + case 2: + message.onlyEndUser = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionTriggerSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionTriggerSettings message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionTriggerSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noSmallTalk != null && message.hasOwnProperty("noSmallTalk")) + if (typeof message.noSmallTalk !== "boolean") + return "noSmallTalk: boolean expected"; + if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) + if (typeof message.onlyEndUser !== "boolean") + return "onlyEndUser: boolean expected"; + return null; + }; + + /** + * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + */ + SuggestionTriggerSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings(); + if (object.noSmallTalk != null) + message.noSmallTalk = Boolean(object.noSmallTalk); + if (object.onlyEndUser != null) + message.onlyEndUser = Boolean(object.onlyEndUser); + return message; + }; + + /** + * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} message SuggestionTriggerSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionTriggerSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.noSmallTalk = false; + object.onlyEndUser = false; } + if (message.noSmallTalk != null && message.hasOwnProperty("noSmallTalk")) + object.noSmallTalk = message.noSmallTalk; + if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) + object.onlyEndUser = message.onlyEndUser; + return object; + }; + + /** + * Converts this SuggestionTriggerSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + * @returns {Object.} JSON object + */ + SuggestionTriggerSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SuggestionTriggerSettings; + })(); + + HumanAgentAssistantConfig.SuggestionFeatureConfig = (function() { + + /** + * Properties of a SuggestionFeatureConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface ISuggestionFeatureConfig + * @property {google.cloud.dialogflow.v2beta1.ISuggestionFeature|null} [suggestionFeature] SuggestionFeatureConfig suggestionFeature + * @property {boolean|null} [enableEventBasedSuggestion] SuggestionFeatureConfig enableEventBasedSuggestion + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null} [suggestionTriggerSettings] SuggestionFeatureConfig suggestionTriggerSettings + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null} [queryConfig] SuggestionFeatureConfig queryConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null} [conversationModelConfig] SuggestionFeatureConfig conversationModelConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null} [conversationProcessConfig] SuggestionFeatureConfig conversationProcessConfig + */ + + /** + * Constructs a new SuggestionFeatureConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionFeatureConfig. + * @implements ISuggestionFeatureConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set + */ + function SuggestionFeatureConfig(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 BatchUpdateEntityTypesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchUpdateEntityTypesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SuggestionFeatureConfig suggestionFeature. + * @member {google.cloud.dialogflow.v2beta1.ISuggestionFeature|null|undefined} suggestionFeature + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.suggestionFeature = null; + + /** + * SuggestionFeatureConfig enableEventBasedSuggestion. + * @member {boolean} enableEventBasedSuggestion + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.enableEventBasedSuggestion = false; + + /** + * SuggestionFeatureConfig suggestionTriggerSettings. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null|undefined} suggestionTriggerSettings + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.suggestionTriggerSettings = null; + + /** + * SuggestionFeatureConfig queryConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null|undefined} queryConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.queryConfig = null; + + /** + * SuggestionFeatureConfig conversationModelConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null|undefined} conversationModelConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.conversationModelConfig = null; + + /** + * SuggestionFeatureConfig conversationProcessConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null|undefined} conversationProcessConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.conversationProcessConfig = null; + + /** + * Creates a new SuggestionFeatureConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig instance + */ + SuggestionFeatureConfig.create = function create(properties) { + return new SuggestionFeatureConfig(properties); + }; + + /** + * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionFeatureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableEventBasedSuggestion != null && Object.hasOwnProperty.call(message, "enableEventBasedSuggestion")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableEventBasedSuggestion); + if (message.suggestionFeature != null && Object.hasOwnProperty.call(message, "suggestionFeature")) + $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.encode(message.suggestionFeature, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.queryConfig != null && Object.hasOwnProperty.call(message, "queryConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.encode(message.queryConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.conversationModelConfig != null && Object.hasOwnProperty.call(message, "conversationModelConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.encode(message.conversationModelConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.conversationProcessConfig != null && Object.hasOwnProperty.call(message, "conversationProcessConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.encode(message.conversationProcessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.suggestionTriggerSettings != null && Object.hasOwnProperty.call(message, "suggestionTriggerSettings")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.encode(message.suggestionTriggerSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionFeatureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionFeatureConfig.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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: + message.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.decode(reader, reader.uint32()); + break; + case 3: + message.enableEventBasedSuggestion = reader.bool(); + break; + case 10: + message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.decode(reader, reader.uint32()); + break; + case 6: + message.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.decode(reader, reader.uint32()); + break; + case 7: + message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.decode(reader, reader.uint32()); + break; + case 8: + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionFeatureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a BatchUpdateEntityTypesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchUpdateEntityTypesResponse.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.v2beta1.EntityType.verify(message.entityTypes[i]); + /** + * Verifies a SuggestionFeatureConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionFeatureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) { + var error = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.verify(message.suggestionFeature); if (error) - return "entityTypes." + error; + return "suggestionFeature." + error; } - } - return null; - }; + if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) + if (typeof message.enableEventBasedSuggestion !== "boolean") + return "enableEventBasedSuggestion: boolean expected"; + if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify(message.suggestionTriggerSettings); + if (error) + return "suggestionTriggerSettings." + error; + } + if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify(message.queryConfig); + if (error) + return "queryConfig." + error; + } + if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify(message.conversationModelConfig); + if (error) + return "conversationModelConfig." + error; + } + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify(message.conversationProcessConfig); + if (error) + return "conversationProcessConfig." + error; + } + return null; + }; - /** - * Creates a BatchUpdateEntityTypesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} BatchUpdateEntityTypesResponse - */ - BatchUpdateEntityTypesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse.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.v2beta1.BatchUpdateEntityTypesResponse.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); + /** + * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + */ + SuggestionFeatureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig(); + if (object.suggestionFeature != null) { + if (typeof object.suggestionFeature !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionFeature: object expected"); + message.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.fromObject(object.suggestionFeature); } - } - return message; - }; + if (object.enableEventBasedSuggestion != null) + message.enableEventBasedSuggestion = Boolean(object.enableEventBasedSuggestion); + if (object.suggestionTriggerSettings != null) { + if (typeof object.suggestionTriggerSettings !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionTriggerSettings: object expected"); + message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.fromObject(object.suggestionTriggerSettings); + } + if (object.queryConfig != null) { + if (typeof object.queryConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.queryConfig: object expected"); + message.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.fromObject(object.queryConfig); + } + if (object.conversationModelConfig != null) { + if (typeof object.conversationModelConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationModelConfig: object expected"); + message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.fromObject(object.conversationModelConfig); + } + if (object.conversationProcessConfig != null) { + if (typeof object.conversationProcessConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationProcessConfig: object expected"); + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.fromObject(object.conversationProcessConfig); + } + return message; + }; - /** - * Creates a plain object from a BatchUpdateEntityTypesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse} message BatchUpdateEntityTypesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchUpdateEntityTypesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityTypes[j], options); - } - return object; - }; + /** + * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} message SuggestionFeatureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionFeatureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableEventBasedSuggestion = false; + object.suggestionFeature = null; + object.queryConfig = null; + object.conversationModelConfig = null; + object.conversationProcessConfig = null; + object.suggestionTriggerSettings = null; + } + if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) + object.enableEventBasedSuggestion = message.enableEventBasedSuggestion; + if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) + object.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.toObject(message.suggestionFeature, options); + if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) + object.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.toObject(message.queryConfig, options); + if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) + object.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.toObject(message.conversationModelConfig, options); + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) + object.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.toObject(message.conversationProcessConfig, options); + if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) + object.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.toObject(message.suggestionTriggerSettings, options); + return object; + }; - /** - * Converts this BatchUpdateEntityTypesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse - * @instance - * @returns {Object.} JSON object - */ - BatchUpdateEntityTypesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SuggestionFeatureConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionFeatureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BatchUpdateEntityTypesResponse; - })(); + return SuggestionFeatureConfig; + })(); - v2beta1.BatchDeleteEntityTypesRequest = (function() { + HumanAgentAssistantConfig.SuggestionConfig = (function() { - /** - * Properties of a BatchDeleteEntityTypesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchDeleteEntityTypesRequest - * @property {string|null} [parent] BatchDeleteEntityTypesRequest parent - * @property {Array.|null} [entityTypeNames] BatchDeleteEntityTypesRequest entityTypeNames - */ + /** + * Properties of a SuggestionConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface ISuggestionConfig + * @property {Array.|null} [featureConfigs] SuggestionConfig featureConfigs + * @property {boolean|null} [groupSuggestionResponses] SuggestionConfig groupSuggestionResponses + */ - /** - * Constructs a new BatchDeleteEntityTypesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchDeleteEntityTypesRequest. - * @implements IBatchDeleteEntityTypesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest=} [properties] Properties to set - */ - function BatchDeleteEntityTypesRequest(properties) { - this.entityTypeNames = []; - 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 SuggestionConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionConfig. + * @implements ISuggestionConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set + */ + function SuggestionConfig(properties) { + this.featureConfigs = []; + 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]]; + } - /** - * BatchDeleteEntityTypesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @instance - */ - BatchDeleteEntityTypesRequest.prototype.parent = ""; + /** + * SuggestionConfig featureConfigs. + * @member {Array.} featureConfigs + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @instance + */ + SuggestionConfig.prototype.featureConfigs = $util.emptyArray; - /** - * BatchDeleteEntityTypesRequest entityTypeNames. - * @member {Array.} entityTypeNames - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @instance - */ - BatchDeleteEntityTypesRequest.prototype.entityTypeNames = $util.emptyArray; + /** + * SuggestionConfig groupSuggestionResponses. + * @member {boolean} groupSuggestionResponses + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @instance + */ + SuggestionConfig.prototype.groupSuggestionResponses = false; - /** - * Creates a new BatchDeleteEntityTypesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest instance - */ - BatchDeleteEntityTypesRequest.create = function create(properties) { - return new BatchDeleteEntityTypesRequest(properties); - }; + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig instance + */ + SuggestionConfig.create = function create(properties) { + return new SuggestionConfig(properties); + }; - /** - * Encodes the specified BatchDeleteEntityTypesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteEntityTypesRequest.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.entityTypeNames != null && message.entityTypeNames.length) - for (var i = 0; i < message.entityTypeNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityTypeNames[i]); - return writer; - }; + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.featureConfigs != null && message.featureConfigs.length) + for (var i = 0; i < message.featureConfigs.length; ++i) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.featureConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groupSuggestionResponses != null && Object.hasOwnProperty.call(message, "groupSuggestionResponses")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.groupSuggestionResponses); + return writer; + }; - /** - * Encodes the specified BatchDeleteEntityTypesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteEntityTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteEntityTypesRequest.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.v2beta1.BatchDeleteEntityTypesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.entityTypeNames && message.entityTypeNames.length)) - message.entityTypeNames = []; - message.entityTypeNames.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.featureConfigs && message.featureConfigs.length)) + message.featureConfigs = []; + message.featureConfigs.push($root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32())); + break; + case 3: + message.groupSuggestionResponses = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.featureConfigs != null && message.hasOwnProperty("featureConfigs")) { + if (!Array.isArray(message.featureConfigs)) + return "featureConfigs: array expected"; + for (var i = 0; i < message.featureConfigs.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.featureConfigs[i]); + if (error) + return "featureConfigs." + error; + } + } + if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) + if (typeof message.groupSuggestionResponses !== "boolean") + return "groupSuggestionResponses: boolean expected"; + return null; + }; + + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + */ + SuggestionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig(); + if (object.featureConfigs) { + if (!Array.isArray(object.featureConfigs)) + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: array expected"); + message.featureConfigs = []; + for (var i = 0; i < object.featureConfigs.length; ++i) { + if (typeof object.featureConfigs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: object expected"); + message.featureConfigs[i] = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.featureConfigs[i]); + } + } + if (object.groupSuggestionResponses != null) + message.groupSuggestionResponses = Boolean(object.groupSuggestionResponses); + return message; + }; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} message SuggestionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.featureConfigs = []; + if (options.defaults) + object.groupSuggestionResponses = false; + if (message.featureConfigs && message.featureConfigs.length) { + object.featureConfigs = []; + for (var j = 0; j < message.featureConfigs.length; ++j) + object.featureConfigs[j] = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.featureConfigs[j], options); } - } - return message; - }; + if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) + object.groupSuggestionResponses = message.groupSuggestionResponses; + return object; + }; - /** - * Decodes a BatchDeleteEntityTypesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteEntityTypesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this SuggestionConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a BatchDeleteEntityTypesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchDeleteEntityTypesRequest.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.entityTypeNames != null && message.hasOwnProperty("entityTypeNames")) { - if (!Array.isArray(message.entityTypeNames)) - return "entityTypeNames: array expected"; - for (var i = 0; i < message.entityTypeNames.length; ++i) - if (!$util.isString(message.entityTypeNames[i])) - return "entityTypeNames: string[] expected"; - } - return null; - }; + return SuggestionConfig; + })(); - /** - * Creates a BatchDeleteEntityTypesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} BatchDeleteEntityTypesRequest - */ - BatchDeleteEntityTypesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityTypeNames) { - if (!Array.isArray(object.entityTypeNames)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.entityTypeNames: array expected"); - message.entityTypeNames = []; - for (var i = 0; i < object.entityTypeNames.length; ++i) - message.entityTypeNames[i] = String(object.entityTypeNames[i]); - } - return message; - }; + HumanAgentAssistantConfig.SuggestionQueryConfig = (function() { - /** - * Creates a plain object from a BatchDeleteEntityTypesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest} message BatchDeleteEntityTypesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchDeleteEntityTypesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypeNames = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityTypeNames && message.entityTypeNames.length) { - object.entityTypeNames = []; - for (var j = 0; j < message.entityTypeNames.length; ++j) - object.entityTypeNames[j] = message.entityTypeNames[j]; + /** + * Properties of a SuggestionQueryConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface ISuggestionQueryConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null} [knowledgeBaseQuerySource] SuggestionQueryConfig knowledgeBaseQuerySource + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null} [documentQuerySource] SuggestionQueryConfig documentQuerySource + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null} [dialogflowQuerySource] SuggestionQueryConfig dialogflowQuerySource + * @property {number|null} [maxResults] SuggestionQueryConfig maxResults + * @property {number|null} [confidenceThreshold] SuggestionQueryConfig confidenceThreshold + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null} [contextFilterSettings] SuggestionQueryConfig contextFilterSettings + */ + + /** + * Constructs a new SuggestionQueryConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionQueryConfig. + * @implements ISuggestionQueryConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + */ + function SuggestionQueryConfig(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 object; - }; - /** - * Converts this BatchDeleteEntityTypesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchDeleteEntityTypesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * SuggestionQueryConfig knowledgeBaseQuerySource. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null|undefined} knowledgeBaseQuerySource + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.knowledgeBaseQuerySource = null; - return BatchDeleteEntityTypesRequest; - })(); + /** + * SuggestionQueryConfig documentQuerySource. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null|undefined} documentQuerySource + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.documentQuerySource = null; - v2beta1.BatchCreateEntitiesRequest = (function() { + /** + * SuggestionQueryConfig dialogflowQuerySource. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null|undefined} dialogflowQuerySource + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.dialogflowQuerySource = null; - /** - * Properties of a BatchCreateEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchCreateEntitiesRequest - * @property {string|null} [parent] BatchCreateEntitiesRequest parent - * @property {Array.|null} [entities] BatchCreateEntitiesRequest entities - * @property {string|null} [languageCode] BatchCreateEntitiesRequest languageCode - */ + /** + * SuggestionQueryConfig maxResults. + * @member {number} maxResults + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.maxResults = 0; - /** - * Constructs a new BatchCreateEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchCreateEntitiesRequest. - * @implements IBatchCreateEntitiesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest=} [properties] Properties to set - */ - function BatchCreateEntitiesRequest(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]]; - } + /** + * SuggestionQueryConfig confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.confidenceThreshold = 0; - /** - * BatchCreateEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @instance - */ - BatchCreateEntitiesRequest.prototype.parent = ""; + /** + * SuggestionQueryConfig contextFilterSettings. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null|undefined} contextFilterSettings + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.contextFilterSettings = null; - /** - * BatchCreateEntitiesRequest entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @instance - */ - BatchCreateEntitiesRequest.prototype.entities = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * BatchCreateEntitiesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @instance - */ - BatchCreateEntitiesRequest.prototype.languageCode = ""; + /** + * SuggestionQueryConfig querySource. + * @member {"knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"|undefined} querySource + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + Object.defineProperty(SuggestionQueryConfig.prototype, "querySource", { + get: $util.oneOfGetter($oneOfFields = ["knowledgeBaseQuerySource", "documentQuerySource", "dialogflowQuerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new BatchCreateEntitiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest instance - */ - BatchCreateEntitiesRequest.create = function create(properties) { - return new BatchCreateEntitiesRequest(properties); - }; + /** + * Creates a new SuggestionQueryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig instance + */ + SuggestionQueryConfig.create = function create(properties) { + return new SuggestionQueryConfig(properties); + }; - /** - * Encodes the specified BatchCreateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} message BatchCreateEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchCreateEntitiesRequest.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.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], 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 SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionQueryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.knowledgeBaseQuerySource != null && Object.hasOwnProperty.call(message, "knowledgeBaseQuerySource")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.encode(message.knowledgeBaseQuerySource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentQuerySource != null && Object.hasOwnProperty.call(message, "documentQuerySource")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.encode(message.documentQuerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dialogflowQuerySource != null && Object.hasOwnProperty.call(message, "dialogflowQuerySource")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.encode(message.dialogflowQuerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxResults); + if (message.confidenceThreshold != null && Object.hasOwnProperty.call(message, "confidenceThreshold")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidenceThreshold); + if (message.contextFilterSettings != null && Object.hasOwnProperty.call(message, "contextFilterSettings")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.encode(message.contextFilterSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified BatchCreateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateEntitiesRequest} message BatchCreateEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchCreateEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionQueryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchCreateEntitiesRequest.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.v2beta1.BatchCreateEntitiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); - break; - case 3: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionQueryConfig.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.decode(reader, reader.uint32()); + break; + case 2: + message.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.decode(reader, reader.uint32()); + break; + case 3: + message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.decode(reader, reader.uint32()); + break; + case 4: + message.maxResults = reader.int32(); + break; + case 5: + message.confidenceThreshold = reader.float(); + break; + case 7: + message.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a BatchCreateEntitiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchCreateEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionQueryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a BatchCreateEntitiesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchCreateEntitiesRequest.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.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.v2beta1.EntityType.Entity.verify(message.entities[i]); + /** + * Verifies a SuggestionQueryConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionQueryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify(message.knowledgeBaseQuerySource); + if (error) + return "knowledgeBaseQuerySource." + error; + } + } + if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { + if (properties.querySource === 1) + return "querySource: multiple values"; + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify(message.documentQuerySource); + if (error) + return "documentQuerySource." + error; + } + } + if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { + if (properties.querySource === 1) + return "querySource: multiple values"; + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify(message.dialogflowQuerySource); + if (error) + return "dialogflowQuerySource." + error; + } + } + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + if (!$util.isInteger(message.maxResults)) + return "maxResults: integer expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify(message.contextFilterSettings); if (error) - return "entities." + error; + return "contextFilterSettings." + error; } - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + return null; + }; - /** - * Creates a BatchCreateEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} BatchCreateEntitiesRequest - */ - BatchCreateEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.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.v2beta1.BatchCreateEntitiesRequest.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); + /** + * Creates a SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + */ + SuggestionQueryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig(); + if (object.knowledgeBaseQuerySource != null) { + if (typeof object.knowledgeBaseQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.knowledgeBaseQuerySource: object expected"); + message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.fromObject(object.knowledgeBaseQuerySource); } - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a BatchCreateEntitiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest} message BatchCreateEntitiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchCreateEntitiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.toObject(message.entities[j], options); - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - - /** - * Converts this BatchCreateEntitiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchCreateEntitiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchCreateEntitiesRequest; - })(); - - v2beta1.BatchUpdateEntitiesRequest = (function() { - - /** - * Properties of a BatchUpdateEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchUpdateEntitiesRequest - * @property {string|null} [parent] BatchUpdateEntitiesRequest parent - * @property {Array.|null} [entities] BatchUpdateEntitiesRequest entities - * @property {string|null} [languageCode] BatchUpdateEntitiesRequest languageCode - * @property {google.protobuf.IFieldMask|null} [updateMask] BatchUpdateEntitiesRequest updateMask - */ - - /** - * Constructs a new BatchUpdateEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchUpdateEntitiesRequest. - * @implements IBatchUpdateEntitiesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest=} [properties] Properties to set - */ - function BatchUpdateEntitiesRequest(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]]; - } - - /** - * BatchUpdateEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @instance - */ - BatchUpdateEntitiesRequest.prototype.parent = ""; - - /** - * BatchUpdateEntitiesRequest entities. - * @member {Array.} entities - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @instance - */ - BatchUpdateEntitiesRequest.prototype.entities = $util.emptyArray; - - /** - * BatchUpdateEntitiesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @instance - */ - BatchUpdateEntitiesRequest.prototype.languageCode = ""; + if (object.documentQuerySource != null) { + if (typeof object.documentQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.documentQuerySource: object expected"); + message.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.fromObject(object.documentQuerySource); + } + if (object.dialogflowQuerySource != null) { + if (typeof object.dialogflowQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.dialogflowQuerySource: object expected"); + message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.fromObject(object.dialogflowQuerySource); + } + if (object.maxResults != null) + message.maxResults = object.maxResults | 0; + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.contextFilterSettings != null) { + if (typeof object.contextFilterSettings !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.contextFilterSettings: object expected"); + message.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.fromObject(object.contextFilterSettings); + } + return message; + }; - /** - * BatchUpdateEntitiesRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @instance - */ - BatchUpdateEntitiesRequest.prototype.updateMask = null; + /** + * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} message SuggestionQueryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionQueryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxResults = 0; + object.confidenceThreshold = 0; + object.contextFilterSettings = null; + } + if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { + object.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.toObject(message.knowledgeBaseQuerySource, options); + if (options.oneofs) + object.querySource = "knowledgeBaseQuerySource"; + } + if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { + object.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.toObject(message.documentQuerySource, options); + if (options.oneofs) + object.querySource = "documentQuerySource"; + } + if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { + object.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.toObject(message.dialogflowQuerySource, options); + if (options.oneofs) + object.querySource = "dialogflowQuerySource"; + } + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + object.maxResults = message.maxResults; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) + object.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.toObject(message.contextFilterSettings, options); + return object; + }; - /** - * Creates a new BatchUpdateEntitiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest instance - */ - BatchUpdateEntitiesRequest.create = function create(properties) { - return new BatchUpdateEntitiesRequest(properties); - }; + /** + * Converts this SuggestionQueryConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionQueryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified BatchUpdateEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchUpdateEntitiesRequest.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.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.encode(message.entities[i], 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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + SuggestionQueryConfig.KnowledgeBaseQuerySource = (function() { - /** - * Encodes the specified BatchUpdateEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchUpdateEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a KnowledgeBaseQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IKnowledgeBaseQuerySource + * @property {Array.|null} [knowledgeBases] KnowledgeBaseQuerySource knowledgeBases + */ - /** - * Decodes a BatchUpdateEntitiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchUpdateEntitiesRequest.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.v2beta1.BatchUpdateEntitiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dialogflow.v2beta1.EntityType.Entity.decode(reader, reader.uint32())); - break; - case 3: - message.languageCode = reader.string(); - break; - case 4: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new KnowledgeBaseQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a KnowledgeBaseQuerySource. + * @implements IKnowledgeBaseQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set + */ + function KnowledgeBaseQuerySource(properties) { + this.knowledgeBases = []; + 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 BatchUpdateEntitiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchUpdateEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * KnowledgeBaseQuerySource knowledgeBases. + * @member {Array.} knowledgeBases + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @instance + */ + KnowledgeBaseQuerySource.prototype.knowledgeBases = $util.emptyArray; - /** - * Verifies a BatchUpdateEntitiesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchUpdateEntitiesRequest.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.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.v2beta1.EntityType.Entity.verify(message.entities[i]); - if (error) - return "entities." + 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 a new KnowledgeBaseQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource instance + */ + KnowledgeBaseQuerySource.create = function create(properties) { + return new KnowledgeBaseQuerySource(properties); + }; - /** - * Creates a BatchUpdateEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} BatchUpdateEntitiesRequest - */ - BatchUpdateEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.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.v2beta1.BatchUpdateEntitiesRequest.entities: object expected"); - message.entities[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.fromObject(object.entities[i]); - } - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBaseQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.knowledgeBases != null && message.knowledgeBases.length) + for (var i = 0; i < message.knowledgeBases.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.knowledgeBases[i]); + return writer; + }; - /** - * Creates a plain object from a BatchUpdateEntitiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest} message BatchUpdateEntitiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchUpdateEntitiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entities = []; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - object.updateMask = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.Entity.toObject(message.entities[j], 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; - }; + /** + * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBaseQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBaseQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.knowledgeBases && message.knowledgeBases.length)) + message.knowledgeBases = []; + message.knowledgeBases.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this BatchUpdateEntitiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchUpdateEntitiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBaseQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return BatchUpdateEntitiesRequest; - })(); + /** + * Verifies a KnowledgeBaseQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KnowledgeBaseQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.knowledgeBases != null && message.hasOwnProperty("knowledgeBases")) { + if (!Array.isArray(message.knowledgeBases)) + return "knowledgeBases: array expected"; + for (var i = 0; i < message.knowledgeBases.length; ++i) + if (!$util.isString(message.knowledgeBases[i])) + return "knowledgeBases: string[] expected"; + } + return null; + }; - v2beta1.BatchDeleteEntitiesRequest = (function() { + /** + * Creates a KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + */ + KnowledgeBaseQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); + if (object.knowledgeBases) { + if (!Array.isArray(object.knowledgeBases)) + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.knowledgeBases: array expected"); + message.knowledgeBases = []; + for (var i = 0; i < object.knowledgeBases.length; ++i) + message.knowledgeBases[i] = String(object.knowledgeBases[i]); + } + return message; + }; - /** - * Properties of a BatchDeleteEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchDeleteEntitiesRequest - * @property {string|null} [parent] BatchDeleteEntitiesRequest parent - * @property {Array.|null} [entityValues] BatchDeleteEntitiesRequest entityValues - * @property {string|null} [languageCode] BatchDeleteEntitiesRequest languageCode - */ + /** + * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} message KnowledgeBaseQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KnowledgeBaseQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.knowledgeBases = []; + if (message.knowledgeBases && message.knowledgeBases.length) { + object.knowledgeBases = []; + for (var j = 0; j < message.knowledgeBases.length; ++j) + object.knowledgeBases[j] = message.knowledgeBases[j]; + } + return object; + }; - /** - * Constructs a new BatchDeleteEntitiesRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchDeleteEntitiesRequest. - * @implements IBatchDeleteEntitiesRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest=} [properties] Properties to set - */ - function BatchDeleteEntitiesRequest(properties) { - this.entityValues = []; - 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 KnowledgeBaseQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @instance + * @returns {Object.} JSON object + */ + KnowledgeBaseQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * BatchDeleteEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @instance - */ - BatchDeleteEntitiesRequest.prototype.parent = ""; + return KnowledgeBaseQuerySource; + })(); - /** - * BatchDeleteEntitiesRequest entityValues. - * @member {Array.} entityValues - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @instance - */ - BatchDeleteEntitiesRequest.prototype.entityValues = $util.emptyArray; + SuggestionQueryConfig.DocumentQuerySource = (function() { - /** - * BatchDeleteEntitiesRequest languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @instance - */ - BatchDeleteEntitiesRequest.prototype.languageCode = ""; + /** + * Properties of a DocumentQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IDocumentQuerySource + * @property {Array.|null} [documents] DocumentQuerySource documents + */ - /** - * Creates a new BatchDeleteEntitiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest instance - */ - BatchDeleteEntitiesRequest.create = function create(properties) { - return new BatchDeleteEntitiesRequest(properties); - }; + /** + * Constructs a new DocumentQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a DocumentQuerySource. + * @implements IDocumentQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set + */ + function DocumentQuerySource(properties) { + this.documents = []; + 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 BatchDeleteEntitiesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteEntitiesRequest.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.entityValues != null && message.entityValues.length) - for (var i = 0; i < message.entityValues.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entityValues[i]); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCode); - return writer; - }; + /** + * DocumentQuerySource documents. + * @member {Array.} documents + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @instance + */ + DocumentQuerySource.prototype.documents = $util.emptyArray; - /** - * Encodes the specified BatchDeleteEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchDeleteEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new DocumentQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource instance + */ + DocumentQuerySource.create = function create(properties) { + return new DocumentQuerySource(properties); + }; - /** - * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteEntitiesRequest.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.v2beta1.BatchDeleteEntitiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - if (!(message.entityValues && message.entityValues.length)) - message.entityValues = []; - message.entityValues.push(reader.string()); - break; - case 3: - message.languageCode = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.documents[i]); + return writer; + }; - /** - * Decodes a BatchDeleteEntitiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchDeleteEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a BatchDeleteEntitiesRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchDeleteEntitiesRequest.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.entityValues != null && message.hasOwnProperty("entityValues")) { - if (!Array.isArray(message.entityValues)) - return "entityValues: array expected"; - for (var i = 0; i < message.entityValues.length; ++i) - if (!$util.isString(message.entityValues[i])) - return "entityValues: string[] expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a BatchDeleteEntitiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} BatchDeleteEntitiesRequest - */ - BatchDeleteEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entityValues) { - if (!Array.isArray(object.entityValues)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.entityValues: array expected"); - message.entityValues = []; - for (var i = 0; i < object.entityValues.length; ++i) - message.entityValues[i] = String(object.entityValues[i]); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a BatchDeleteEntitiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest} message BatchDeleteEntitiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchDeleteEntitiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityValues = []; - if (options.defaults) { - object.parent = ""; - object.languageCode = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entityValues && message.entityValues.length) { - object.entityValues = []; - for (var j = 0; j < message.entityValues.length; ++j) - object.entityValues[j] = message.entityValues[j]; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + /** + * Verifies a DocumentQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) + if (!$util.isString(message.documents[i])) + return "documents: string[] expected"; + } + return null; + }; - /** - * Converts this BatchDeleteEntitiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest - * @instance - * @returns {Object.} JSON object - */ - BatchDeleteEntitiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + */ + DocumentQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) + message.documents[i] = String(object.documents[i]); + } + return message; + }; + + /** + * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} message DocumentQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = message.documents[j]; + } + return object; + }; - return BatchDeleteEntitiesRequest; - })(); + /** + * Converts this DocumentQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @instance + * @returns {Object.} JSON object + */ + DocumentQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2beta1.EntityTypeBatch = (function() { + return DocumentQuerySource; + })(); - /** - * Properties of an EntityTypeBatch. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IEntityTypeBatch - * @property {Array.|null} [entityTypes] EntityTypeBatch entityTypes - */ + SuggestionQueryConfig.DialogflowQuerySource = (function() { - /** - * Constructs a new EntityTypeBatch. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an EntityTypeBatch. - * @implements IEntityTypeBatch - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch=} [properties] Properties to set - */ - function EntityTypeBatch(properties) { - this.entityTypes = []; - 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 DialogflowQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IDialogflowQuerySource + * @property {string|null} [agent] DialogflowQuerySource agent + */ - /** - * EntityTypeBatch entityTypes. - * @member {Array.} entityTypes - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @instance - */ - EntityTypeBatch.prototype.entityTypes = $util.emptyArray; + /** + * Constructs a new DialogflowQuerySource. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a DialogflowQuerySource. + * @implements IDialogflowQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set + */ + function DialogflowQuerySource(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 EntityTypeBatch instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch instance - */ - EntityTypeBatch.create = function create(properties) { - return new EntityTypeBatch(properties); - }; + /** + * DialogflowQuerySource agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @instance + */ + DialogflowQuerySource.prototype.agent = ""; - /** - * Encodes the specified EntityTypeBatch message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch} message EntityTypeBatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityTypeBatch.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.v2beta1.EntityType.encode(message.entityTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new DialogflowQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource instance + */ + DialogflowQuerySource.create = function create(properties) { + return new DialogflowQuerySource(properties); + }; - /** - * Encodes the specified EntityTypeBatch message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EntityTypeBatch.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {google.cloud.dialogflow.v2beta1.IEntityTypeBatch} message EntityTypeBatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityTypeBatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); + return writer; + }; - /** - * Decodes an EntityTypeBatch message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityTypeBatch.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.v2beta1.EntityTypeBatch(); - 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.v2beta1.EntityType.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EntityTypeBatch message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityTypeBatch.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.agent = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an EntityTypeBatch message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityTypeBatch.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.v2beta1.EntityType.verify(message.entityTypes[i]); - if (error) - return "entityTypes." + error; - } - } - return null; - }; + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an EntityTypeBatch message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.EntityTypeBatch} EntityTypeBatch - */ - EntityTypeBatch.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.EntityTypeBatch(); - if (object.entityTypes) { - if (!Array.isArray(object.entityTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.EntityTypeBatch.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.v2beta1.EntityTypeBatch.entityTypes: object expected"); - message.entityTypes[i] = $root.google.cloud.dialogflow.v2beta1.EntityType.fromObject(object.entityTypes[i]); - } - } - return message; - }; + /** + * Verifies a DialogflowQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + return null; + }; - /** - * Creates a plain object from an EntityTypeBatch message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @static - * @param {google.cloud.dialogflow.v2beta1.EntityTypeBatch} message EntityTypeBatch - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityTypeBatch.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entityTypes = []; - if (message.entityTypes && message.entityTypes.length) { - object.entityTypes = []; - for (var j = 0; j < message.entityTypes.length; ++j) - object.entityTypes[j] = $root.google.cloud.dialogflow.v2beta1.EntityType.toObject(message.entityTypes[j], options); - } - return object; - }; + /** + * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + */ + DialogflowQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); + if (object.agent != null) + message.agent = String(object.agent); + return message; + }; - /** - * Converts this EntityTypeBatch to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.EntityTypeBatch - * @instance - * @returns {Object.} JSON object - */ - EntityTypeBatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} message DialogflowQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.agent = ""; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; + return object; + }; - return EntityTypeBatch; - })(); + /** + * Converts this DialogflowQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @instance + * @returns {Object.} JSON object + */ + DialogflowQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2beta1.Conversations = (function() { + return DialogflowQuerySource; + })(); - /** - * Constructs a new Conversations service. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Conversations - * @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 Conversations(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + SuggestionQueryConfig.ContextFilterSettings = (function() { - (Conversations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Conversations; + /** + * Properties of a ContextFilterSettings. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IContextFilterSettings + * @property {boolean|null} [dropHandoffMessages] ContextFilterSettings dropHandoffMessages + * @property {boolean|null} [dropVirtualAgentMessages] ContextFilterSettings dropVirtualAgentMessages + * @property {boolean|null} [dropIvrMessages] ContextFilterSettings dropIvrMessages + */ - /** - * Creates new Conversations service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @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 {Conversations} RPC service. Useful where requests and/or responses are streamed. - */ - Conversations.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Constructs a new ContextFilterSettings. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a ContextFilterSettings. + * @implements IContextFilterSettings + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set + */ + function ContextFilterSettings(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]]; + } - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#createConversation}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef CreateConversationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation - */ + /** + * ContextFilterSettings dropHandoffMessages. + * @member {boolean} dropHandoffMessages + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropHandoffMessages = false; - /** - * Calls CreateConversation. - * @function createConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} request CreateConversationRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.CreateConversationCallback} callback Node-style callback called with the error, if any, and Conversation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.createConversation = function createConversation(request, callback) { - return this.rpcCall(createConversation, $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); - }, "name", { value: "CreateConversation" }); + /** + * ContextFilterSettings dropVirtualAgentMessages. + * @member {boolean} dropVirtualAgentMessages + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropVirtualAgentMessages = false; - /** - * Calls CreateConversation. - * @function createConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} request CreateConversationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ContextFilterSettings dropIvrMessages. + * @member {boolean} dropIvrMessages + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropIvrMessages = false; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listConversations}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef ListConversationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListConversationsResponse} [response] ListConversationsResponse - */ + /** + * Creates a new ContextFilterSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings instance + */ + ContextFilterSettings.create = function create(properties) { + return new ContextFilterSettings(properties); + }; - /** - * Calls ListConversations. - * @function listConversations - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} request ListConversationsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.ListConversationsCallback} callback Node-style callback called with the error, if any, and ListConversationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.listConversations = function listConversations(request, callback) { - return this.rpcCall(listConversations, $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest, $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse, request, callback); - }, "name", { value: "ListConversations" }); + /** + * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextFilterSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dropHandoffMessages != null && Object.hasOwnProperty.call(message, "dropHandoffMessages")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.dropHandoffMessages); + if (message.dropVirtualAgentMessages != null && Object.hasOwnProperty.call(message, "dropVirtualAgentMessages")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dropVirtualAgentMessages); + if (message.dropIvrMessages != null && Object.hasOwnProperty.call(message, "dropIvrMessages")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dropIvrMessages); + return writer; + }; - /** - * Calls ListConversations. - * @function listConversations - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} request ListConversationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextFilterSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#getConversation}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef GetConversationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation - */ + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextFilterSettings.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dropHandoffMessages = reader.bool(); + break; + case 2: + message.dropVirtualAgentMessages = reader.bool(); + break; + case 3: + message.dropIvrMessages = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls GetConversation. - * @function getConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} request GetConversationRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.GetConversationCallback} callback Node-style callback called with the error, if any, and Conversation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.getConversation = function getConversation(request, callback) { - return this.rpcCall(getConversation, $root.google.cloud.dialogflow.v2beta1.GetConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); - }, "name", { value: "GetConversation" }); + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextFilterSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls GetConversation. - * @function getConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} request GetConversationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a ContextFilterSettings message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextFilterSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) + if (typeof message.dropHandoffMessages !== "boolean") + return "dropHandoffMessages: boolean expected"; + if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) + if (typeof message.dropVirtualAgentMessages !== "boolean") + return "dropVirtualAgentMessages: boolean expected"; + if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) + if (typeof message.dropIvrMessages !== "boolean") + return "dropIvrMessages: boolean expected"; + return null; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#completeConversation}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef CompleteConversationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Conversation} [response] Conversation - */ + /** + * Creates a ContextFilterSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + */ + ContextFilterSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); + if (object.dropHandoffMessages != null) + message.dropHandoffMessages = Boolean(object.dropHandoffMessages); + if (object.dropVirtualAgentMessages != null) + message.dropVirtualAgentMessages = Boolean(object.dropVirtualAgentMessages); + if (object.dropIvrMessages != null) + message.dropIvrMessages = Boolean(object.dropIvrMessages); + return message; + }; - /** - * Calls CompleteConversation. - * @function completeConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} request CompleteConversationRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.CompleteConversationCallback} callback Node-style callback called with the error, if any, and Conversation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.completeConversation = function completeConversation(request, callback) { - return this.rpcCall(completeConversation, $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest, $root.google.cloud.dialogflow.v2beta1.Conversation, request, callback); - }, "name", { value: "CompleteConversation" }); + /** + * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} message ContextFilterSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextFilterSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dropHandoffMessages = false; + object.dropVirtualAgentMessages = false; + object.dropIvrMessages = false; + } + if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) + object.dropHandoffMessages = message.dropHandoffMessages; + if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) + object.dropVirtualAgentMessages = message.dropVirtualAgentMessages; + if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) + object.dropIvrMessages = message.dropIvrMessages; + return object; + }; - /** - * Calls CompleteConversation. - * @function completeConversation - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} request CompleteConversationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this ContextFilterSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + * @returns {Object.} JSON object + */ + ContextFilterSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#batchCreateMessages}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef BatchCreateMessagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} [response] BatchCreateMessagesResponse - */ + return ContextFilterSettings; + })(); - /** - * Calls BatchCreateMessages. - * @function batchCreateMessages - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} request BatchCreateMessagesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.BatchCreateMessagesCallback} callback Node-style callback called with the error, if any, and BatchCreateMessagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.batchCreateMessages = function batchCreateMessages(request, callback) { - return this.rpcCall(batchCreateMessages, $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest, $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse, request, callback); - }, "name", { value: "BatchCreateMessages" }); + return SuggestionQueryConfig; + })(); - /** - * Calls BatchCreateMessages. - * @function batchCreateMessages - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} request BatchCreateMessagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + HumanAgentAssistantConfig.ConversationModelConfig = (function() { - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations#listMessages}. - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @typedef ListMessagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListMessagesResponse} [response] ListMessagesResponse - */ + /** + * Properties of a ConversationModelConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface IConversationModelConfig + * @property {string|null} [model] ConversationModelConfig model + */ - /** - * Calls ListMessages. - * @function listMessages - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} request ListMessagesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Conversations.ListMessagesCallback} callback Node-style callback called with the error, if any, and ListMessagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Conversations.prototype.listMessages = function listMessages(request, callback) { - return this.rpcCall(listMessages, $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest, $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse, request, callback); - }, "name", { value: "ListMessages" }); + /** + * Constructs a new ConversationModelConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a ConversationModelConfig. + * @implements IConversationModelConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set + */ + function ConversationModelConfig(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 ListMessages. - * @function listMessages - * @memberof google.cloud.dialogflow.v2beta1.Conversations - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} request ListMessagesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * ConversationModelConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + */ + ConversationModelConfig.prototype.model = ""; - return Conversations; - })(); + /** + * Creates a new ConversationModelConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig instance + */ + ConversationModelConfig.create = function create(properties) { + return new ConversationModelConfig(properties); + }; - v2beta1.Conversation = (function() { + /** + * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationModelConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + return writer; + }; - /** - * Properties of a Conversation. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IConversation - * @property {string|null} [name] Conversation name - * @property {google.cloud.dialogflow.v2beta1.Conversation.LifecycleState|null} [lifecycleState] Conversation lifecycleState - * @property {string|null} [conversationProfile] Conversation conversationProfile - * @property {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null} [phoneNumber] Conversation phoneNumber - * @property {google.cloud.dialogflow.v2beta1.Conversation.ConversationStage|null} [conversationStage] Conversation conversationStage - * @property {google.protobuf.ITimestamp|null} [startTime] Conversation startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Conversation endTime - */ + /** + * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationModelConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Conversation. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Conversation. - * @implements IConversation - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IConversation=} [properties] Properties to set - */ - function Conversation(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]]; - } + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationModelConfig.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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.model = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Conversation name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.name = ""; + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationModelConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Conversation lifecycleState. - * @member {google.cloud.dialogflow.v2beta1.Conversation.LifecycleState} lifecycleState - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.lifecycleState = 0; + /** + * Verifies a ConversationModelConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationModelConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + return null; + }; - /** - * Conversation conversationProfile. - * @member {string} conversationProfile - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.conversationProfile = ""; + /** + * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + */ + ConversationModelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig(); + if (object.model != null) + message.model = String(object.model); + return message; + }; + + /** + * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} message ConversationModelConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationModelConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.model = ""; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + return object; + }; - /** - * Conversation phoneNumber. - * @member {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber|null|undefined} phoneNumber - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.phoneNumber = null; + /** + * Converts this ConversationModelConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationModelConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Conversation conversationStage. - * @member {google.cloud.dialogflow.v2beta1.Conversation.ConversationStage} conversationStage - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.conversationStage = 0; + return ConversationModelConfig; + })(); - /** - * Conversation startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.startTime = null; + HumanAgentAssistantConfig.ConversationProcessConfig = (function() { - /** - * Conversation endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - */ - Conversation.prototype.endTime = null; + /** + * Properties of a ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface IConversationProcessConfig + * @property {number|null} [recentSentencesCount] ConversationProcessConfig recentSentencesCount + */ - /** - * Creates a new Conversation instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversation=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation instance - */ - Conversation.create = function create(properties) { - return new Conversation(properties); - }; + /** + * Constructs a new ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a ConversationProcessConfig. + * @implements IConversationProcessConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + */ + function ConversationProcessConfig(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 Conversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversation} message Conversation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Conversation.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.lifecycleState != null && Object.hasOwnProperty.call(message, "lifecycleState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lifecycleState); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversationProfile); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.encode(message.phoneNumber, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.conversationStage != null && Object.hasOwnProperty.call(message, "conversationStage")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.conversationStage); - return writer; - }; + /** + * ConversationProcessConfig recentSentencesCount. + * @member {number} recentSentencesCount + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + */ + ConversationProcessConfig.prototype.recentSentencesCount = 0; - /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Conversation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversation} message Conversation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Conversation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ConversationProcessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig instance + */ + ConversationProcessConfig.create = function create(properties) { + return new ConversationProcessConfig(properties); + }; - /** - * Decodes a Conversation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Conversation.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.v2beta1.Conversation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.lifecycleState = reader.int32(); - break; - case 3: - message.conversationProfile = reader.string(); - break; - case 4: - message.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.decode(reader, reader.uint32()); - break; - case 7: - message.conversationStage = reader.int32(); - break; - case 5: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recentSentencesCount != null && Object.hasOwnProperty.call(message, "recentSentencesCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.recentSentencesCount); + return writer; + }; - /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Conversation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Conversation message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Conversation.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.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - switch (message.lifecycleState) { - default: - return "lifecycleState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { - var error = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify(message.phoneNumber); - if (error) - return "phoneNumber." + error; - } - if (message.conversationStage != null && message.hasOwnProperty("conversationStage")) - switch (message.conversationStage) { - default: - return "conversationStage: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.recentSentencesCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - 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; - } - return null; - }; + return message; + }; - /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Conversation} Conversation - */ - Conversation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Conversation) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Conversation(); - if (object.name != null) - message.name = String(object.name); - switch (object.lifecycleState) { - case "LIFECYCLE_STATE_UNSPECIFIED": - case 0: - message.lifecycleState = 0; - break; - case "IN_PROGRESS": - case 1: - message.lifecycleState = 1; - break; - case "COMPLETED": - case 2: - message.lifecycleState = 2; - break; - } - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - if (object.phoneNumber != null) { - if (typeof object.phoneNumber !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Conversation.phoneNumber: object expected"); - message.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.fromObject(object.phoneNumber); - } - switch (object.conversationStage) { - case "CONVERSATION_STAGE_UNSPECIFIED": - case 0: - message.conversationStage = 0; - break; - case "VIRTUAL_AGENT_STAGE": - case 1: - message.conversationStage = 1; - break; - case "HUMAN_ASSIST_STAGE": - case 2: - message.conversationStage = 2; - break; - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Conversation.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.v2beta1.Conversation.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @static - * @param {google.cloud.dialogflow.v2beta1.Conversation} message Conversation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Conversation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.lifecycleState = options.enums === String ? "LIFECYCLE_STATE_UNSPECIFIED" : 0; - object.conversationProfile = ""; - object.phoneNumber = null; - object.startTime = null; - object.endTime = null; - object.conversationStage = options.enums === String ? "CONVERSATION_STAGE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lifecycleState != null && message.hasOwnProperty("lifecycleState")) - object.lifecycleState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.LifecycleState[message.lifecycleState] : message.lifecycleState; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = message.conversationProfile; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.toObject(message.phoneNumber, 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.conversationStage != null && message.hasOwnProperty("conversationStage")) - object.conversationStage = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.ConversationStage[message.conversationStage] : message.conversationStage; - return object; - }; + /** + * Verifies a ConversationProcessConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationProcessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + if (!$util.isInteger(message.recentSentencesCount)) + return "recentSentencesCount: integer expected"; + return null; + }; - /** - * Converts this Conversation to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Conversation - * @instance - * @returns {Object.} JSON object - */ - Conversation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + */ + ConversationProcessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); + if (object.recentSentencesCount != null) + message.recentSentencesCount = object.recentSentencesCount | 0; + return message; + }; - /** - * LifecycleState enum. - * @name google.cloud.dialogflow.v2beta1.Conversation.LifecycleState - * @enum {number} - * @property {number} LIFECYCLE_STATE_UNSPECIFIED=0 LIFECYCLE_STATE_UNSPECIFIED value - * @property {number} IN_PROGRESS=1 IN_PROGRESS value - * @property {number} COMPLETED=2 COMPLETED value - */ - Conversation.LifecycleState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LIFECYCLE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_PROGRESS"] = 1; - values[valuesById[2] = "COMPLETED"] = 2; - return values; - })(); + /** + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} message ConversationProcessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationProcessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.recentSentencesCount = 0; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + object.recentSentencesCount = message.recentSentencesCount; + return object; + }; - /** - * ConversationStage enum. - * @name google.cloud.dialogflow.v2beta1.Conversation.ConversationStage - * @enum {number} - * @property {number} CONVERSATION_STAGE_UNSPECIFIED=0 CONVERSATION_STAGE_UNSPECIFIED value - * @property {number} VIRTUAL_AGENT_STAGE=1 VIRTUAL_AGENT_STAGE value - * @property {number} HUMAN_ASSIST_STAGE=2 HUMAN_ASSIST_STAGE value - */ - Conversation.ConversationStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONVERSATION_STAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTUAL_AGENT_STAGE"] = 1; - values[valuesById[2] = "HUMAN_ASSIST_STAGE"] = 2; - return values; + /** + * Converts this ConversationProcessConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationProcessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConversationProcessConfig; })(); - return Conversation; - })(); + HumanAgentAssistantConfig.MessageAnalysisConfig = (function() { - v2beta1.ConversationPhoneNumber = (function() { + /** + * Properties of a MessageAnalysisConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface IMessageAnalysisConfig + * @property {boolean|null} [enableEntityExtraction] MessageAnalysisConfig enableEntityExtraction + * @property {boolean|null} [enableSentimentAnalysis] MessageAnalysisConfig enableSentimentAnalysis + */ - /** - * Properties of a ConversationPhoneNumber. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IConversationPhoneNumber - * @property {string|null} [phoneNumber] ConversationPhoneNumber phoneNumber - */ + /** + * Constructs a new MessageAnalysisConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a MessageAnalysisConfig. + * @implements IMessageAnalysisConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set + */ + function MessageAnalysisConfig(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 ConversationPhoneNumber. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ConversationPhoneNumber. - * @implements IConversationPhoneNumber - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber=} [properties] Properties to set - */ - function ConversationPhoneNumber(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]]; - } + /** + * MessageAnalysisConfig enableEntityExtraction. + * @member {boolean} enableEntityExtraction + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + */ + MessageAnalysisConfig.prototype.enableEntityExtraction = false; - /** - * ConversationPhoneNumber phoneNumber. - * @member {string} phoneNumber - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @instance - */ - ConversationPhoneNumber.prototype.phoneNumber = ""; + /** + * MessageAnalysisConfig enableSentimentAnalysis. + * @member {boolean} enableSentimentAnalysis + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + */ + MessageAnalysisConfig.prototype.enableSentimentAnalysis = false; - /** - * Creates a new ConversationPhoneNumber instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber instance - */ - ConversationPhoneNumber.create = function create(properties) { - return new ConversationPhoneNumber(properties); - }; + /** + * Creates a new MessageAnalysisConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig instance + */ + MessageAnalysisConfig.create = function create(properties) { + return new MessageAnalysisConfig(properties); + }; - /** - * Encodes the specified ConversationPhoneNumber message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber} message ConversationPhoneNumber message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationPhoneNumber.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.phoneNumber); - return writer; - }; + /** + * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAnalysisConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableEntityExtraction != null && Object.hasOwnProperty.call(message, "enableEntityExtraction")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableEntityExtraction); + if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSentimentAnalysis); + return writer; + }; - /** - * Encodes the specified ConversationPhoneNumber message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationPhoneNumber} message ConversationPhoneNumber message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationPhoneNumber.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConversationPhoneNumber message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationPhoneNumber.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.v2beta1.ConversationPhoneNumber(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - message.phoneNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAnalysisConfig.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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.enableEntityExtraction = reader.bool(); + break; + case 3: + message.enableSentimentAnalysis = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationPhoneNumber message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationPhoneNumber.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAnalysisConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationPhoneNumber message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationPhoneNumber.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - if (!$util.isString(message.phoneNumber)) - return "phoneNumber: string expected"; - return null; - }; + /** + * Verifies a MessageAnalysisConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageAnalysisConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) + if (typeof message.enableEntityExtraction !== "boolean") + return "enableEntityExtraction: boolean expected"; + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + if (typeof message.enableSentimentAnalysis !== "boolean") + return "enableSentimentAnalysis: boolean expected"; + return null; + }; - /** - * Creates a ConversationPhoneNumber message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} ConversationPhoneNumber - */ - ConversationPhoneNumber.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber) + /** + * Creates a MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + */ + MessageAnalysisConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig(); + if (object.enableEntityExtraction != null) + message.enableEntityExtraction = Boolean(object.enableEntityExtraction); + if (object.enableSentimentAnalysis != null) + message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); + return message; + }; + + /** + * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} message MessageAnalysisConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageAnalysisConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableEntityExtraction = false; + object.enableSentimentAnalysis = false; + } + if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) + object.enableEntityExtraction = message.enableEntityExtraction; + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + object.enableSentimentAnalysis = message.enableSentimentAnalysis; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber(); - if (object.phoneNumber != null) - message.phoneNumber = String(object.phoneNumber); - return message; - }; + }; - /** - * Creates a plain object from a ConversationPhoneNumber message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @static - * @param {google.cloud.dialogflow.v2beta1.ConversationPhoneNumber} message ConversationPhoneNumber - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationPhoneNumber.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.phoneNumber = ""; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) - object.phoneNumber = message.phoneNumber; - return object; - }; + /** + * Converts this MessageAnalysisConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + * @returns {Object.} JSON object + */ + MessageAnalysisConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ConversationPhoneNumber to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ConversationPhoneNumber - * @instance - * @returns {Object.} JSON object - */ - ConversationPhoneNumber.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return MessageAnalysisConfig; + })(); - return ConversationPhoneNumber; + return HumanAgentAssistantConfig; })(); - v2beta1.CreateConversationRequest = (function() { + v2beta1.HumanAgentHandoffConfig = (function() { /** - * Properties of a CreateConversationRequest. + * Properties of a HumanAgentHandoffConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateConversationRequest - * @property {string|null} [parent] CreateConversationRequest parent - * @property {google.cloud.dialogflow.v2beta1.IConversation|null} [conversation] CreateConversationRequest conversation - * @property {string|null} [conversationId] CreateConversationRequest conversationId + * @interface IHumanAgentHandoffConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null} [livePersonConfig] HumanAgentHandoffConfig livePersonConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null} [salesforceLiveAgentConfig] HumanAgentHandoffConfig salesforceLiveAgentConfig */ /** - * Constructs a new CreateConversationRequest. + * Constructs a new HumanAgentHandoffConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateConversationRequest. - * @implements ICreateConversationRequest + * @classdesc Represents a HumanAgentHandoffConfig. + * @implements IHumanAgentHandoffConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig=} [properties] Properties to set */ - function CreateConversationRequest(properties) { + function HumanAgentHandoffConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125699,101 +127318,102 @@ } /** - * CreateConversationRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * HumanAgentHandoffConfig livePersonConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null|undefined} livePersonConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @instance */ - CreateConversationRequest.prototype.parent = ""; + HumanAgentHandoffConfig.prototype.livePersonConfig = null; /** - * CreateConversationRequest conversation. - * @member {google.cloud.dialogflow.v2beta1.IConversation|null|undefined} conversation - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * HumanAgentHandoffConfig salesforceLiveAgentConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null|undefined} salesforceLiveAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @instance */ - CreateConversationRequest.prototype.conversation = null; + HumanAgentHandoffConfig.prototype.salesforceLiveAgentConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * CreateConversationRequest conversationId. - * @member {string} conversationId - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * HumanAgentHandoffConfig agentService. + * @member {"livePersonConfig"|"salesforceLiveAgentConfig"|undefined} agentService + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @instance */ - CreateConversationRequest.prototype.conversationId = ""; + Object.defineProperty(HumanAgentHandoffConfig.prototype, "agentService", { + get: $util.oneOfGetter($oneOfFields = ["livePersonConfig", "salesforceLiveAgentConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CreateConversationRequest instance using the specified properties. + * Creates a new HumanAgentHandoffConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest instance + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig instance */ - CreateConversationRequest.create = function create(properties) { - return new CreateConversationRequest(properties); + HumanAgentHandoffConfig.create = function create(properties) { + return new HumanAgentHandoffConfig(properties); }; /** - * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. + * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationRequest.encode = function encode(message, writer) { + HumanAgentHandoffConfig.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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - $root.google.cloud.dialogflow.v2beta1.Conversation.encode(message.conversation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversationId); + if (message.livePersonConfig != null && Object.hasOwnProperty.call(message, "livePersonConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.encode(message.livePersonConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.salesforceLiveAgentConfig != null && Object.hasOwnProperty.call(message, "salesforceLiveAgentConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.encode(message.salesforceLiveAgentConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationRequest.verify|verify} messages. + * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + HumanAgentHandoffConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationRequest message from the specified reader or buffer. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationRequest.decode = function decode(reader, length) { + HumanAgentHandoffConfig.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.v2beta1.CreateConversationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.decode(reader, reader.uint32()); break; case 2: - message.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.decode(reader, reader.uint32()); - break; - case 3: - message.conversationId = reader.string(); + message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -125804,132 +127424,579 @@ }; /** - * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationRequest.decodeDelimited = function decodeDelimited(reader) { + HumanAgentHandoffConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationRequest message. + * Verifies a HumanAgentHandoffConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationRequest.verify = function verify(message) { + HumanAgentHandoffConfig.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.conversation != null && message.hasOwnProperty("conversation")) { - var error = $root.google.cloud.dialogflow.v2beta1.Conversation.verify(message.conversation); - if (error) - return "conversation." + error; + var properties = {}; + if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { + properties.agentService = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify(message.livePersonConfig); + if (error) + return "livePersonConfig." + error; + } + } + if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { + if (properties.agentService === 1) + return "agentService: multiple values"; + properties.agentService = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify(message.salesforceLiveAgentConfig); + if (error) + return "salesforceLiveAgentConfig." + error; + } } - if (message.conversationId != null && message.hasOwnProperty("conversationId")) - if (!$util.isString(message.conversationId)) - return "conversationId: string expected"; return null; }; /** - * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationRequest} CreateConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig */ - CreateConversationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest) + HumanAgentHandoffConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.conversation != null) { - if (typeof object.conversation !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateConversationRequest.conversation: object expected"); - message.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.fromObject(object.conversation); + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig(); + if (object.livePersonConfig != null) { + if (typeof object.livePersonConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.livePersonConfig: object expected"); + message.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.fromObject(object.livePersonConfig); + } + if (object.salesforceLiveAgentConfig != null) { + if (typeof object.salesforceLiveAgentConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.salesforceLiveAgentConfig: object expected"); + message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.fromObject(object.salesforceLiveAgentConfig); } - if (object.conversationId != null) - message.conversationId = String(object.conversationId); return message; }; /** - * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2beta1.CreateConversationRequest} message CreateConversationRequest + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} message HumanAgentHandoffConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationRequest.toObject = function toObject(message, options) { + HumanAgentHandoffConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.conversation = null; - object.conversationId = ""; + if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { + object.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.toObject(message.livePersonConfig, options); + if (options.oneofs) + object.agentService = "livePersonConfig"; + } + if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { + object.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.toObject(message.salesforceLiveAgentConfig, options); + if (options.oneofs) + object.agentService = "salesforceLiveAgentConfig"; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = $root.google.cloud.dialogflow.v2beta1.Conversation.toObject(message.conversation, options); - if (message.conversationId != null && message.hasOwnProperty("conversationId")) - object.conversationId = message.conversationId; return object; }; - /** - * Converts this CreateConversationRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConversationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this HumanAgentHandoffConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @instance + * @returns {Object.} JSON object + */ + HumanAgentHandoffConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + HumanAgentHandoffConfig.LivePersonConfig = (function() { + + /** + * Properties of a LivePersonConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @interface ILivePersonConfig + * @property {string|null} [accountNumber] LivePersonConfig accountNumber + */ + + /** + * Constructs a new LivePersonConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @classdesc Represents a LivePersonConfig. + * @implements ILivePersonConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set + */ + function LivePersonConfig(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]]; + } + + /** + * LivePersonConfig accountNumber. + * @member {string} accountNumber + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @instance + */ + LivePersonConfig.prototype.accountNumber = ""; + + /** + * Creates a new LivePersonConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig instance + */ + LivePersonConfig.create = function create(properties) { + return new LivePersonConfig(properties); + }; + + /** + * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LivePersonConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountNumber); + return writer; + }; + + /** + * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LivePersonConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LivePersonConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LivePersonConfig.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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.accountNumber = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LivePersonConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LivePersonConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LivePersonConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isString(message.accountNumber)) + return "accountNumber: string expected"; + return null; + }; + + /** + * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig + */ + LivePersonConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig(); + if (object.accountNumber != null) + message.accountNumber = String(object.accountNumber); + return message; + }; + + /** + * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} message LivePersonConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LivePersonConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accountNumber = ""; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + object.accountNumber = message.accountNumber; + return object; + }; + + /** + * Converts this LivePersonConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig + * @instance + * @returns {Object.} JSON object + */ + LivePersonConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LivePersonConfig; + })(); + + HumanAgentHandoffConfig.SalesforceLiveAgentConfig = (function() { + + /** + * Properties of a SalesforceLiveAgentConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @interface ISalesforceLiveAgentConfig + * @property {string|null} [organizationId] SalesforceLiveAgentConfig organizationId + * @property {string|null} [deploymentId] SalesforceLiveAgentConfig deploymentId + * @property {string|null} [buttonId] SalesforceLiveAgentConfig buttonId + * @property {string|null} [endpointDomain] SalesforceLiveAgentConfig endpointDomain + */ + + /** + * Constructs a new SalesforceLiveAgentConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @classdesc Represents a SalesforceLiveAgentConfig. + * @implements ISalesforceLiveAgentConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set + */ + function SalesforceLiveAgentConfig(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]]; + } + + /** + * SalesforceLiveAgentConfig organizationId. + * @member {string} organizationId + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.organizationId = ""; + + /** + * SalesforceLiveAgentConfig deploymentId. + * @member {string} deploymentId + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.deploymentId = ""; + + /** + * SalesforceLiveAgentConfig buttonId. + * @member {string} buttonId + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.buttonId = ""; + + /** + * SalesforceLiveAgentConfig endpointDomain. + * @member {string} endpointDomain + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.endpointDomain = ""; + + /** + * Creates a new SalesforceLiveAgentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig instance + */ + SalesforceLiveAgentConfig.create = function create(properties) { + return new SalesforceLiveAgentConfig(properties); + }; + + /** + * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SalesforceLiveAgentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.organizationId); + if (message.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); + if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonId); + if (message.endpointDomain != null && Object.hasOwnProperty.call(message, "endpointDomain")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpointDomain); + return writer; + }; + + /** + * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SalesforceLiveAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SalesforceLiveAgentConfig.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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.organizationId = reader.string(); + break; + case 2: + message.deploymentId = reader.string(); + break; + case 3: + message.buttonId = reader.string(); + break; + case 4: + message.endpointDomain = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SalesforceLiveAgentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SalesforceLiveAgentConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SalesforceLiveAgentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) + if (!$util.isString(message.organizationId)) + return "organizationId: string expected"; + if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) + if (!$util.isString(message.deploymentId)) + return "deploymentId: string expected"; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + if (!$util.isString(message.buttonId)) + return "buttonId: string expected"; + if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) + if (!$util.isString(message.endpointDomain)) + return "endpointDomain: string expected"; + return null; + }; + + /** + * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + */ + SalesforceLiveAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); + if (object.organizationId != null) + message.organizationId = String(object.organizationId); + if (object.deploymentId != null) + message.deploymentId = String(object.deploymentId); + if (object.buttonId != null) + message.buttonId = String(object.buttonId); + if (object.endpointDomain != null) + message.endpointDomain = String(object.endpointDomain); + return message; + }; + + /** + * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} message SalesforceLiveAgentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SalesforceLiveAgentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.organizationId = ""; + object.deploymentId = ""; + object.buttonId = ""; + object.endpointDomain = ""; + } + if (message.organizationId != null && message.hasOwnProperty("organizationId")) + object.organizationId = message.organizationId; + if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) + object.deploymentId = message.deploymentId; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + object.buttonId = message.buttonId; + if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) + object.endpointDomain = message.endpointDomain; + return object; + }; + + /** + * Converts this SalesforceLiveAgentConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + * @returns {Object.} JSON object + */ + SalesforceLiveAgentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SalesforceLiveAgentConfig; + })(); - return CreateConversationRequest; + return HumanAgentHandoffConfig; })(); - v2beta1.ListConversationsRequest = (function() { + v2beta1.NotificationConfig = (function() { /** - * Properties of a ListConversationsRequest. + * Properties of a NotificationConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListConversationsRequest - * @property {string|null} [parent] ListConversationsRequest parent - * @property {number|null} [pageSize] ListConversationsRequest pageSize - * @property {string|null} [pageToken] ListConversationsRequest pageToken - * @property {string|null} [filter] ListConversationsRequest filter + * @interface INotificationConfig + * @property {string|null} [topic] NotificationConfig topic + * @property {google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|null} [messageFormat] NotificationConfig messageFormat */ /** - * Constructs a new ListConversationsRequest. + * Constructs a new NotificationConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListConversationsRequest. - * @implements IListConversationsRequest + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.INotificationConfig=} [properties] Properties to set */ - function ListConversationsRequest(properties) { + function NotificationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -125937,114 +128004,88 @@ } /** - * ListConversationsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest - * @instance - */ - ListConversationsRequest.prototype.parent = ""; - - /** - * ListConversationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest - * @instance - */ - ListConversationsRequest.prototype.pageSize = 0; - - /** - * ListConversationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * NotificationConfig topic. + * @member {string} topic + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @instance */ - ListConversationsRequest.prototype.pageToken = ""; + NotificationConfig.prototype.topic = ""; /** - * ListConversationsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * NotificationConfig messageFormat. + * @member {google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat} messageFormat + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @instance */ - ListConversationsRequest.prototype.filter = ""; + NotificationConfig.prototype.messageFormat = 0; /** - * Creates a new ListConversationsRequest instance using the specified properties. + * Creates a new NotificationConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest instance + * @param {google.cloud.dialogflow.v2beta1.INotificationConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig instance */ - ListConversationsRequest.create = function create(properties) { - return new ListConversationsRequest(properties); + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); }; /** - * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.INotificationConfig} message NotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationsRequest.encode = function encode(message, writer) { + NotificationConfig.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.messageFormat != null && Object.hasOwnProperty.call(message, "messageFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageFormat); return writer; }; /** - * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsRequest.verify|verify} messages. + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.INotificationConfig} message NotificationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationsRequest message from the specified reader or buffer. + * Decodes a NotificationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest + * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationsRequest.decode = function decode(reader, length) { + NotificationConfig.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.v2beta1.ListConversationsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.NotificationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.topic = reader.string(); break; case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); + message.messageFormat = reader.int32(); break; default: reader.skipType(tag & 7); @@ -126055,134 +128096,150 @@ }; /** - * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest + * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationsRequest.decodeDelimited = function decodeDelimited(reader) { + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationsRequest message. + * Verifies a NotificationConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationsRequest.verify = function verify(message) { + NotificationConfig.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) + switch (message.messageFormat) { + default: + return "messageFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsRequest} ListConversationsRequest + * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig */ - ListConversationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest) + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.NotificationConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsRequest(); - 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.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.dialogflow.v2beta1.NotificationConfig(); + if (object.topic != null) + message.topic = String(object.topic); + switch (object.messageFormat) { + case "MESSAGE_FORMAT_UNSPECIFIED": + case 0: + message.messageFormat = 0; + break; + case "PROTO": + case 1: + message.messageFormat = 1; + break; + case "JSON": + case 2: + message.messageFormat = 2; + break; + } return message; }; /** - * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ListConversationsRequest} message ListConversationsRequest + * @param {google.cloud.dialogflow.v2beta1.NotificationConfig} message NotificationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationsRequest.toObject = function toObject(message, options) { + NotificationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.topic = ""; + object.messageFormat = options.enums === String ? "MESSAGE_FORMAT_UNSPECIFIED" : 0; } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) + object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; return object; }; /** - * Converts this ListConversationsRequest to JSON. + * Converts this NotificationConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsRequest + * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig * @instance * @returns {Object.} JSON object */ - ListConversationsRequest.prototype.toJSON = function toJSON() { + NotificationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListConversationsRequest; + /** + * MessageFormat enum. + * @name google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat + * @enum {number} + * @property {number} MESSAGE_FORMAT_UNSPECIFIED=0 MESSAGE_FORMAT_UNSPECIFIED value + * @property {number} PROTO=1 PROTO value + * @property {number} JSON=2 JSON value + */ + NotificationConfig.MessageFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROTO"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return NotificationConfig; })(); - v2beta1.ListConversationsResponse = (function() { + v2beta1.LoggingConfig = (function() { /** - * Properties of a ListConversationsResponse. + * Properties of a LoggingConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListConversationsResponse - * @property {Array.|null} [conversations] ListConversationsResponse conversations - * @property {string|null} [nextPageToken] ListConversationsResponse nextPageToken + * @interface ILoggingConfig + * @property {boolean|null} [enableStackdriverLogging] LoggingConfig enableStackdriverLogging */ /** - * Constructs a new ListConversationsResponse. + * Constructs a new LoggingConfig. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListConversationsResponse. - * @implements IListConversationsResponse + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig=} [properties] Properties to set */ - function ListConversationsResponse(properties) { - this.conversations = []; + function LoggingConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126190,91 +128247,75 @@ } /** - * ListConversationsResponse conversations. - * @member {Array.} conversations - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse - * @instance - */ - ListConversationsResponse.prototype.conversations = $util.emptyArray; - - /** - * ListConversationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * LoggingConfig enableStackdriverLogging. + * @member {boolean} enableStackdriverLogging + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @instance */ - ListConversationsResponse.prototype.nextPageToken = ""; + LoggingConfig.prototype.enableStackdriverLogging = false; /** - * Creates a new ListConversationsResponse instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse instance + * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig instance */ - ListConversationsResponse.create = function create(properties) { - return new ListConversationsResponse(properties); + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); }; /** - * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationsResponse.encode = function encode(message, writer) { + LoggingConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversations != null && message.conversations.length) - for (var i = 0; i < message.conversations.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Conversation.encode(message.conversations[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.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableStackdriverLogging); return writer; }; /** - * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationsResponse.verify|verify} messages. + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationsResponse message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse + * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationsResponse.decode = function decode(reader, length) { + LoggingConfig.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.v2beta1.ListConversationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.LoggingConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.conversations && message.conversations.length)) - message.conversations = []; - message.conversations.push($root.google.cloud.dialogflow.v2beta1.Conversation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.enableStackdriverLogging = reader.bool(); break; default: reader.skipType(tag & 7); @@ -126285,133 +128326,109 @@ }; /** - * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse + * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationsResponse.decodeDelimited = function decodeDelimited(reader) { + LoggingConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationsResponse message. + * Verifies a LoggingConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationsResponse.verify = function verify(message) { + LoggingConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversations != null && message.hasOwnProperty("conversations")) { - if (!Array.isArray(message.conversations)) - return "conversations: array expected"; - for (var i = 0; i < message.conversations.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Conversation.verify(message.conversations[i]); - if (error) - return "conversations." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + if (typeof message.enableStackdriverLogging !== "boolean") + return "enableStackdriverLogging: boolean expected"; return null; }; /** - * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListConversationsResponse} ListConversationsResponse + * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig */ - ListConversationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse) + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.LoggingConfig) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationsResponse(); - if (object.conversations) { - if (!Array.isArray(object.conversations)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationsResponse.conversations: array expected"); - message.conversations = []; - for (var i = 0; i < object.conversations.length; ++i) { - if (typeof object.conversations[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationsResponse.conversations: object expected"); - message.conversations[i] = $root.google.cloud.dialogflow.v2beta1.Conversation.fromObject(object.conversations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dialogflow.v2beta1.LoggingConfig(); + if (object.enableStackdriverLogging != null) + message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); return message; }; /** - * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @static - * @param {google.cloud.dialogflow.v2beta1.ListConversationsResponse} message ListConversationsResponse + * @param {google.cloud.dialogflow.v2beta1.LoggingConfig} message LoggingConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationsResponse.toObject = function toObject(message, options) { + LoggingConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.conversations = []; if (options.defaults) - object.nextPageToken = ""; - if (message.conversations && message.conversations.length) { - object.conversations = []; - for (var j = 0; j < message.conversations.length; ++j) - object.conversations[j] = $root.google.cloud.dialogflow.v2beta1.Conversation.toObject(message.conversations[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.enableStackdriverLogging = false; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + object.enableStackdriverLogging = message.enableStackdriverLogging; return object; }; /** - * Converts this ListConversationsResponse to JSON. + * Converts this LoggingConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListConversationsResponse + * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig * @instance * @returns {Object.} JSON object */ - ListConversationsResponse.prototype.toJSON = function toJSON() { + LoggingConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListConversationsResponse; + return LoggingConfig; })(); - v2beta1.GetConversationRequest = (function() { + v2beta1.ListConversationProfilesRequest = (function() { /** - * Properties of a GetConversationRequest. + * Properties of a ListConversationProfilesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetConversationRequest - * @property {string|null} [name] GetConversationRequest name + * @interface IListConversationProfilesRequest + * @property {string|null} [parent] ListConversationProfilesRequest parent + * @property {number|null} [pageSize] ListConversationProfilesRequest pageSize + * @property {string|null} [pageToken] ListConversationProfilesRequest pageToken */ /** - * Constructs a new GetConversationRequest. + * Constructs a new ListConversationProfilesRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetConversationRequest. - * @implements IGetConversationRequest + * @classdesc Represents a ListConversationProfilesRequest. + * @implements IListConversationProfilesRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest=} [properties] Properties to set */ - function GetConversationRequest(properties) { + function ListConversationProfilesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126419,75 +128436,101 @@ } /** - * GetConversationRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * ListConversationProfilesRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @instance */ - GetConversationRequest.prototype.name = ""; + ListConversationProfilesRequest.prototype.parent = ""; /** - * Creates a new GetConversationRequest instance using the specified properties. + * ListConversationProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @instance + */ + ListConversationProfilesRequest.prototype.pageSize = 0; + + /** + * ListConversationProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @instance + */ + ListConversationProfilesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConversationProfilesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest instance */ - GetConversationRequest.create = function create(properties) { - return new GetConversationRequest(properties); + ListConversationProfilesRequest.create = function create(properties) { + return new ListConversationProfilesRequest(properties); }; /** - * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationRequest.encode = function encode(message, writer) { + ListConversationProfilesRequest.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 GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConversationRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationRequest.decode = function decode(reader, length) { + ListConversationProfilesRequest.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.v2beta1.GetConversationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest(); 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); @@ -126498,107 +128541,126 @@ }; /** - * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationRequest.decodeDelimited = function decodeDelimited(reader) { + ListConversationProfilesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConversationRequest message. + * Verifies a ListConversationProfilesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConversationRequest.verify = function verify(message) { + ListConversationProfilesRequest.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 GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetConversationRequest} GetConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest */ - GetConversationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetConversationRequest) + ListConversationProfilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetConversationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest(); + 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 GetConversationRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2beta1.GetConversationRequest} message GetConversationRequest + * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} message ListConversationProfilesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConversationRequest.toObject = function toObject(message, options) { + ListConversationProfilesRequest.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 GetConversationRequest to JSON. + * Converts this ListConversationProfilesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest * @instance * @returns {Object.} JSON object */ - GetConversationRequest.prototype.toJSON = function toJSON() { + ListConversationProfilesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetConversationRequest; + return ListConversationProfilesRequest; })(); - v2beta1.CompleteConversationRequest = (function() { + v2beta1.ListConversationProfilesResponse = (function() { /** - * Properties of a CompleteConversationRequest. + * Properties of a ListConversationProfilesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICompleteConversationRequest - * @property {string|null} [name] CompleteConversationRequest name + * @interface IListConversationProfilesResponse + * @property {Array.|null} [conversationProfiles] ListConversationProfilesResponse conversationProfiles + * @property {string|null} [nextPageToken] ListConversationProfilesResponse nextPageToken */ /** - * Constructs a new CompleteConversationRequest. + * Constructs a new ListConversationProfilesResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CompleteConversationRequest. - * @implements ICompleteConversationRequest + * @classdesc Represents a ListConversationProfilesResponse. + * @implements IListConversationProfilesResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse=} [properties] Properties to set */ - function CompleteConversationRequest(properties) { + function ListConversationProfilesResponse(properties) { + this.conversationProfiles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126606,75 +128668,91 @@ } /** - * CompleteConversationRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * ListConversationProfilesResponse conversationProfiles. + * @member {Array.} conversationProfiles + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @instance */ - CompleteConversationRequest.prototype.name = ""; + ListConversationProfilesResponse.prototype.conversationProfiles = $util.emptyArray; /** - * Creates a new CompleteConversationRequest instance using the specified properties. + * ListConversationProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @instance + */ + ListConversationProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversationProfilesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest instance + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse instance */ - CompleteConversationRequest.create = function create(properties) { - return new CompleteConversationRequest(properties); + ListConversationProfilesResponse.create = function create(properties) { + return new ListConversationProfilesResponse(properties); }; /** - * Encodes the specified CompleteConversationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} message CompleteConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteConversationRequest.encode = function encode(message, writer) { + ListConversationProfilesResponse.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.conversationProfiles != null && message.conversationProfiles.length) + for (var i = 0; i < message.conversationProfiles.length; ++i) + $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfiles[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 CompleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CompleteConversationRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ICompleteConversationRequest} message CompleteConversationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompleteConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CompleteConversationRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteConversationRequest.decode = function decode(reader, length) { + ListConversationProfilesResponse.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.v2beta1.CompleteConversationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.conversationProfiles && message.conversationProfiles.length)) + message.conversationProfiles = []; + message.conversationProfiles.push($root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -126685,108 +128763,133 @@ }; /** - * Decodes a CompleteConversationRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompleteConversationRequest.decodeDelimited = function decodeDelimited(reader) { + ListConversationProfilesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompleteConversationRequest message. + * Verifies a ListConversationProfilesResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompleteConversationRequest.verify = function verify(message) { + ListConversationProfilesResponse.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.conversationProfiles != null && message.hasOwnProperty("conversationProfiles")) { + if (!Array.isArray(message.conversationProfiles)) + return "conversationProfiles: array expected"; + for (var i = 0; i < message.conversationProfiles.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfiles[i]); + if (error) + return "conversationProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CompleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} CompleteConversationRequest + * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse */ - CompleteConversationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest) + ListConversationProfilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CompleteConversationRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse(); + if (object.conversationProfiles) { + if (!Array.isArray(object.conversationProfiles)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.conversationProfiles: array expected"); + message.conversationProfiles = []; + for (var i = 0; i < object.conversationProfiles.length; ++i) { + if (typeof object.conversationProfiles[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.conversationProfiles: object expected"); + message.conversationProfiles[i] = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfiles[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CompleteConversationRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2beta1.CompleteConversationRequest} message CompleteConversationRequest + * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} message ListConversationProfilesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CompleteConversationRequest.toObject = function toObject(message, options) { + ListConversationProfilesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.conversationProfiles = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.conversationProfiles && message.conversationProfiles.length) { + object.conversationProfiles = []; + for (var j = 0; j < message.conversationProfiles.length; ++j) + object.conversationProfiles[j] = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CompleteConversationRequest to JSON. + * Converts this ListConversationProfilesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CompleteConversationRequest + * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse * @instance * @returns {Object.} JSON object */ - CompleteConversationRequest.prototype.toJSON = function toJSON() { + ListConversationProfilesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CompleteConversationRequest; + return ListConversationProfilesResponse; })(); - v2beta1.CreateMessageRequest = (function() { + v2beta1.GetConversationProfileRequest = (function() { /** - * Properties of a CreateMessageRequest. + * Properties of a GetConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateMessageRequest - * @property {string|null} [parent] CreateMessageRequest parent - * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [message] CreateMessageRequest message + * @interface IGetConversationProfileRequest + * @property {string|null} [name] GetConversationProfileRequest name */ /** - * Constructs a new CreateMessageRequest. + * Constructs a new GetConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateMessageRequest. - * @implements ICreateMessageRequest + * @classdesc Represents a GetConversationProfileRequest. + * @implements IGetConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest=} [properties] Properties to set */ - function CreateMessageRequest(properties) { + function GetConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -126794,88 +128897,75 @@ } /** - * CreateMessageRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest - * @instance - */ - CreateMessageRequest.prototype.parent = ""; - - /** - * CreateMessageRequest message. - * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} message - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * GetConversationProfileRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @instance */ - CreateMessageRequest.prototype.message = null; + GetConversationProfileRequest.prototype.name = ""; /** - * Creates a new CreateMessageRequest instance using the specified properties. + * Creates a new GetConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest instance */ - CreateMessageRequest.create = function create(properties) { - return new CreateMessageRequest(properties); + GetConversationProfileRequest.create = function create(properties) { + return new GetConversationProfileRequest(properties); }; /** - * Encodes the specified CreateMessageRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest} message CreateMessageRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMessageRequest.encode = function encode(message, writer) { + GetConversationProfileRequest.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.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.dialogflow.v2beta1.Message.encode(message.message, 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 CreateMessageRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify|verify} messages. + * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateMessageRequest} message CreateMessageRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMessageRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMessageRequest message from the specified reader or buffer. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMessageRequest.decode = function decode(reader, length) { + GetConversationProfileRequest.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.v2beta1.CreateMessageRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.message = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -126886,123 +128976,108 @@ }; /** - * Decodes a CreateMessageRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMessageRequest.decodeDelimited = function decodeDelimited(reader) { + GetConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMessageRequest message. + * Verifies a GetConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMessageRequest.verify = function verify(message) { + GetConversationProfileRequest.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.message != null && message.hasOwnProperty("message")) { - var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.message); - if (error) - return "message." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateMessageRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateMessageRequest} CreateMessageRequest + * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest */ - CreateMessageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest) + GetConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateMessageRequest.message: object expected"); - message.message = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.message); - } + var message = new $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateMessageRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CreateMessageRequest} message CreateMessageRequest + * @param {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} message GetConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMessageRequest.toObject = function toObject(message, options) { + GetConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.message = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.message, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateMessageRequest to JSON. + * Converts this GetConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateMessageRequest + * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest * @instance * @returns {Object.} JSON object */ - CreateMessageRequest.prototype.toJSON = function toJSON() { + GetConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateMessageRequest; + return GetConversationProfileRequest; })(); - v2beta1.BatchCreateMessagesRequest = (function() { + v2beta1.CreateConversationProfileRequest = (function() { /** - * Properties of a BatchCreateMessagesRequest. + * Properties of a CreateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchCreateMessagesRequest - * @property {string|null} [parent] BatchCreateMessagesRequest parent - * @property {Array.|null} [requests] BatchCreateMessagesRequest requests + * @interface ICreateConversationProfileRequest + * @property {string|null} [parent] CreateConversationProfileRequest parent + * @property {google.cloud.dialogflow.v2beta1.IConversationProfile|null} [conversationProfile] CreateConversationProfileRequest conversationProfile */ /** - * Constructs a new BatchCreateMessagesRequest. + * Constructs a new CreateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchCreateMessagesRequest. - * @implements IBatchCreateMessagesRequest + * @classdesc Represents a CreateConversationProfileRequest. + * @implements ICreateConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest=} [properties] Properties to set */ - function BatchCreateMessagesRequest(properties) { - this.requests = []; + function CreateConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127010,81 +129085,80 @@ } /** - * BatchCreateMessagesRequest parent. + * CreateConversationProfileRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @instance */ - BatchCreateMessagesRequest.prototype.parent = ""; + CreateConversationProfileRequest.prototype.parent = ""; /** - * BatchCreateMessagesRequest requests. - * @member {Array.} requests - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * CreateConversationProfileRequest conversationProfile. + * @member {google.cloud.dialogflow.v2beta1.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @instance */ - BatchCreateMessagesRequest.prototype.requests = $util.emptyArray; + CreateConversationProfileRequest.prototype.conversationProfile = null; /** - * Creates a new BatchCreateMessagesRequest instance using the specified properties. + * Creates a new CreateConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest instance + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest instance */ - BatchCreateMessagesRequest.create = function create(properties) { - return new BatchCreateMessagesRequest(properties); + CreateConversationProfileRequest.create = function create(properties) { + return new CreateConversationProfileRequest(properties); }; /** - * Encodes the specified BatchCreateMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. + * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} message BatchCreateMessagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateMessagesRequest.encode = function encode(message, writer) { + CreateConversationProfileRequest.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.requests != null && message.requests.length) - for (var i = 0; i < message.requests.length; ++i) - $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified BatchCreateMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.verify|verify} messages. + * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesRequest} message BatchCreateMessagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateMessagesRequest.decode = function decode(reader, length) { + CreateConversationProfileRequest.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.v2beta1.BatchCreateMessagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -127092,9 +129166,7 @@ message.parent = reader.string(); break; case 2: - if (!(message.requests && message.requests.length)) - message.requests = []; - message.requests.push($root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.decode(reader, reader.uint32())); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -127105,134 +129177,122 @@ }; /** - * Decodes a BatchCreateMessagesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateMessagesRequest message. + * Verifies a CreateConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateMessagesRequest.verify = function verify(message) { + CreateConversationProfileRequest.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.requests != null && message.hasOwnProperty("requests")) { - if (!Array.isArray(message.requests)) - return "requests: array expected"; - for (var i = 0; i < message.requests.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.verify(message.requests[i]); - if (error) - return "requests." + error; - } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + error; } return null; }; /** - * Creates a BatchCreateMessagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} BatchCreateMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest */ - BatchCreateMessagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest) + CreateConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.requests) { - if (!Array.isArray(object.requests)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.requests: array expected"); - message.requests = []; - for (var i = 0; i < object.requests.length; ++i) { - if (typeof object.requests[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest.requests: object expected"); - message.requests[i] = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.fromObject(object.requests[i]); - } + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfile); } return message; }; /** - * Creates a plain object from a BatchCreateMessagesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest} message BatchCreateMessagesRequest + * @param {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} message CreateConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateMessagesRequest.toObject = function toObject(message, options) { + CreateConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.requests = []; - if (options.defaults) + if (options.defaults) { object.parent = ""; + object.conversationProfile = null; + } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.requests && message.requests.length) { - object.requests = []; - for (var j = 0; j < message.requests.length; ++j) - object.requests[j] = $root.google.cloud.dialogflow.v2beta1.CreateMessageRequest.toObject(message.requests[j], options); - } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfile, options); return object; }; /** - * Converts this BatchCreateMessagesRequest to JSON. + * Converts this CreateConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest * @instance * @returns {Object.} JSON object */ - BatchCreateMessagesRequest.prototype.toJSON = function toJSON() { + CreateConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateMessagesRequest; + return CreateConversationProfileRequest; })(); - v2beta1.BatchCreateMessagesResponse = (function() { + v2beta1.UpdateConversationProfileRequest = (function() { /** - * Properties of a BatchCreateMessagesResponse. + * Properties of an UpdateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IBatchCreateMessagesResponse - * @property {Array.|null} [messages] BatchCreateMessagesResponse messages + * @interface IUpdateConversationProfileRequest + * @property {google.cloud.dialogflow.v2beta1.IConversationProfile|null} [conversationProfile] UpdateConversationProfileRequest conversationProfile + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversationProfileRequest updateMask */ /** - * Constructs a new BatchCreateMessagesResponse. + * Constructs a new UpdateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a BatchCreateMessagesResponse. - * @implements IBatchCreateMessagesResponse + * @classdesc Represents an UpdateConversationProfileRequest. + * @implements IUpdateConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest=} [properties] Properties to set */ - function BatchCreateMessagesResponse(properties) { - this.messages = []; + function UpdateConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127240,78 +129300,88 @@ } /** - * BatchCreateMessagesResponse messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * UpdateConversationProfileRequest conversationProfile. + * @member {google.cloud.dialogflow.v2beta1.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @instance */ - BatchCreateMessagesResponse.prototype.messages = $util.emptyArray; + UpdateConversationProfileRequest.prototype.conversationProfile = null; /** - * Creates a new BatchCreateMessagesResponse instance using the specified properties. + * UpdateConversationProfileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @instance + */ + UpdateConversationProfileRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest instance */ - BatchCreateMessagesResponse.create = function create(properties) { - return new BatchCreateMessagesResponse(properties); + UpdateConversationProfileRequest.create = function create(properties) { + return new UpdateConversationProfileRequest(properties); }; /** - * Encodes the specified BatchCreateMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse} message BatchCreateMessagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateMessagesResponse.encode = function encode(message, writer) { + UpdateConversationProfileRequest.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.v2beta1.Message.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfile, 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 BatchCreateMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.verify|verify} messages. + * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IBatchCreateMessagesResponse} message BatchCreateMessagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchCreateMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateMessagesResponse.decode = function decode(reader, length) { + UpdateConversationProfileRequest.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.v2beta1.BatchCreateMessagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest(); 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.v2beta1.Message.decode(reader, reader.uint32())); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -127322,127 +129392,126 @@ }; /** - * Decodes a BatchCreateMessagesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BatchCreateMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BatchCreateMessagesResponse message. + * Verifies an UpdateConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BatchCreateMessagesResponse.verify = function verify(message) { + UpdateConversationProfileRequest.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.v2beta1.Message.verify(message.messages[i]); - if (error) - return "messages." + error; - } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + 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 BatchCreateMessagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} BatchCreateMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest */ - BatchCreateMessagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse) + UpdateConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse.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.v2beta1.BatchCreateMessagesResponse.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.messages[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest(); + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfile); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a BatchCreateMessagesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse} message BatchCreateMessagesResponse + * @param {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} message UpdateConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchCreateMessagesResponse.toObject = function toObject(message, options) { + UpdateConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.messages[j], options); + if (options.defaults) { + object.conversationProfile = null; + object.updateMask = null; } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfile, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this BatchCreateMessagesResponse to JSON. + * Converts this UpdateConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.BatchCreateMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest * @instance * @returns {Object.} JSON object */ - BatchCreateMessagesResponse.prototype.toJSON = function toJSON() { + UpdateConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchCreateMessagesResponse; + return UpdateConversationProfileRequest; })(); - v2beta1.ListMessagesRequest = (function() { + v2beta1.DeleteConversationProfileRequest = (function() { /** - * Properties of a ListMessagesRequest. + * Properties of a DeleteConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListMessagesRequest - * @property {string|null} [parent] ListMessagesRequest parent - * @property {string|null} [filter] ListMessagesRequest filter - * @property {number|null} [pageSize] ListMessagesRequest pageSize - * @property {string|null} [pageToken] ListMessagesRequest pageToken + * @interface IDeleteConversationProfileRequest + * @property {string|null} [name] DeleteConversationProfileRequest name */ /** - * Constructs a new ListMessagesRequest. + * Constructs a new DeleteConversationProfileRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListMessagesRequest. - * @implements IListMessagesRequest + * @classdesc Represents a DeleteConversationProfileRequest. + * @implements IDeleteConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest=} [properties] Properties to set */ - function ListMessagesRequest(properties) { + function DeleteConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127450,114 +129519,75 @@ } /** - * ListMessagesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest - * @instance - */ - ListMessagesRequest.prototype.parent = ""; - - /** - * ListMessagesRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest - * @instance - */ - ListMessagesRequest.prototype.filter = ""; - - /** - * ListMessagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest - * @instance - */ - ListMessagesRequest.prototype.pageSize = 0; - - /** - * ListMessagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * DeleteConversationProfileRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @instance */ - ListMessagesRequest.prototype.pageToken = ""; + DeleteConversationProfileRequest.prototype.name = ""; /** - * Creates a new ListMessagesRequest instance using the specified properties. + * Creates a new DeleteConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest instance */ - ListMessagesRequest.create = function create(properties) { - return new ListMessagesRequest(properties); + DeleteConversationProfileRequest.create = function create(properties) { + return new DeleteConversationProfileRequest(properties); }; /** - * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. + * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesRequest.encode = function encode(message, writer) { + DeleteConversationProfileRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesRequest.verify|verify} messages. + * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesRequest.decode = function decode(reader, length) { + DeleteConversationProfileRequest.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.v2beta1.ListMessagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 4: - message.filter = 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); @@ -127568,134 +129598,109 @@ }; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMessagesRequest message. + * Verifies a DeleteConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMessagesRequest.verify = function verify(message) { + DeleteConversationProfileRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: 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 ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest */ - ListMessagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest) + DeleteConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - 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.v2beta1.DeleteConversationProfileRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListMessagesRequest} message ListMessagesRequest + * @param {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} message DeleteConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMessagesRequest.toObject = function toObject(message, options) { + DeleteConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListMessagesRequest to JSON. + * Converts this DeleteConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest * @instance * @returns {Object.} JSON object */ - ListMessagesRequest.prototype.toJSON = function toJSON() { + DeleteConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMessagesRequest; + return DeleteConversationProfileRequest; })(); - v2beta1.ListMessagesResponse = (function() { + v2beta1.SetSuggestionFeatureConfigRequest = (function() { /** - * Properties of a ListMessagesResponse. + * Properties of a SetSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListMessagesResponse - * @property {Array.|null} [messages] ListMessagesResponse messages - * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken + * @interface ISetSuggestionFeatureConfigRequest + * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigRequest conversationProfile + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigRequest participantRole + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null} [suggestionFeatureConfig] SetSuggestionFeatureConfigRequest suggestionFeatureConfig */ /** - * Constructs a new ListMessagesResponse. + * Constructs a new SetSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListMessagesResponse. - * @implements IListMessagesResponse + * @classdesc Represents a SetSuggestionFeatureConfigRequest. + * @implements ISetSuggestionFeatureConfigRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set */ - function ListMessagesResponse(properties) { - this.messages = []; + function SetSuggestionFeatureConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -127703,91 +129708,101 @@ } /** - * ListMessagesResponse messages. - * @member {Array.} messages - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * SetSuggestionFeatureConfigRequest conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @instance */ - ListMessagesResponse.prototype.messages = $util.emptyArray; + SetSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; /** - * ListMessagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * SetSuggestionFeatureConfigRequest participantRole. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @instance */ - ListMessagesResponse.prototype.nextPageToken = ""; + SetSuggestionFeatureConfigRequest.prototype.participantRole = 0; /** - * Creates a new ListMessagesResponse instance using the specified properties. + * SetSuggestionFeatureConfigRequest suggestionFeatureConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null|undefined} suggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest + * @instance + */ + SetSuggestionFeatureConfigRequest.prototype.suggestionFeatureConfig = null; + + /** + * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse instance + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest instance */ - ListMessagesResponse.create = function create(properties) { - return new ListMessagesResponse(properties); + SetSuggestionFeatureConfigRequest.create = function create(properties) { + return new SetSuggestionFeatureConfigRequest(properties); }; /** - * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesResponse.encode = function encode(message, writer) { + SetSuggestionFeatureConfigRequest.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.v2beta1.Message.encode(message.messages[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.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureConfig != null && Object.hasOwnProperty.call(message, "suggestionFeatureConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.suggestionFeatureConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListMessagesResponse.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesResponse.decode = function decode(reader, length) { + SetSuggestionFeatureConfigRequest.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.v2beta1.ListMessagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest(); 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.v2beta1.Message.decode(reader, reader.uint32())); + message.conversationProfile = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.participantRole = reader.int32(); + break; + case 3: + message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -127798,346 +129813,154 @@ }; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + SetSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMessagesResponse message. + * Verifies a SetSuggestionFeatureConfigRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMessagesResponse.verify = function verify(message) { + SetSuggestionFeatureConfigRequest.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.v2beta1.Message.verify(message.messages[i]); - if (error) - return "messages." + error; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.suggestionFeatureConfig); + if (error) + return "suggestionFeatureConfig." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest */ - ListMessagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse) + SetSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListMessagesResponse(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListMessagesResponse.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.v2beta1.ListMessagesResponse.messages: object expected"); - message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.messages[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; + } + if (object.suggestionFeatureConfig != null) { + if (typeof object.suggestionFeatureConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest.suggestionFeatureConfig: object expected"); + message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.suggestionFeatureConfig); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListMessagesResponse} message ListMessagesResponse + * @param {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMessagesResponse.toObject = function toObject(message, options) { + SetSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.messages[j], options); + if (options.defaults) { + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureConfig = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) + object.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.suggestionFeatureConfig, options); return object; }; /** - * Converts this ListMessagesResponse to JSON. + * Converts this SetSuggestionFeatureConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListMessagesResponse + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest * @instance * @returns {Object.} JSON object */ - ListMessagesResponse.prototype.toJSON = function toJSON() { + SetSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListMessagesResponse; - })(); - - v2beta1.ConversationProfiles = (function() { - - /** - * Constructs a new ConversationProfiles service. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ConversationProfiles - * @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 ConversationProfiles(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ConversationProfiles.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationProfiles; - - /** - * Creates new ConversationProfiles service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @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 {ConversationProfiles} RPC service. Useful where requests and/or responses are streamed. - */ - ConversationProfiles.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#listConversationProfiles}. - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @typedef ListConversationProfilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} [response] ListConversationProfilesResponse - */ - - /** - * Calls ListConversationProfiles. - * @function listConversationProfiles - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.ListConversationProfilesCallback} callback Node-style callback called with the error, if any, and ListConversationProfilesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.listConversationProfiles = function listConversationProfiles(request, callback) { - return this.rpcCall(listConversationProfiles, $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest, $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse, request, callback); - }, "name", { value: "ListConversationProfiles" }); - - /** - * Calls ListConversationProfiles. - * @function listConversationProfiles - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#getConversationProfile}. - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @typedef GetConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls GetConversationProfile. - * @function getConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.GetConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.getConversationProfile = function getConversationProfile(request, callback) { - return this.rpcCall(getConversationProfile, $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); - }, "name", { value: "GetConversationProfile" }); - - /** - * Calls GetConversationProfile. - * @function getConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#createConversationProfile}. - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @typedef CreateConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls CreateConversationProfile. - * @function createConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.CreateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.createConversationProfile = function createConversationProfile(request, callback) { - return this.rpcCall(createConversationProfile, $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); - }, "name", { value: "CreateConversationProfile" }); - - /** - * Calls CreateConversationProfile. - * @function createConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#updateConversationProfile}. - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @typedef UpdateConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls UpdateConversationProfile. - * @function updateConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.UpdateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.updateConversationProfile = function updateConversationProfile(request, callback) { - return this.rpcCall(updateConversationProfile, $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest, $root.google.cloud.dialogflow.v2beta1.ConversationProfile, request, callback); - }, "name", { value: "UpdateConversationProfile" }); - - /** - * Calls UpdateConversationProfile. - * @function updateConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.ConversationProfiles#deleteConversationProfile}. - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @typedef DeleteConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteConversationProfile. - * @function deleteConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.ConversationProfiles.DeleteConversationProfileCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.deleteConversationProfile = function deleteConversationProfile(request, callback) { - return this.rpcCall(deleteConversationProfile, $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteConversationProfile" }); - - /** - * Calls DeleteConversationProfile. - * @function deleteConversationProfile - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ConversationProfiles; + return SetSuggestionFeatureConfigRequest; })(); - v2beta1.ConversationProfile = (function() { + v2beta1.ClearSuggestionFeatureConfigRequest = (function() { /** - * Properties of a ConversationProfile. + * Properties of a ClearSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IConversationProfile - * @property {string|null} [name] ConversationProfile name - * @property {string|null} [displayName] ConversationProfile displayName - * @property {google.protobuf.ITimestamp|null} [createTime] ConversationProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConversationProfile updateTime - * @property {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null} [automatedAgentConfig] ConversationProfile automatedAgentConfig - * @property {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null} [humanAgentAssistantConfig] ConversationProfile humanAgentAssistantConfig - * @property {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null} [humanAgentHandoffConfig] ConversationProfile humanAgentHandoffConfig - * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [notificationConfig] ConversationProfile notificationConfig - * @property {google.cloud.dialogflow.v2beta1.ILoggingConfig|null} [loggingConfig] ConversationProfile loggingConfig - * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [newMessageEventNotificationConfig] ConversationProfile newMessageEventNotificationConfig - * @property {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null} [sttConfig] ConversationProfile sttConfig - * @property {string|null} [languageCode] ConversationProfile languageCode - * @property {string|null} [timeZone] ConversationProfile timeZone - * @property {string|null} [securitySettings] ConversationProfile securitySettings + * @interface IClearSuggestionFeatureConfigRequest + * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigRequest conversationProfile + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigRequest participantRole + * @property {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigRequest suggestionFeatureType */ /** - * Constructs a new ConversationProfile. + * Constructs a new ClearSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ConversationProfile. - * @implements IConversationProfile + * @classdesc Represents a ClearSuggestionFeatureConfigRequest. + * @implements IClearSuggestionFeatureConfigRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IConversationProfile=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set */ - function ConversationProfile(properties) { + function ClearSuggestionFeatureConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128145,244 +129968,101 @@ } /** - * ConversationProfile name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.name = ""; - - /** - * ConversationProfile displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.displayName = ""; - - /** - * ConversationProfile createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.createTime = null; - - /** - * ConversationProfile updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.updateTime = null; - - /** - * ConversationProfile automatedAgentConfig. - * @member {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig|null|undefined} automatedAgentConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.automatedAgentConfig = null; - - /** - * ConversationProfile humanAgentAssistantConfig. - * @member {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig|null|undefined} humanAgentAssistantConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.humanAgentAssistantConfig = null; - - /** - * ConversationProfile humanAgentHandoffConfig. - * @member {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig|null|undefined} humanAgentHandoffConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.humanAgentHandoffConfig = null; - - /** - * ConversationProfile notificationConfig. - * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.notificationConfig = null; - - /** - * ConversationProfile loggingConfig. - * @member {google.cloud.dialogflow.v2beta1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.loggingConfig = null; - - /** - * ConversationProfile newMessageEventNotificationConfig. - * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} newMessageEventNotificationConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.newMessageEventNotificationConfig = null; - - /** - * ConversationProfile sttConfig. - * @member {google.cloud.dialogflow.v2beta1.ISpeechToTextConfig|null|undefined} sttConfig - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile - * @instance - */ - ConversationProfile.prototype.sttConfig = null; - - /** - * ConversationProfile languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * ClearSuggestionFeatureConfigRequest conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @instance */ - ConversationProfile.prototype.languageCode = ""; + ClearSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; /** - * ConversationProfile timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * ClearSuggestionFeatureConfigRequest participantRole. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @instance */ - ConversationProfile.prototype.timeZone = ""; + ClearSuggestionFeatureConfigRequest.prototype.participantRole = 0; /** - * ConversationProfile securitySettings. - * @member {string} securitySettings - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * ClearSuggestionFeatureConfigRequest suggestionFeatureType. + * @member {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @instance */ - ConversationProfile.prototype.securitySettings = ""; + ClearSuggestionFeatureConfigRequest.prototype.suggestionFeatureType = 0; /** - * Creates a new ConversationProfile instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationProfile=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile instance + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest instance */ - ConversationProfile.create = function create(properties) { - return new ConversationProfile(properties); + ClearSuggestionFeatureConfigRequest.create = function create(properties) { + return new ClearSuggestionFeatureConfigRequest(properties); }; /** - * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationProfile} message ConversationProfile message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationProfile.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.automatedAgentConfig != null && Object.hasOwnProperty.call(message, "automatedAgentConfig")) - $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.encode(message.automatedAgentConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.humanAgentAssistantConfig != null && Object.hasOwnProperty.call(message, "humanAgentAssistantConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.encode(message.humanAgentAssistantConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.humanAgentHandoffConfig != null && Object.hasOwnProperty.call(message, "humanAgentHandoffConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.encode(message.humanAgentHandoffConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.cloud.dialogflow.v2beta1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.newMessageEventNotificationConfig != null && Object.hasOwnProperty.call(message, "newMessageEventNotificationConfig")) - $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.newMessageEventNotificationConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sttConfig != null && Object.hasOwnProperty.call(message, "sttConfig")) - $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.encode(message.sttConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); + ClearSuggestionFeatureConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); return writer; }; /** - * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationProfile.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationProfile} message ConversationProfile message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationProfile.encodeDelimited = function encodeDelimited(message, writer) { + ClearSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationProfile message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.decode = function decode(reader, length) { + ClearSuggestionFeatureConfigRequest.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.v2beta1.ConversationProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.conversationProfile = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 11: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 12: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.participantRole = reader.int32(); break; case 3: - message.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.decode(reader, reader.uint32()); - break; - case 4: - message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.decode(reader, reader.uint32()); - break; - case 5: - message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.decode(reader, reader.uint32()); - break; - case 6: - message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); - break; - case 7: - message.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.decode(reader, reader.uint32()); - break; - case 8: - message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); - break; - case 9: - message.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.decode(reader, reader.uint32()); - break; - case 10: - message.languageCode = reader.string(); - break; - case 14: - message.timeZone = reader.string(); - break; - case 13: - message.securitySettings = reader.string(); + message.suggestionFeatureType = reader.int32(); break; default: reader.skipType(tag & 7); @@ -128393,257 +130073,173 @@ }; /** - * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.decodeDelimited = function decodeDelimited(reader) { + ClearSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationProfile message. + * Verifies a ClearSuggestionFeatureConfigRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationProfile.verify = function verify(message) { + ClearSuggestionFeatureConfigRequest.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify(message.automatedAgentConfig); - if (error) - return "automatedAgentConfig." + error; - } - if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify(message.humanAgentAssistantConfig); - if (error) - return "humanAgentAssistantConfig." + error; - } - if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify(message.humanAgentHandoffConfig); - if (error) - return "humanAgentHandoffConfig." + error; - } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.newMessageEventNotificationConfig); - if (error) - return "newMessageEventNotificationConfig." + error; - } - if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.verify(message.sttConfig); - if (error) - return "sttConfig." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - if (!$util.isString(message.securitySettings)) - return "securitySettings: string expected"; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a ConversationProfile message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest */ - ConversationProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationProfile) + ClearSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ConversationProfile(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.automatedAgentConfig != null) { - if (typeof object.automatedAgentConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.automatedAgentConfig: object expected"); - message.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.fromObject(object.automatedAgentConfig); - } - if (object.humanAgentAssistantConfig != null) { - if (typeof object.humanAgentAssistantConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.humanAgentAssistantConfig: object expected"); - message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.fromObject(object.humanAgentAssistantConfig); - } - if (object.humanAgentHandoffConfig != null) { - if (typeof object.humanAgentHandoffConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.humanAgentHandoffConfig: object expected"); - message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.fromObject(object.humanAgentHandoffConfig); - } - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.loggingConfig: object expected"); - message.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.fromObject(object.loggingConfig); - } - if (object.newMessageEventNotificationConfig != null) { - if (typeof object.newMessageEventNotificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.newMessageEventNotificationConfig: object expected"); - message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.newMessageEventNotificationConfig); + var message = new $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; } - if (object.sttConfig != null) { - if (typeof object.sttConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationProfile.sttConfig: object expected"); - message.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.fromObject(object.sttConfig); + switch (object.suggestionFeatureType) { + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.securitySettings != null) - message.securitySettings = String(object.securitySettings); return message; }; /** - * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. + * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} message ConversationProfile + * @param {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationProfile.toObject = function toObject(message, options) { + ClearSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.automatedAgentConfig = null; - object.humanAgentAssistantConfig = null; - object.humanAgentHandoffConfig = null; - object.notificationConfig = null; - object.loggingConfig = null; - object.newMessageEventNotificationConfig = null; - object.sttConfig = null; - object.languageCode = ""; - object.createTime = null; - object.updateTime = null; - object.securitySettings = ""; - object.timeZone = ""; + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_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.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) - object.automatedAgentConfig = $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.toObject(message.automatedAgentConfig, options); - if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) - object.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.toObject(message.humanAgentAssistantConfig, options); - if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) - object.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.toObject(message.humanAgentHandoffConfig, options); - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.notificationConfig, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.cloud.dialogflow.v2beta1.LoggingConfig.toObject(message.loggingConfig, options); - if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) - object.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.newMessageEventNotificationConfig, options); - if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) - object.sttConfig = $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig.toObject(message.sttConfig, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = message.securitySettings; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; return object; }; /** - * Converts this ConversationProfile to JSON. + * Converts this ClearSuggestionFeatureConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ConversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest * @instance * @returns {Object.} JSON object */ - ConversationProfile.prototype.toJSON = function toJSON() { + ClearSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ConversationProfile; + return ClearSuggestionFeatureConfigRequest; })(); - v2beta1.AutomatedAgentConfig = (function() { + v2beta1.SetSuggestionFeatureConfigOperationMetadata = (function() { /** - * Properties of an AutomatedAgentConfig. + * Properties of a SetSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IAutomatedAgentConfig - * @property {string|null} [agent] AutomatedAgentConfig agent + * @interface ISetSuggestionFeatureConfigOperationMetadata + * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigOperationMetadata conversationProfile + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigOperationMetadata participantRole + * @property {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null} [suggestionFeatureType] SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType + * @property {google.protobuf.ITimestamp|null} [createTime] SetSuggestionFeatureConfigOperationMetadata createTime */ /** - * Constructs a new AutomatedAgentConfig. + * Constructs a new SetSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an AutomatedAgentConfig. - * @implements IAutomatedAgentConfig + * @classdesc Represents a SetSuggestionFeatureConfigOperationMetadata. + * @implements ISetSuggestionFeatureConfigOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set */ - function AutomatedAgentConfig(properties) { + function SetSuggestionFeatureConfigOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128651,75 +130247,114 @@ } /** - * AutomatedAgentConfig agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * SetSuggestionFeatureConfigOperationMetadata conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @instance */ - AutomatedAgentConfig.prototype.agent = ""; + SetSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; /** - * Creates a new AutomatedAgentConfig instance using the specified properties. + * SetSuggestionFeatureConfigOperationMetadata participantRole. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata + * @instance + */ + SetSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; + + /** + * SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. + * @member {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata + * @instance + */ + SetSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; + + /** + * SetSuggestionFeatureConfigOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata + * @instance + */ + SetSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; + + /** + * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig instance + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata instance */ - AutomatedAgentConfig.create = function create(properties) { - return new AutomatedAgentConfig(properties); + SetSuggestionFeatureConfigOperationMetadata.create = function create(properties) { + return new SetSuggestionFeatureConfigOperationMetadata(properties); }; /** - * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentConfig.encode = function encode(message, writer) { + SetSuggestionFeatureConfigOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.AutomatedAgentConfig.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + SetSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentConfig.decode = function decode(reader, length) { + SetSuggestionFeatureConfigOperationMetadata.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.v2beta1.AutomatedAgentConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.agent = reader.string(); + message.conversationProfile = reader.string(); + break; + case 2: + message.participantRole = reader.int32(); + break; + case 3: + message.suggestionFeatureType = reader.int32(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -128730,110 +130365,186 @@ }; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentConfig.decodeDelimited = function decodeDelimited(reader) { + SetSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutomatedAgentConfig message. + * Verifies a SetSuggestionFeatureConfigOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutomatedAgentConfig.verify = function verify(message) { + SetSuggestionFeatureConfigOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } return null; }; /** - * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata */ - AutomatedAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig) + SetSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.AutomatedAgentConfig(); - if (object.agent != null) - message.agent = String(object.agent); + var message = new $root.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; + } + switch (object.suggestionFeatureType) { + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } return message; }; /** - * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. + * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.AutomatedAgentConfig} message AutomatedAgentConfig + * @param {google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomatedAgentConfig.toObject = function toObject(message, options) { + SetSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.agent = ""; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; + if (options.defaults) { + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this AutomatedAgentConfig to JSON. + * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata * @instance * @returns {Object.} JSON object */ - AutomatedAgentConfig.prototype.toJSON = function toJSON() { + SetSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AutomatedAgentConfig; + return SetSuggestionFeatureConfigOperationMetadata; })(); - v2beta1.HumanAgentAssistantConfig = (function() { + v2beta1.ClearSuggestionFeatureConfigOperationMetadata = (function() { /** - * Properties of a HumanAgentAssistantConfig. + * Properties of a ClearSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IHumanAgentAssistantConfig - * @property {google.cloud.dialogflow.v2beta1.INotificationConfig|null} [notificationConfig] HumanAgentAssistantConfig notificationConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null} [humanAgentSuggestionConfig] HumanAgentAssistantConfig humanAgentSuggestionConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null} [endUserSuggestionConfig] HumanAgentAssistantConfig endUserSuggestionConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null} [messageAnalysisConfig] HumanAgentAssistantConfig messageAnalysisConfig + * @interface IClearSuggestionFeatureConfigOperationMetadata + * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigOperationMetadata conversationProfile + * @property {google.cloud.dialogflow.v2beta1.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigOperationMetadata participantRole + * @property {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType + * @property {google.protobuf.ITimestamp|null} [createTime] ClearSuggestionFeatureConfigOperationMetadata createTime */ /** - * Constructs a new HumanAgentAssistantConfig. + * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a HumanAgentAssistantConfig. - * @implements IHumanAgentAssistantConfig + * @classdesc Represents a ClearSuggestionFeatureConfigOperationMetadata. + * @implements IClearSuggestionFeatureConfigOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set */ - function HumanAgentAssistantConfig(properties) { + function ClearSuggestionFeatureConfigOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -128841,114 +130552,114 @@ } /** - * HumanAgentAssistantConfig notificationConfig. - * @member {google.cloud.dialogflow.v2beta1.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * ClearSuggestionFeatureConfigOperationMetadata conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - HumanAgentAssistantConfig.prototype.notificationConfig = null; + ClearSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; /** - * HumanAgentAssistantConfig humanAgentSuggestionConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} humanAgentSuggestionConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * ClearSuggestionFeatureConfigOperationMetadata participantRole. + * @member {google.cloud.dialogflow.v2beta1.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - HumanAgentAssistantConfig.prototype.humanAgentSuggestionConfig = null; + ClearSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; /** - * HumanAgentAssistantConfig endUserSuggestionConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} endUserSuggestionConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. + * @member {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - HumanAgentAssistantConfig.prototype.endUserSuggestionConfig = null; + ClearSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; /** - * HumanAgentAssistantConfig messageAnalysisConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig|null|undefined} messageAnalysisConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * ClearSuggestionFeatureConfigOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - HumanAgentAssistantConfig.prototype.messageAnalysisConfig = null; + ClearSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; /** - * Creates a new HumanAgentAssistantConfig instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig instance + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata instance */ - HumanAgentAssistantConfig.create = function create(properties) { - return new HumanAgentAssistantConfig(properties); + ClearSuggestionFeatureConfigOperationMetadata.create = function create(properties) { + return new ClearSuggestionFeatureConfigOperationMetadata(properties); }; /** - * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentAssistantConfig.encode = function encode(message, writer) { + ClearSuggestionFeatureConfigOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.dialogflow.v2beta1.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.humanAgentSuggestionConfig != null && Object.hasOwnProperty.call(message, "humanAgentSuggestionConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.encode(message.humanAgentSuggestionConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endUserSuggestionConfig != null && Object.hasOwnProperty.call(message, "endUserSuggestionConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.encode(message.endUserSuggestionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.messageAnalysisConfig != null && Object.hasOwnProperty.call(message, "messageAnalysisConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.encode(message.messageAnalysisConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentAssistantConfig.encodeDelimited = function encodeDelimited(message, writer) { + ClearSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentAssistantConfig.decode = function decode(reader, length) { + ClearSuggestionFeatureConfigOperationMetadata.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.v2beta1.HumanAgentAssistantConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.conversationProfile = reader.string(); + break; case 2: - message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.decode(reader, reader.uint32()); + message.participantRole = reader.int32(); break; case 3: - message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); + message.suggestionFeatureType = reader.int32(); break; case 4: - message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); - break; - case 5: - message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -128959,918 +130670,1045 @@ }; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentAssistantConfig.decodeDelimited = function decodeDelimited(reader) { + ClearSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HumanAgentAssistantConfig message. + * Verifies a ClearSuggestionFeatureConfigOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HumanAgentAssistantConfig.verify = function verify(message) { + ClearSuggestionFeatureConfigOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify(message.humanAgentSuggestionConfig); - if (error) - return "humanAgentSuggestionConfig." + error; - } - if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify(message.endUserSuggestionConfig); - if (error) - return "endUserSuggestionConfig." + error; - } - if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify(message.messageAnalysisConfig); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "messageAnalysisConfig." + error; + return "createTime." + error; } return null; }; /** - * Creates a HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata */ - HumanAgentAssistantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig) + ClearSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig(); - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.humanAgentSuggestionConfig != null) { - if (typeof object.humanAgentSuggestionConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.humanAgentSuggestionConfig: object expected"); - message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.humanAgentSuggestionConfig); + var message = new $root.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; } - if (object.endUserSuggestionConfig != null) { - if (typeof object.endUserSuggestionConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.endUserSuggestionConfig: object expected"); - message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.endUserSuggestionConfig); + switch (object.suggestionFeatureType) { + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; + break; } - if (object.messageAnalysisConfig != null) { - if (typeof object.messageAnalysisConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.messageAnalysisConfig: object expected"); - message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.fromObject(object.messageAnalysisConfig); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. + * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig} message HumanAgentAssistantConfig + * @param {google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HumanAgentAssistantConfig.toObject = function toObject(message, options) { + ClearSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.notificationConfig = null; - object.humanAgentSuggestionConfig = null; - object.endUserSuggestionConfig = null; - object.messageAnalysisConfig = null; + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.dialogflow.v2beta1.NotificationConfig.toObject(message.notificationConfig, options); - if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) - object.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.humanAgentSuggestionConfig, options); - if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) - object.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.endUserSuggestionConfig, options); - if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) - object.messageAnalysisConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.toObject(message.messageAnalysisConfig, options); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this HumanAgentAssistantConfig to JSON. + * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata * @instance * @returns {Object.} JSON object */ - HumanAgentAssistantConfig.prototype.toJSON = function toJSON() { + ClearSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - HumanAgentAssistantConfig.SuggestionTriggerSettings = (function() { - - /** - * Properties of a SuggestionTriggerSettings. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface ISuggestionTriggerSettings - * @property {boolean|null} [noSmallTalk] SuggestionTriggerSettings noSmallTalk - * @property {boolean|null} [onlyEndUser] SuggestionTriggerSettings onlyEndUser - */ - - /** - * Constructs a new SuggestionTriggerSettings. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionTriggerSettings. - * @implements ISuggestionTriggerSettings - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set - */ - function SuggestionTriggerSettings(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 ClearSuggestionFeatureConfigOperationMetadata; + })(); - /** - * SuggestionTriggerSettings noSmallTalk. - * @member {boolean} noSmallTalk - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - */ - SuggestionTriggerSettings.prototype.noSmallTalk = false; + v2beta1.Documents = (function() { - /** - * SuggestionTriggerSettings onlyEndUser. - * @member {boolean} onlyEndUser - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - */ - SuggestionTriggerSettings.prototype.onlyEndUser = false; + /** + * Constructs a new Documents service. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a Documents + * @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 Documents(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Creates a new SuggestionTriggerSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings instance - */ - SuggestionTriggerSettings.create = function create(properties) { - return new SuggestionTriggerSettings(properties); - }; + (Documents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Documents; - /** - * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionTriggerSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.noSmallTalk != null && Object.hasOwnProperty.call(message, "noSmallTalk")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.noSmallTalk); - if (message.onlyEndUser != null && Object.hasOwnProperty.call(message, "onlyEndUser")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.onlyEndUser); - return writer; - }; + /** + * Creates new Documents service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @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 {Documents} RPC service. Useful where requests and/or responses are streamed. + */ + Documents.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionTriggerSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#listDocuments}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef ListDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} [response] ListDocumentsResponse + */ - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionTriggerSettings.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.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.noSmallTalk = reader.bool(); - break; - case 2: - message.onlyEndUser = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListDocuments. + * @function listDocuments + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} request ListDocumentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.ListDocumentsCallback} callback Node-style callback called with the error, if any, and ListDocumentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.listDocuments = function listDocuments(request, callback) { + return this.rpcCall(listDocuments, $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest, $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse, request, callback); + }, "name", { value: "ListDocuments" }); - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionTriggerSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ListDocuments. + * @function listDocuments + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} request ListDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies a SuggestionTriggerSettings message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionTriggerSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.noSmallTalk != null && message.hasOwnProperty("noSmallTalk")) - if (typeof message.noSmallTalk !== "boolean") - return "noSmallTalk: boolean expected"; - if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) - if (typeof message.onlyEndUser !== "boolean") - return "onlyEndUser: boolean expected"; - return null; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#getDocument}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef GetDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Document} [response] Document + */ - /** - * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - */ - SuggestionTriggerSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings(); - if (object.noSmallTalk != null) - message.noSmallTalk = Boolean(object.noSmallTalk); - if (object.onlyEndUser != null) - message.onlyEndUser = Boolean(object.onlyEndUser); - return message; - }; + /** + * Calls GetDocument. + * @function getDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} request GetDocumentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.GetDocumentCallback} callback Node-style callback called with the error, if any, and Document + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.getDocument = function getDocument(request, callback) { + return this.rpcCall(getDocument, $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest, $root.google.cloud.dialogflow.v2beta1.Document, request, callback); + }, "name", { value: "GetDocument" }); - /** - * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings} message SuggestionTriggerSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionTriggerSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.noSmallTalk = false; - object.onlyEndUser = false; - } - if (message.noSmallTalk != null && message.hasOwnProperty("noSmallTalk")) - object.noSmallTalk = message.noSmallTalk; - if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) - object.onlyEndUser = message.onlyEndUser; - return object; - }; + /** + * Calls GetDocument. + * @function getDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} request GetDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this SuggestionTriggerSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - * @returns {Object.} JSON object - */ - SuggestionTriggerSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#createDocument}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef CreateDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - return SuggestionTriggerSettings; - })(); + /** + * Calls CreateDocument. + * @function createDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} request CreateDocumentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.CreateDocumentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.createDocument = function createDocument(request, callback) { + return this.rpcCall(createDocument, $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDocument" }); - HumanAgentAssistantConfig.SuggestionFeatureConfig = (function() { + /** + * Calls CreateDocument. + * @function createDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} request CreateDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a SuggestionFeatureConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface ISuggestionFeatureConfig - * @property {google.cloud.dialogflow.v2beta1.ISuggestionFeature|null} [suggestionFeature] SuggestionFeatureConfig suggestionFeature - * @property {boolean|null} [enableEventBasedSuggestion] SuggestionFeatureConfig enableEventBasedSuggestion - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null} [suggestionTriggerSettings] SuggestionFeatureConfig suggestionTriggerSettings - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null} [queryConfig] SuggestionFeatureConfig queryConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null} [conversationModelConfig] SuggestionFeatureConfig conversationModelConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null} [conversationProcessConfig] SuggestionFeatureConfig conversationProcessConfig - */ + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#importDocuments}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef ImportDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Constructs a new SuggestionFeatureConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionFeatureConfig. - * @implements ISuggestionFeatureConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set - */ - function SuggestionFeatureConfig(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 ImportDocuments. + * @function importDocuments + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.importDocuments = function importDocuments(request, callback) { + return this.rpcCall(importDocuments, $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportDocuments" }); - /** - * SuggestionFeatureConfig suggestionFeature. - * @member {google.cloud.dialogflow.v2beta1.ISuggestionFeature|null|undefined} suggestionFeature - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.suggestionFeature = null; + /** + * Calls ImportDocuments. + * @function importDocuments + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * SuggestionFeatureConfig enableEventBasedSuggestion. - * @member {boolean} enableEventBasedSuggestion - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.enableEventBasedSuggestion = false; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#deleteDocument}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef DeleteDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * SuggestionFeatureConfig suggestionTriggerSettings. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null|undefined} suggestionTriggerSettings - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.suggestionTriggerSettings = null; + /** + * Calls DeleteDocument. + * @function deleteDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.DeleteDocumentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.deleteDocument = function deleteDocument(request, callback) { + return this.rpcCall(deleteDocument, $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDocument" }); - /** - * SuggestionFeatureConfig queryConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null|undefined} queryConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.queryConfig = null; + /** + * Calls DeleteDocument. + * @function deleteDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * SuggestionFeatureConfig conversationModelConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null|undefined} conversationModelConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.conversationModelConfig = null; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#updateDocument}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef UpdateDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * SuggestionFeatureConfig conversationProcessConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null|undefined} conversationProcessConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.conversationProcessConfig = null; + /** + * Calls UpdateDocument. + * @function updateDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.UpdateDocumentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.updateDocument = function updateDocument(request, callback) { + return this.rpcCall(updateDocument, $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDocument" }); - /** - * Creates a new SuggestionFeatureConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig instance - */ - SuggestionFeatureConfig.create = function create(properties) { - return new SuggestionFeatureConfig(properties); - }; + /** + * Calls UpdateDocument. + * @function updateDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionFeatureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableEventBasedSuggestion != null && Object.hasOwnProperty.call(message, "enableEventBasedSuggestion")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableEventBasedSuggestion); - if (message.suggestionFeature != null && Object.hasOwnProperty.call(message, "suggestionFeature")) - $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.encode(message.suggestionFeature, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.queryConfig != null && Object.hasOwnProperty.call(message, "queryConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.encode(message.queryConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.conversationModelConfig != null && Object.hasOwnProperty.call(message, "conversationModelConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.encode(message.conversationModelConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.conversationProcessConfig != null && Object.hasOwnProperty.call(message, "conversationProcessConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.encode(message.conversationProcessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.suggestionTriggerSettings != null && Object.hasOwnProperty.call(message, "suggestionTriggerSettings")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.encode(message.suggestionTriggerSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#reloadDocument}. + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @typedef ReloadDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionFeatureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ReloadDocument. + * @function reloadDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} request ReloadDocumentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Documents.ReloadDocumentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Documents.prototype.reloadDocument = function reloadDocument(request, callback) { + return this.rpcCall(reloadDocument, $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ReloadDocument" }); - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionFeatureConfig.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.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: - message.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.decode(reader, reader.uint32()); - break; - case 3: - message.enableEventBasedSuggestion = reader.bool(); - break; - case 10: - message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.decode(reader, reader.uint32()); - break; - case 6: - message.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.decode(reader, reader.uint32()); - break; - case 7: - message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.decode(reader, reader.uint32()); - break; - case 8: - message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ReloadDocument. + * @function reloadDocument + * @memberof google.cloud.dialogflow.v2beta1.Documents + * @instance + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} request ReloadDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionFeatureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Documents; + })(); - /** - * Verifies a SuggestionFeatureConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionFeatureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) { - var error = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.verify(message.suggestionFeature); - if (error) - return "suggestionFeature." + error; - } - if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) - if (typeof message.enableEventBasedSuggestion !== "boolean") - return "enableEventBasedSuggestion: boolean expected"; - if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify(message.suggestionTriggerSettings); - if (error) - return "suggestionTriggerSettings." + error; - } - if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify(message.queryConfig); - if (error) - return "queryConfig." + error; - } - if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify(message.conversationModelConfig); - if (error) - return "conversationModelConfig." + error; - } - if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify(message.conversationProcessConfig); - if (error) - return "conversationProcessConfig." + error; - } - return null; - }; + v2beta1.Document = (function() { - /** - * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - */ - SuggestionFeatureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig(); - if (object.suggestionFeature != null) { - if (typeof object.suggestionFeature !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionFeature: object expected"); - message.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.fromObject(object.suggestionFeature); - } - if (object.enableEventBasedSuggestion != null) - message.enableEventBasedSuggestion = Boolean(object.enableEventBasedSuggestion); - if (object.suggestionTriggerSettings != null) { - if (typeof object.suggestionTriggerSettings !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionTriggerSettings: object expected"); - message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.fromObject(object.suggestionTriggerSettings); - } - if (object.queryConfig != null) { - if (typeof object.queryConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.queryConfig: object expected"); - message.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.fromObject(object.queryConfig); - } - if (object.conversationModelConfig != null) { - if (typeof object.conversationModelConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationModelConfig: object expected"); - message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.fromObject(object.conversationModelConfig); - } - if (object.conversationProcessConfig != null) { - if (typeof object.conversationProcessConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationProcessConfig: object expected"); - message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.fromObject(object.conversationProcessConfig); - } - return message; - }; + /** + * Properties of a Document. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IDocument + * @property {string|null} [name] Document name + * @property {string|null} [displayName] Document displayName + * @property {string|null} [mimeType] Document mimeType + * @property {Array.|null} [knowledgeTypes] Document knowledgeTypes + * @property {string|null} [contentUri] Document contentUri + * @property {string|null} [content] Document content + * @property {Uint8Array|null} [rawContent] Document rawContent + * @property {boolean|null} [enableAutoReload] Document enableAutoReload + * @property {google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null} [latestReloadStatus] Document latestReloadStatus + * @property {Object.|null} [metadata] Document metadata + * @property {google.cloud.dialogflow.v2beta1.Document.State|null} [state] Document state + */ - /** - * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} message SuggestionFeatureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionFeatureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableEventBasedSuggestion = false; - object.suggestionFeature = null; - object.queryConfig = null; - object.conversationModelConfig = null; - object.conversationProcessConfig = null; - object.suggestionTriggerSettings = null; - } - if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) - object.enableEventBasedSuggestion = message.enableEventBasedSuggestion; - if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) - object.suggestionFeature = $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.toObject(message.suggestionFeature, options); - if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) - object.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.toObject(message.queryConfig, options); - if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) - object.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.toObject(message.conversationModelConfig, options); - if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) - object.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.toObject(message.conversationProcessConfig, options); - if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) - object.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.toObject(message.suggestionTriggerSettings, options); - return object; - }; + /** + * Constructs a new Document. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a Document. + * @implements IDocument + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IDocument=} [properties] Properties to set + */ + function Document(properties) { + this.knowledgeTypes = []; + this.metadata = {}; + 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 SuggestionFeatureConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionFeatureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Document name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.name = ""; - return SuggestionFeatureConfig; - })(); + /** + * Document displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.displayName = ""; - HumanAgentAssistantConfig.SuggestionConfig = (function() { + /** + * Document mimeType. + * @member {string} mimeType + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.mimeType = ""; - /** - * Properties of a SuggestionConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface ISuggestionConfig - * @property {Array.|null} [featureConfigs] SuggestionConfig featureConfigs - * @property {boolean|null} [groupSuggestionResponses] SuggestionConfig groupSuggestionResponses - */ + /** + * Document knowledgeTypes. + * @member {Array.} knowledgeTypes + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.knowledgeTypes = $util.emptyArray; - /** - * Constructs a new SuggestionConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionConfig. - * @implements ISuggestionConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set - */ - function SuggestionConfig(properties) { - this.featureConfigs = []; - 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]]; - } + /** + * Document contentUri. + * @member {string|null|undefined} contentUri + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.contentUri = null; - /** - * SuggestionConfig featureConfigs. - * @member {Array.} featureConfigs - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @instance - */ - SuggestionConfig.prototype.featureConfigs = $util.emptyArray; + /** + * Document content. + * @member {string|null|undefined} content + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.content = null; - /** - * SuggestionConfig groupSuggestionResponses. - * @member {boolean} groupSuggestionResponses - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @instance - */ - SuggestionConfig.prototype.groupSuggestionResponses = false; + /** + * Document rawContent. + * @member {Uint8Array|null|undefined} rawContent + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.rawContent = null; - /** - * Creates a new SuggestionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig instance - */ - SuggestionConfig.create = function create(properties) { - return new SuggestionConfig(properties); - }; + /** + * Document enableAutoReload. + * @member {boolean} enableAutoReload + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.enableAutoReload = false; - /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.featureConfigs != null && message.featureConfigs.length) - for (var i = 0; i < message.featureConfigs.length; ++i) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.featureConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.groupSuggestionResponses != null && Object.hasOwnProperty.call(message, "groupSuggestionResponses")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.groupSuggestionResponses); - return writer; - }; + /** + * Document latestReloadStatus. + * @member {google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null|undefined} latestReloadStatus + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.latestReloadStatus = null; - /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Document metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.metadata = $util.emptyObject; - /** - * Decodes a SuggestionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.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.v2beta1.HumanAgentAssistantConfig.SuggestionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.featureConfigs && message.featureConfigs.length)) - message.featureConfigs = []; - message.featureConfigs.push($root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32())); - break; - case 3: - message.groupSuggestionResponses = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Document state. + * @member {google.cloud.dialogflow.v2beta1.Document.State} state + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Document.prototype.state = 0; - /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.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 SuggestionConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.featureConfigs != null && message.hasOwnProperty("featureConfigs")) { - if (!Array.isArray(message.featureConfigs)) - return "featureConfigs: array expected"; - for (var i = 0; i < message.featureConfigs.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.featureConfigs[i]); - if (error) - return "featureConfigs." + error; + /** + * Document source. + * @member {"contentUri"|"content"|"rawContent"|undefined} source + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + */ + Object.defineProperty(Document.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["contentUri", "content", "rawContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {google.cloud.dialogflow.v2beta1.IDocument=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Document} Document instance + */ + Document.create = function create(properties) { + return new Document(properties); + }; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {google.cloud.dialogflow.v2beta1.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.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.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.knowledgeTypes != null && message.knowledgeTypes.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.knowledgeTypes.length; ++i) + writer.int32(message.knowledgeTypes[i]); + writer.ldelim(); + } + if (message.contentUri != null && Object.hasOwnProperty.call(message, "contentUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.contentUri); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.content); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.rawContent != null && Object.hasOwnProperty.call(message, "rawContent")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.rawContent); + if (message.enableAutoReload != null && Object.hasOwnProperty.call(message, "enableAutoReload")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutoReload); + if (message.latestReloadStatus != null && Object.hasOwnProperty.call(message, "latestReloadStatus")) + $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.encode(message.latestReloadStatus, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {google.cloud.dialogflow.v2beta1.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Document message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.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.v2beta1.Document(), 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: + message.mimeType = reader.string(); + break; + case 4: + if (!(message.knowledgeTypes && message.knowledgeTypes.length)) + message.knowledgeTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.knowledgeTypes.push(reader.int32()); + } else + message.knowledgeTypes.push(reader.int32()); + break; + case 5: + message.contentUri = reader.string(); + break; + case 6: + message.content = reader.string(); + break; + case 9: + message.rawContent = reader.bytes(); + break; + case 11: + message.enableAutoReload = reader.bool(); + break; + case 12: + message.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.decode(reader, reader.uint32()); + break; + case 7: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + case 13: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; } - if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) - if (typeof message.groupSuggestionResponses !== "boolean") - return "groupSuggestionResponses: boolean expected"; - return null; - }; + } + return message; + }; - /** - * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - */ - SuggestionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig(); - if (object.featureConfigs) { - if (!Array.isArray(object.featureConfigs)) - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: array expected"); - message.featureConfigs = []; - for (var i = 0; i < object.featureConfigs.length; ++i) { - if (typeof object.featureConfigs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: object expected"); - message.featureConfigs[i] = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.featureConfigs[i]); + /** + * Decodes a Document message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Document} Document + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Document.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Document message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Document.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.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.knowledgeTypes != null && message.hasOwnProperty("knowledgeTypes")) { + if (!Array.isArray(message.knowledgeTypes)) + return "knowledgeTypes: array expected"; + for (var i = 0; i < message.knowledgeTypes.length; ++i) + switch (message.knowledgeTypes[i]) { + default: + return "knowledgeTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 4: + break; } + } + if (message.contentUri != null && message.hasOwnProperty("contentUri")) { + properties.source = 1; + if (!$util.isString(message.contentUri)) + return "contentUri: string expected"; + } + if (message.content != null && message.hasOwnProperty("content")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.content)) + return "content: string expected"; + } + if (message.rawContent != null && message.hasOwnProperty("rawContent")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!(message.rawContent && typeof message.rawContent.length === "number" || $util.isString(message.rawContent))) + return "rawContent: buffer expected"; + } + if (message.enableAutoReload != null && message.hasOwnProperty("enableAutoReload")) + if (typeof message.enableAutoReload !== "boolean") + return "enableAutoReload: boolean expected"; + if (message.latestReloadStatus != null && message.hasOwnProperty("latestReloadStatus")) { + var error = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify(message.latestReloadStatus); + if (error) + return "latestReloadStatus." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k: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: + case 4: + case 5: + break; } - if (object.groupSuggestionResponses != null) - message.groupSuggestionResponses = Boolean(object.groupSuggestionResponses); - return message; - }; + return null; + }; - /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig} message SuggestionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.featureConfigs = []; - if (options.defaults) - object.groupSuggestionResponses = false; - if (message.featureConfigs && message.featureConfigs.length) { - object.featureConfigs = []; - for (var j = 0; j < message.featureConfigs.length; ++j) - object.featureConfigs[j] = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.featureConfigs[j], options); - } - if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) - object.groupSuggestionResponses = message.groupSuggestionResponses; + /** + * Creates a Document message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Document} Document + */ + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Document) return object; - }; + var message = new $root.google.cloud.dialogflow.v2beta1.Document(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.knowledgeTypes) { + if (!Array.isArray(object.knowledgeTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Document.knowledgeTypes: array expected"); + message.knowledgeTypes = []; + for (var i = 0; i < object.knowledgeTypes.length; ++i) + switch (object.knowledgeTypes[i]) { + default: + case "KNOWLEDGE_TYPE_UNSPECIFIED": + case 0: + message.knowledgeTypes[i] = 0; + break; + case "FAQ": + case 1: + message.knowledgeTypes[i] = 1; + break; + case "EXTRACTIVE_QA": + case 2: + message.knowledgeTypes[i] = 2; + break; + case "ARTICLE_SUGGESTION": + case 3: + message.knowledgeTypes[i] = 3; + break; + case "AGENT_FACING_SMART_REPLY": + case 4: + message.knowledgeTypes[i] = 4; + break; + case "SMART_REPLY": + case 4: + message.knowledgeTypes[i] = 4; + break; + } + } + if (object.contentUri != null) + message.contentUri = String(object.contentUri); + if (object.content != null) + message.content = String(object.content); + if (object.rawContent != null) + if (typeof object.rawContent === "string") + $util.base64.decode(object.rawContent, message.rawContent = $util.newBuffer($util.base64.length(object.rawContent)), 0); + else if (object.rawContent.length) + message.rawContent = object.rawContent; + if (object.enableAutoReload != null) + message.enableAutoReload = Boolean(object.enableAutoReload); + if (object.latestReloadStatus != null) { + if (typeof object.latestReloadStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Document.latestReloadStatus: object expected"); + message.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.fromObject(object.latestReloadStatus); + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Document.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "RELOADING": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + } + return message; + }; - /** - * Converts this SuggestionConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Document + * @static + * @param {google.cloud.dialogflow.v2beta1.Document} message Document + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Document.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.knowledgeTypes = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.mimeType = ""; + object.enableAutoReload = false; + object.latestReloadStatus = 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.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.knowledgeTypes && message.knowledgeTypes.length) { + object.knowledgeTypes = []; + for (var j = 0; j < message.knowledgeTypes.length; ++j) + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; + } + if (message.contentUri != null && message.hasOwnProperty("contentUri")) { + object.contentUri = message.contentUri; + if (options.oneofs) + object.source = "contentUri"; + } + if (message.content != null && message.hasOwnProperty("content")) { + object.content = message.content; + if (options.oneofs) + object.source = "content"; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.rawContent != null && message.hasOwnProperty("rawContent")) { + object.rawContent = options.bytes === String ? $util.base64.encode(message.rawContent, 0, message.rawContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawContent) : message.rawContent; + if (options.oneofs) + object.source = "rawContent"; + } + if (message.enableAutoReload != null && message.hasOwnProperty("enableAutoReload")) + object.enableAutoReload = message.enableAutoReload; + if (message.latestReloadStatus != null && message.hasOwnProperty("latestReloadStatus")) + object.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.toObject(message.latestReloadStatus, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.State[message.state] : message.state; + return object; + }; - return SuggestionConfig; + /** + * Converts this Document to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Document + * @instance + * @returns {Object.} JSON object + */ + Document.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * KnowledgeType enum. + * @name google.cloud.dialogflow.v2beta1.Document.KnowledgeType + * @enum {number} + * @property {number} KNOWLEDGE_TYPE_UNSPECIFIED=0 KNOWLEDGE_TYPE_UNSPECIFIED value + * @property {number} FAQ=1 FAQ value + * @property {number} EXTRACTIVE_QA=2 EXTRACTIVE_QA value + * @property {number} ARTICLE_SUGGESTION=3 ARTICLE_SUGGESTION value + * @property {number} AGENT_FACING_SMART_REPLY=4 AGENT_FACING_SMART_REPLY value + * @property {number} SMART_REPLY=4 SMART_REPLY value + */ + Document.KnowledgeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KNOWLEDGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FAQ"] = 1; + values[valuesById[2] = "EXTRACTIVE_QA"] = 2; + values[valuesById[3] = "ARTICLE_SUGGESTION"] = 3; + values[valuesById[4] = "AGENT_FACING_SMART_REPLY"] = 4; + values["SMART_REPLY"] = 4; + return values; })(); - HumanAgentAssistantConfig.SuggestionQueryConfig = (function() { + Document.ReloadStatus = (function() { /** - * Properties of a SuggestionQueryConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface ISuggestionQueryConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null} [knowledgeBaseQuerySource] SuggestionQueryConfig knowledgeBaseQuerySource - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null} [documentQuerySource] SuggestionQueryConfig documentQuerySource - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null} [dialogflowQuerySource] SuggestionQueryConfig dialogflowQuerySource - * @property {number|null} [maxResults] SuggestionQueryConfig maxResults - * @property {number|null} [confidenceThreshold] SuggestionQueryConfig confidenceThreshold - * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null} [contextFilterSettings] SuggestionQueryConfig contextFilterSettings + * Properties of a ReloadStatus. + * @memberof google.cloud.dialogflow.v2beta1.Document + * @interface IReloadStatus + * @property {google.protobuf.ITimestamp|null} [time] ReloadStatus time + * @property {google.rpc.IStatus|null} [status] ReloadStatus status */ /** - * Constructs a new SuggestionQueryConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionQueryConfig. - * @implements ISuggestionQueryConfig + * Constructs a new ReloadStatus. + * @memberof google.cloud.dialogflow.v2beta1.Document + * @classdesc Represents a ReloadStatus. + * @implements IReloadStatus * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus=} [properties] Properties to set */ - function SuggestionQueryConfig(properties) { + function ReloadStatus(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -129878,154 +131716,88 @@ } /** - * SuggestionQueryConfig knowledgeBaseQuerySource. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null|undefined} knowledgeBaseQuerySource - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.knowledgeBaseQuerySource = null; - - /** - * SuggestionQueryConfig documentQuerySource. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null|undefined} documentQuerySource - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.documentQuerySource = null; - - /** - * SuggestionQueryConfig dialogflowQuerySource. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null|undefined} dialogflowQuerySource - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.dialogflowQuerySource = null; - - /** - * SuggestionQueryConfig maxResults. - * @member {number} maxResults - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.maxResults = 0; - - /** - * SuggestionQueryConfig confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.confidenceThreshold = 0; - - /** - * SuggestionQueryConfig contextFilterSettings. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null|undefined} contextFilterSettings - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * ReloadStatus time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @instance */ - SuggestionQueryConfig.prototype.contextFilterSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ReloadStatus.prototype.time = null; /** - * SuggestionQueryConfig querySource. - * @member {"knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"|undefined} querySource - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * ReloadStatus status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @instance */ - Object.defineProperty(SuggestionQueryConfig.prototype, "querySource", { - get: $util.oneOfGetter($oneOfFields = ["knowledgeBaseQuerySource", "documentQuerySource", "dialogflowQuerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ReloadStatus.prototype.status = null; /** - * Creates a new SuggestionQueryConfig instance using the specified properties. + * Creates a new ReloadStatus instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig instance + * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus instance */ - SuggestionQueryConfig.create = function create(properties) { - return new SuggestionQueryConfig(properties); + ReloadStatus.create = function create(properties) { + return new ReloadStatus(properties); }; /** - * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * Encodes the specified ReloadStatus message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus} message ReloadStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionQueryConfig.encode = function encode(message, writer) { + ReloadStatus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.knowledgeBaseQuerySource != null && Object.hasOwnProperty.call(message, "knowledgeBaseQuerySource")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.encode(message.knowledgeBaseQuerySource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.documentQuerySource != null && Object.hasOwnProperty.call(message, "documentQuerySource")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.encode(message.documentQuerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dialogflowQuerySource != null && Object.hasOwnProperty.call(message, "dialogflowQuerySource")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.encode(message.dialogflowQuerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxResults); - if (message.confidenceThreshold != null && Object.hasOwnProperty.call(message, "confidenceThreshold")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidenceThreshold); - if (message.contextFilterSettings != null && Object.hasOwnProperty.call(message, "contextFilterSettings")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.encode(message.contextFilterSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * Encodes the specified ReloadStatus message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus} message ReloadStatus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionQueryConfig.encodeDelimited = function encodeDelimited(message, writer) { + ReloadStatus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * Decodes a ReloadStatus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionQueryConfig.decode = function decode(reader, length) { + ReloadStatus.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.decode(reader, reader.uint32()); + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.decode(reader, reader.uint32()); - break; - case 3: - message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.decode(reader, reader.uint32()); - break; - case 4: - message.maxResults = reader.int32(); - break; - case 5: - message.confidenceThreshold = reader.float(); - break; - case 7: - message.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.decode(reader, reader.uint32()); + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -130036,1601 +131808,1672 @@ }; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * Decodes a ReloadStatus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionQueryConfig.decodeDelimited = function decodeDelimited(reader) { + ReloadStatus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionQueryConfig message. + * Verifies a ReloadStatus message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionQueryConfig.verify = function verify(message) { + ReloadStatus.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify(message.knowledgeBaseQuerySource); - if (error) - return "knowledgeBaseQuerySource." + error; - } - } - if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { - if (properties.querySource === 1) - return "querySource: multiple values"; - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify(message.documentQuerySource); - if (error) - return "documentQuerySource." + error; - } - } - if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { - if (properties.querySource === 1) - return "querySource: multiple values"; - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify(message.dialogflowQuerySource); - if (error) - return "dialogflowQuerySource." + error; - } + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; } - if (message.maxResults != null && message.hasOwnProperty("maxResults")) - if (!$util.isInteger(message.maxResults)) - return "maxResults: integer expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify(message.contextFilterSettings); + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); if (error) - return "contextFilterSettings." + error; + return "status." + error; } return null; }; /** - * Creates a SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadStatus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus */ - SuggestionQueryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig) + ReloadStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig(); - if (object.knowledgeBaseQuerySource != null) { - if (typeof object.knowledgeBaseQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.knowledgeBaseQuerySource: object expected"); - message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.fromObject(object.knowledgeBaseQuerySource); - } - if (object.documentQuerySource != null) { - if (typeof object.documentQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.documentQuerySource: object expected"); - message.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.fromObject(object.documentQuerySource); - } - if (object.dialogflowQuerySource != null) { - if (typeof object.dialogflowQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.dialogflowQuerySource: object expected"); - message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.fromObject(object.dialogflowQuerySource); + var message = new $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Document.ReloadStatus.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); } - if (object.maxResults != null) - message.maxResults = object.maxResults | 0; - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.contextFilterSettings != null) { - if (typeof object.contextFilterSettings !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.contextFilterSettings: object expected"); - message.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.fromObject(object.contextFilterSettings); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Document.ReloadStatus.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); } return message; }; /** - * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. + * Creates a plain object from a ReloadStatus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig} message SuggestionQueryConfig + * @param {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} message ReloadStatus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionQueryConfig.toObject = function toObject(message, options) { + ReloadStatus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.maxResults = 0; - object.confidenceThreshold = 0; - object.contextFilterSettings = null; - } - if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { - object.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.toObject(message.knowledgeBaseQuerySource, options); - if (options.oneofs) - object.querySource = "knowledgeBaseQuerySource"; - } - if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { - object.documentQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.toObject(message.documentQuerySource, options); - if (options.oneofs) - object.querySource = "documentQuerySource"; - } - if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { - object.dialogflowQuerySource = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.toObject(message.dialogflowQuerySource, options); - if (options.oneofs) - object.querySource = "dialogflowQuerySource"; + object.time = null; + object.status = null; } - if (message.maxResults != null && message.hasOwnProperty("maxResults")) - object.maxResults = message.maxResults; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) - object.contextFilterSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.toObject(message.contextFilterSettings, options); + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); return object; }; /** - * Converts this SuggestionQueryConfig to JSON. + * Converts this ReloadStatus to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus * @instance * @returns {Object.} JSON object */ - SuggestionQueryConfig.prototype.toJSON = function toJSON() { + ReloadStatus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SuggestionQueryConfig.KnowledgeBaseQuerySource = (function() { - - /** - * Properties of a KnowledgeBaseQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IKnowledgeBaseQuerySource - * @property {Array.|null} [knowledgeBases] KnowledgeBaseQuerySource knowledgeBases - */ - - /** - * Constructs a new KnowledgeBaseQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a KnowledgeBaseQuerySource. - * @implements IKnowledgeBaseQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set - */ - function KnowledgeBaseQuerySource(properties) { - this.knowledgeBases = []; - 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]]; - } - - /** - * KnowledgeBaseQuerySource knowledgeBases. - * @member {Array.} knowledgeBases - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @instance - */ - KnowledgeBaseQuerySource.prototype.knowledgeBases = $util.emptyArray; - - /** - * Creates a new KnowledgeBaseQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource instance - */ - KnowledgeBaseQuerySource.create = function create(properties) { - return new KnowledgeBaseQuerySource(properties); - }; - - /** - * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBaseQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.knowledgeBases != null && message.knowledgeBases.length) - for (var i = 0; i < message.knowledgeBases.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.knowledgeBases[i]); - return writer; - }; - - /** - * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBaseQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ReloadStatus; + })(); - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBaseQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.knowledgeBases && message.knowledgeBases.length)) - message.knowledgeBases = []; - message.knowledgeBases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * State enum. + * @name google.cloud.dialogflow.v2beta1.Document.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} UPDATING=3 UPDATING value + * @property {number} RELOADING=4 RELOADING value + * @property {number} DELETING=5 DELETING value + */ + Document.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "RELOADING"] = 4; + values[valuesById[5] = "DELETING"] = 5; + return values; + })(); - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBaseQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Document; + })(); - /** - * Verifies a KnowledgeBaseQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeBaseQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.knowledgeBases != null && message.hasOwnProperty("knowledgeBases")) { - if (!Array.isArray(message.knowledgeBases)) - return "knowledgeBases: array expected"; - for (var i = 0; i < message.knowledgeBases.length; ++i) - if (!$util.isString(message.knowledgeBases[i])) - return "knowledgeBases: string[] expected"; - } - return null; - }; + v2beta1.GetDocumentRequest = (function() { - /** - * Creates a KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - */ - KnowledgeBaseQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); - if (object.knowledgeBases) { - if (!Array.isArray(object.knowledgeBases)) - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.knowledgeBases: array expected"); - message.knowledgeBases = []; - for (var i = 0; i < object.knowledgeBases.length; ++i) - message.knowledgeBases[i] = String(object.knowledgeBases[i]); - } - return message; - }; + /** + * Properties of a GetDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGetDocumentRequest + * @property {string|null} [name] GetDocumentRequest name + */ - /** - * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} message KnowledgeBaseQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeBaseQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.knowledgeBases = []; - if (message.knowledgeBases && message.knowledgeBases.length) { - object.knowledgeBases = []; - for (var j = 0; j < message.knowledgeBases.length; ++j) - object.knowledgeBases[j] = message.knowledgeBases[j]; - } - return object; - }; + /** + * Constructs a new GetDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GetDocumentRequest. + * @implements IGetDocumentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest=} [properties] Properties to set + */ + function GetDocumentRequest(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 KnowledgeBaseQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @instance - * @returns {Object.} JSON object - */ - KnowledgeBaseQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * GetDocumentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.name = ""; - return KnowledgeBaseQuerySource; - })(); + /** + * Creates a new GetDocumentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest instance + */ + GetDocumentRequest.create = function create(properties) { + return new GetDocumentRequest(properties); + }; - SuggestionQueryConfig.DocumentQuerySource = (function() { + /** + * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentRequest.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; + }; - /** - * Properties of a DocumentQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IDocumentQuerySource - * @property {Array.|null} [documents] DocumentQuerySource documents - */ + /** + * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new DocumentQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a DocumentQuerySource. - * @implements IDocumentQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set - */ - function DocumentQuerySource(properties) { - this.documents = []; - 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]]; + /** + * Decodes a GetDocumentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentRequest.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.v2beta1.GetDocumentRequest(); + 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; + }; - /** - * DocumentQuerySource documents. - * @member {Array.} documents - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @instance - */ - DocumentQuerySource.prototype.documents = $util.emptyArray; - - /** - * Creates a new DocumentQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource instance - */ - DocumentQuerySource.create = function create(properties) { - return new DocumentQuerySource(properties); - }; + /** + * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.documents[i]); - return writer; - }; + /** + * Verifies a GetDocumentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDocumentRequest.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; + }; - /** - * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest + */ + GetDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.GetDocumentRequest} message GetDocumentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentRequest.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; + }; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this GetDocumentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a DocumentQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DocumentQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) - if (!$util.isString(message.documents[i])) - return "documents: string[] expected"; - } - return null; - }; + return GetDocumentRequest; + })(); - /** - * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - */ - DocumentQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) - message.documents[i] = String(object.documents[i]); - } - return message; - }; + v2beta1.ListDocumentsRequest = (function() { - /** - * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} message DocumentQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = message.documents[j]; - } - return object; - }; + /** + * Properties of a ListDocumentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListDocumentsRequest + * @property {string|null} [parent] ListDocumentsRequest parent + * @property {number|null} [pageSize] ListDocumentsRequest pageSize + * @property {string|null} [pageToken] ListDocumentsRequest pageToken + * @property {string|null} [filter] ListDocumentsRequest filter + */ - /** - * Converts this DocumentQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @instance - * @returns {Object.} JSON object - */ - DocumentQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new ListDocumentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListDocumentsRequest. + * @implements IListDocumentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest=} [properties] Properties to set + */ + function ListDocumentsRequest(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 DocumentQuerySource; - })(); + /** + * ListDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.parent = ""; - SuggestionQueryConfig.DialogflowQuerySource = (function() { + /** + * ListDocumentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.pageSize = 0; - /** - * Properties of a DialogflowQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IDialogflowQuerySource - * @property {string|null} [agent] DialogflowQuerySource agent - */ + /** + * ListDocumentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.pageToken = ""; - /** - * Constructs a new DialogflowQuerySource. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a DialogflowQuerySource. - * @implements IDialogflowQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set - */ - function DialogflowQuerySource(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]]; + /** + * ListDocumentsRequest filter. + * @member {string} filter + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.filter = ""; + + /** + * Creates a new ListDocumentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest instance + */ + ListDocumentsRequest.create = function create(properties) { + return new ListDocumentsRequest(properties); + }; + + /** + * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDocumentsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDocumentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDocumentsRequest.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.v2beta1.ListDocumentsRequest(); + 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.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * DialogflowQuerySource agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @instance - */ - DialogflowQuerySource.prototype.agent = ""; + /** + * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new DialogflowQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource instance - */ - DialogflowQuerySource.create = function create(properties) { - return new DialogflowQuerySource(properties); - }; + /** + * Verifies a ListDocumentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDocumentsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); - return writer; - }; + /** + * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest + */ + ListDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest(); + 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.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} message ListDocumentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDocumentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowQuerySource.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.agent = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this ListDocumentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return ListDocumentsRequest; + })(); - /** - * Verifies a DialogflowQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DialogflowQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; - return null; - }; + v2beta1.ListDocumentsResponse = (function() { - /** - * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - */ - DialogflowQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); - if (object.agent != null) - message.agent = String(object.agent); - return message; - }; + /** + * Properties of a ListDocumentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListDocumentsResponse + * @property {Array.|null} [documents] ListDocumentsResponse documents + * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken + */ + + /** + * Constructs a new ListDocumentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListDocumentsResponse. + * @implements IListDocumentsResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse=} [properties] Properties to set + */ + function ListDocumentsResponse(properties) { + this.documents = []; + 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 DialogflowQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} message DialogflowQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DialogflowQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.agent = ""; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; - return object; - }; + /** + * ListDocumentsResponse documents. + * @member {Array.} documents + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @instance + */ + ListDocumentsResponse.prototype.documents = $util.emptyArray; - /** - * Converts this DialogflowQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @instance - * @returns {Object.} JSON object - */ - DialogflowQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListDocumentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @instance + */ + ListDocumentsResponse.prototype.nextPageToken = ""; - return DialogflowQuerySource; - })(); + /** + * Creates a new ListDocumentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse instance + */ + ListDocumentsResponse.create = function create(properties) { + return new ListDocumentsResponse(properties); + }; - SuggestionQueryConfig.ContextFilterSettings = (function() { + /** + * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDocumentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Document.encode(message.documents[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; + }; - /** - * Properties of a ContextFilterSettings. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IContextFilterSettings - * @property {boolean|null} [dropHandoffMessages] ContextFilterSettings dropHandoffMessages - * @property {boolean|null} [dropVirtualAgentMessages] ContextFilterSettings dropVirtualAgentMessages - * @property {boolean|null} [dropIvrMessages] ContextFilterSettings dropIvrMessages - */ + /** + * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new ContextFilterSettings. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a ContextFilterSettings. - * @implements IContextFilterSettings - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set - */ - function ContextFilterSettings(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]]; + /** + * Decodes a ListDocumentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDocumentsResponse.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.v2beta1.ListDocumentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.dialogflow.v2beta1.Document.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ContextFilterSettings dropHandoffMessages. - * @member {boolean} dropHandoffMessages - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropHandoffMessages = false; + /** + * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ContextFilterSettings dropVirtualAgentMessages. - * @member {boolean} dropVirtualAgentMessages - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropVirtualAgentMessages = false; + /** + * Verifies a ListDocumentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDocumentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * ContextFilterSettings dropIvrMessages. - * @member {boolean} dropIvrMessages - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropIvrMessages = false; + /** + * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse + */ + ListDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ListDocumentsResponse.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ListDocumentsResponse.documents: object expected"); + message.documents[i] = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.documents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a new ContextFilterSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings instance - */ - ContextFilterSettings.create = function create(properties) { - return new ContextFilterSettings(properties); - }; + /** + * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} message ListDocumentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDocumentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.documents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextFilterSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dropHandoffMessages != null && Object.hasOwnProperty.call(message, "dropHandoffMessages")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.dropHandoffMessages); - if (message.dropVirtualAgentMessages != null && Object.hasOwnProperty.call(message, "dropVirtualAgentMessages")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dropVirtualAgentMessages); - if (message.dropIvrMessages != null && Object.hasOwnProperty.call(message, "dropIvrMessages")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dropIvrMessages); - return writer; - }; + /** + * Converts this ListDocumentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDocumentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextFilterSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ListDocumentsResponse; + })(); - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextFilterSettings.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.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.dropHandoffMessages = reader.bool(); - break; - case 2: - message.dropVirtualAgentMessages = reader.bool(); - break; - case 3: - message.dropIvrMessages = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v2beta1.CreateDocumentRequest = (function() { - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextFilterSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a CreateDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ICreateDocumentRequest + * @property {string|null} [parent] CreateDocumentRequest parent + * @property {google.cloud.dialogflow.v2beta1.IDocument|null} [document] CreateDocumentRequest document + * @property {boolean|null} [importGcsCustomMetadata] CreateDocumentRequest importGcsCustomMetadata + */ - /** - * Verifies a ContextFilterSettings message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContextFilterSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) - if (typeof message.dropHandoffMessages !== "boolean") - return "dropHandoffMessages: boolean expected"; - if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) - if (typeof message.dropVirtualAgentMessages !== "boolean") - return "dropVirtualAgentMessages: boolean expected"; - if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) - if (typeof message.dropIvrMessages !== "boolean") - return "dropIvrMessages: boolean expected"; - return null; - }; + /** + * Constructs a new CreateDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CreateDocumentRequest. + * @implements ICreateDocumentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest=} [properties] Properties to set + */ + function CreateDocumentRequest(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 ContextFilterSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - */ - ContextFilterSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); - if (object.dropHandoffMessages != null) - message.dropHandoffMessages = Boolean(object.dropHandoffMessages); - if (object.dropVirtualAgentMessages != null) - message.dropVirtualAgentMessages = Boolean(object.dropVirtualAgentMessages); - if (object.dropIvrMessages != null) - message.dropIvrMessages = Boolean(object.dropIvrMessages); - return message; - }; + /** + * CreateDocumentRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @instance + */ + CreateDocumentRequest.prototype.parent = ""; - /** - * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} message ContextFilterSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContextFilterSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dropHandoffMessages = false; - object.dropVirtualAgentMessages = false; - object.dropIvrMessages = false; - } - if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) - object.dropHandoffMessages = message.dropHandoffMessages; - if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) - object.dropVirtualAgentMessages = message.dropVirtualAgentMessages; - if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) - object.dropIvrMessages = message.dropIvrMessages; - return object; - }; + /** + * CreateDocumentRequest document. + * @member {google.cloud.dialogflow.v2beta1.IDocument|null|undefined} document + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @instance + */ + CreateDocumentRequest.prototype.document = null; - /** - * Converts this ContextFilterSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - * @returns {Object.} JSON object - */ - ContextFilterSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateDocumentRequest importGcsCustomMetadata. + * @member {boolean} importGcsCustomMetadata + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @instance + */ + CreateDocumentRequest.prototype.importGcsCustomMetadata = false; + + /** + * Creates a new CreateDocumentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest instance + */ + CreateDocumentRequest.create = function create(properties) { + return new CreateDocumentRequest(properties); + }; + + /** + * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDocumentRequest.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.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.dialogflow.v2beta1.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.importGcsCustomMetadata); + return writer; + }; - return ContextFilterSettings; - })(); + /** + * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return SuggestionQueryConfig; - })(); + /** + * Decodes a CreateDocumentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDocumentRequest.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.v2beta1.CreateDocumentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.document = $root.google.cloud.dialogflow.v2beta1.Document.decode(reader, reader.uint32()); + break; + case 3: + message.importGcsCustomMetadata = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - HumanAgentAssistantConfig.ConversationModelConfig = (function() { + /** + * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ConversationModelConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface IConversationModelConfig - * @property {string|null} [model] ConversationModelConfig model - */ + /** + * Verifies a CreateDocumentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDocumentRequest.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.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + if (typeof message.importGcsCustomMetadata !== "boolean") + return "importGcsCustomMetadata: boolean expected"; + return null; + }; - /** - * Constructs a new ConversationModelConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a ConversationModelConfig. - * @implements IConversationModelConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set - */ - function ConversationModelConfig(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 CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest + */ + CreateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateDocumentRequest.document: object expected"); + message.document = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.document); } + if (object.importGcsCustomMetadata != null) + message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); + return message; + }; - /** - * ConversationModelConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @instance - */ - ConversationModelConfig.prototype.model = ""; + /** + * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} message CreateDocumentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDocumentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.document = null; + object.importGcsCustomMetadata = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.document, options); + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + object.importGcsCustomMetadata = message.importGcsCustomMetadata; + return object; + }; - /** - * Creates a new ConversationModelConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig instance - */ - ConversationModelConfig.create = function create(properties) { - return new ConversationModelConfig(properties); - }; + /** + * Converts this CreateDocumentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDocumentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); - return writer; - }; + return CreateDocumentRequest; + })(); - /** - * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v2beta1.ImportDocumentsRequest = (function() { - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelConfig.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.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.model = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of an ImportDocumentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IImportDocumentsRequest + * @property {string|null} [parent] ImportDocumentsRequest parent + * @property {google.cloud.dialogflow.v2beta1.IGcsSources|null} [gcsSource] ImportDocumentsRequest gcsSource + * @property {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null} [documentTemplate] ImportDocumentsRequest documentTemplate + * @property {boolean|null} [importGcsCustomMetadata] ImportDocumentsRequest importGcsCustomMetadata + */ - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Constructs a new ImportDocumentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an ImportDocumentsRequest. + * @implements IImportDocumentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest=} [properties] Properties to set + */ + function ImportDocumentsRequest(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 ConversationModelConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationModelConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - return null; - }; + /** + * ImportDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.parent = ""; - /** - * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - */ - ConversationModelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig(); - if (object.model != null) - message.model = String(object.model); - return message; - }; + /** + * ImportDocumentsRequest gcsSource. + * @member {google.cloud.dialogflow.v2beta1.IGcsSources|null|undefined} gcsSource + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.gcsSource = null; - /** - * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig} message ConversationModelConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationModelConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.model = ""; - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; - return object; - }; + /** + * ImportDocumentsRequest documentTemplate. + * @member {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null|undefined} documentTemplate + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.documentTemplate = null; - /** - * Converts this ConversationModelConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig - * @instance - * @returns {Object.} JSON object - */ - ConversationModelConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ImportDocumentsRequest importGcsCustomMetadata. + * @member {boolean} importGcsCustomMetadata + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.importGcsCustomMetadata = false; - return ConversationModelConfig; - })(); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - HumanAgentAssistantConfig.ConversationProcessConfig = (function() { + /** + * ImportDocumentsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + */ + Object.defineProperty(ImportDocumentsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of a ConversationProcessConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface IConversationProcessConfig - * @property {number|null} [recentSentencesCount] ConversationProcessConfig recentSentencesCount - */ + /** + * Creates a new ImportDocumentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest instance + */ + ImportDocumentsRequest.create = function create(properties) { + return new ImportDocumentsRequest(properties); + }; - /** - * Constructs a new ConversationProcessConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a ConversationProcessConfig. - * @implements IConversationProcessConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set - */ - function ConversationProcessConfig(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 ImportDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentsRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.dialogflow.v2beta1.GcsSources.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.documentTemplate != null && Object.hasOwnProperty.call(message, "documentTemplate")) + $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.encode(message.documentTemplate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.importGcsCustomMetadata); + return writer; + }; + + /** + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentsRequest.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.v2beta1.ImportDocumentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.decode(reader, reader.uint32()); + break; + case 3: + message.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.decode(reader, reader.uint32()); + break; + case 4: + message.importGcsCustomMetadata = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * ConversationProcessConfig recentSentencesCount. - * @member {number} recentSentencesCount - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @instance - */ - ConversationProcessConfig.prototype.recentSentencesCount = 0; + /** + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new ConversationProcessConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig instance - */ - ConversationProcessConfig.create = function create(properties) { - return new ConversationProcessConfig(properties); - }; + /** + * Verifies an ImportDocumentsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportDocumentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.GcsSources.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.documentTemplate != null && message.hasOwnProperty("documentTemplate")) { + var error = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify(message.documentTemplate); + if (error) + return "documentTemplate." + error; + } + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + if (typeof message.importGcsCustomMetadata !== "boolean") + return "importGcsCustomMetadata: boolean expected"; + return null; + }; - /** - * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationProcessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recentSentencesCount != null && Object.hasOwnProperty.call(message, "recentSentencesCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.recentSentencesCount); - return writer; - }; + /** + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + */ + ImportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.fromObject(object.gcsSource); + } + if (object.documentTemplate != null) { + if (typeof object.documentTemplate !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.documentTemplate: object expected"); + message.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.fromObject(object.documentTemplate); + } + if (object.importGcsCustomMetadata != null) + message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); + return message; + }; - /** - * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationProcessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportDocumentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.documentTemplate = null; + object.importGcsCustomMetadata = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.documentTemplate != null && message.hasOwnProperty("documentTemplate")) + object.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.toObject(message.documentTemplate, options); + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + object.importGcsCustomMetadata = message.importGcsCustomMetadata; + return object; + }; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationProcessConfig.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.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.recentSentencesCount = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Converts this ImportDocumentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationProcessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return ImportDocumentsRequest; + })(); - /** - * Verifies a ConversationProcessConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationProcessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) - if (!$util.isInteger(message.recentSentencesCount)) - return "recentSentencesCount: integer expected"; - return null; - }; + v2beta1.ImportDocumentTemplate = (function() { - /** - * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - */ - ConversationProcessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); - if (object.recentSentencesCount != null) - message.recentSentencesCount = object.recentSentencesCount | 0; - return message; - }; + /** + * Properties of an ImportDocumentTemplate. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IImportDocumentTemplate + * @property {string|null} [mimeType] ImportDocumentTemplate mimeType + * @property {Array.|null} [knowledgeTypes] ImportDocumentTemplate knowledgeTypes + * @property {Object.|null} [metadata] ImportDocumentTemplate metadata + */ - /** - * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} message ConversationProcessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationProcessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.recentSentencesCount = 0; - if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) - object.recentSentencesCount = message.recentSentencesCount; - return object; - }; + /** + * Constructs a new ImportDocumentTemplate. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents an ImportDocumentTemplate. + * @implements IImportDocumentTemplate + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate=} [properties] Properties to set + */ + function ImportDocumentTemplate(properties) { + this.knowledgeTypes = []; + this.metadata = {}; + 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 ConversationProcessConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig - * @instance - * @returns {Object.} JSON object - */ - ConversationProcessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ImportDocumentTemplate mimeType. + * @member {string} mimeType + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @instance + */ + ImportDocumentTemplate.prototype.mimeType = ""; - return ConversationProcessConfig; - })(); + /** + * ImportDocumentTemplate knowledgeTypes. + * @member {Array.} knowledgeTypes + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @instance + */ + ImportDocumentTemplate.prototype.knowledgeTypes = $util.emptyArray; - HumanAgentAssistantConfig.MessageAnalysisConfig = (function() { + /** + * ImportDocumentTemplate metadata. + * @member {Object.} metadata + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @instance + */ + ImportDocumentTemplate.prototype.metadata = $util.emptyObject; - /** - * Properties of a MessageAnalysisConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @interface IMessageAnalysisConfig - * @property {boolean|null} [enableEntityExtraction] MessageAnalysisConfig enableEntityExtraction - * @property {boolean|null} [enableSentimentAnalysis] MessageAnalysisConfig enableSentimentAnalysis - */ + /** + * Creates a new ImportDocumentTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate instance + */ + ImportDocumentTemplate.create = function create(properties) { + return new ImportDocumentTemplate(properties); + }; - /** - * Constructs a new MessageAnalysisConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig - * @classdesc Represents a MessageAnalysisConfig. - * @implements IMessageAnalysisConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set - */ - function MessageAnalysisConfig(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 ImportDocumentTemplate message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate} message ImportDocumentTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.knowledgeTypes != null && message.knowledgeTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.knowledgeTypes.length; ++i) + writer.int32(message.knowledgeTypes[i]); + writer.ldelim(); } + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + return writer; + }; - /** - * MessageAnalysisConfig enableEntityExtraction. - * @member {boolean} enableEntityExtraction - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - */ - MessageAnalysisConfig.prototype.enableEntityExtraction = false; - - /** - * MessageAnalysisConfig enableSentimentAnalysis. - * @member {boolean} enableSentimentAnalysis - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - */ - MessageAnalysisConfig.prototype.enableSentimentAnalysis = false; + /** + * Encodes the specified ImportDocumentTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate} message ImportDocumentTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new MessageAnalysisConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig instance - */ - MessageAnalysisConfig.create = function create(properties) { - return new MessageAnalysisConfig(properties); - }; + /** + * Decodes an ImportDocumentTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentTemplate.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.v2beta1.ImportDocumentTemplate(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mimeType = reader.string(); + break; + case 2: + if (!(message.knowledgeTypes && message.knowledgeTypes.length)) + message.knowledgeTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.knowledgeTypes.push(reader.int32()); + } else + message.knowledgeTypes.push(reader.int32()); + break; + case 3: + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAnalysisConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableEntityExtraction != null && Object.hasOwnProperty.call(message, "enableEntityExtraction")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableEntityExtraction); - if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSentimentAnalysis); - return writer; - }; + /** + * Decodes an ImportDocumentTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an ImportDocumentTemplate message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportDocumentTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.knowledgeTypes != null && message.hasOwnProperty("knowledgeTypes")) { + if (!Array.isArray(message.knowledgeTypes)) + return "knowledgeTypes: array expected"; + for (var i = 0; i < message.knowledgeTypes.length; ++i) + switch (message.knowledgeTypes[i]) { + default: + return "knowledgeTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 4: + break; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + return null; + }; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAnalysisConfig.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.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + /** + * Creates an ImportDocumentTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + */ + ImportDocumentTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.knowledgeTypes) { + if (!Array.isArray(object.knowledgeTypes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.knowledgeTypes: array expected"); + message.knowledgeTypes = []; + for (var i = 0; i < object.knowledgeTypes.length; ++i) + switch (object.knowledgeTypes[i]) { + default: + case "KNOWLEDGE_TYPE_UNSPECIFIED": + case 0: + message.knowledgeTypes[i] = 0; + break; + case "FAQ": + case 1: + message.knowledgeTypes[i] = 1; + break; + case "EXTRACTIVE_QA": case 2: - message.enableEntityExtraction = reader.bool(); + message.knowledgeTypes[i] = 2; break; + case "ARTICLE_SUGGESTION": case 3: - message.enableSentimentAnalysis = reader.bool(); + message.knowledgeTypes[i] = 3; break; - default: - reader.skipType(tag & 7); + case "AGENT_FACING_SMART_REPLY": + case 4: + message.knowledgeTypes[i] = 4; + break; + case "SMART_REPLY": + case 4: + message.knowledgeTypes[i] = 4; break; } - } - return message; - }; - - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAnalysisConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageAnalysisConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageAnalysisConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) - if (typeof message.enableEntityExtraction !== "boolean") - return "enableEntityExtraction: boolean expected"; - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - if (typeof message.enableSentimentAnalysis !== "boolean") - return "enableSentimentAnalysis: boolean expected"; - return null; - }; - - /** - * Creates a MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - */ - MessageAnalysisConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig(); - if (object.enableEntityExtraction != null) - message.enableEntityExtraction = Boolean(object.enableEntityExtraction); - if (object.enableSentimentAnalysis != null) - message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); - return message; - }; - - /** - * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig} message MessageAnalysisConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageAnalysisConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableEntityExtraction = false; - object.enableSentimentAnalysis = false; - } - if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) - object.enableEntityExtraction = message.enableEntityExtraction; - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - object.enableSentimentAnalysis = message.enableSentimentAnalysis; - return object; - }; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + return message; + }; - /** - * Converts this MessageAnalysisConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - * @returns {Object.} JSON object - */ - MessageAnalysisConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ImportDocumentTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @static + * @param {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} message ImportDocumentTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportDocumentTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.knowledgeTypes = []; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) + object.mimeType = ""; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.knowledgeTypes && message.knowledgeTypes.length) { + object.knowledgeTypes = []; + for (var j = 0; j < message.knowledgeTypes.length; ++j) + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; + } + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + return object; + }; - return MessageAnalysisConfig; - })(); + /** + * Converts this ImportDocumentTemplate to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return HumanAgentAssistantConfig; + return ImportDocumentTemplate; })(); - v2beta1.HumanAgentHandoffConfig = (function() { + v2beta1.ImportDocumentsResponse = (function() { /** - * Properties of a HumanAgentHandoffConfig. + * Properties of an ImportDocumentsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IHumanAgentHandoffConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null} [livePersonConfig] HumanAgentHandoffConfig livePersonConfig - * @property {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null} [salesforceLiveAgentConfig] HumanAgentHandoffConfig salesforceLiveAgentConfig + * @interface IImportDocumentsResponse + * @property {Array.|null} [warnings] ImportDocumentsResponse warnings */ /** - * Constructs a new HumanAgentHandoffConfig. + * Constructs a new ImportDocumentsResponse. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a HumanAgentHandoffConfig. - * @implements IHumanAgentHandoffConfig + * @classdesc Represents an ImportDocumentsResponse. + * @implements IImportDocumentsResponse * @constructor - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse=} [properties] Properties to set */ - function HumanAgentHandoffConfig(properties) { + function ImportDocumentsResponse(properties) { + this.warnings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -131638,102 +133481,282 @@ } /** - * HumanAgentHandoffConfig livePersonConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig|null|undefined} livePersonConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * ImportDocumentsResponse warnings. + * @member {Array.} warnings + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse * @instance */ - HumanAgentHandoffConfig.prototype.livePersonConfig = null; + ImportDocumentsResponse.prototype.warnings = $util.emptyArray; /** - * HumanAgentHandoffConfig salesforceLiveAgentConfig. - * @member {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null|undefined} salesforceLiveAgentConfig - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * Creates a new ImportDocumentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse instance + */ + ImportDocumentsResponse.create = function create(properties) { + return new ImportDocumentsResponse(properties); + }; + + /** + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + $root.google.rpc.Status.encode(message.warnings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentsResponse.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.v2beta1.ImportDocumentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportDocumentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportDocumentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.warnings != null && message.hasOwnProperty("warnings")) { + if (!Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) { + var error = $root.google.rpc.Status.verify(message.warnings[i]); + if (error) + return "warnings." + error; + } + } + return null; + }; + + /** + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse + */ + ImportDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentsResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentsResponse(); + if (object.warnings) { + if (!Array.isArray(object.warnings)) + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.warnings: array expected"); + message.warnings = []; + for (var i = 0; i < object.warnings.length; ++i) { + if (typeof object.warnings[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.warnings: object expected"); + message.warnings[i] = $root.google.rpc.Status.fromObject(object.warnings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} message ImportDocumentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportDocumentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.warnings = []; + if (message.warnings && message.warnings.length) { + object.warnings = []; + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = $root.google.rpc.Status.toObject(message.warnings[j], options); + } + return object; + }; + + /** + * Converts this ImportDocumentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse * @instance + * @returns {Object.} JSON object */ - HumanAgentHandoffConfig.prototype.salesforceLiveAgentConfig = null; + ImportDocumentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return ImportDocumentsResponse; + })(); + + v2beta1.DeleteDocumentRequest = (function() { /** - * HumanAgentHandoffConfig agentService. - * @member {"livePersonConfig"|"salesforceLiveAgentConfig"|undefined} agentService - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * Properties of a DeleteDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IDeleteDocumentRequest + * @property {string|null} [name] DeleteDocumentRequest name + */ + + /** + * Constructs a new DeleteDocumentRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a DeleteDocumentRequest. + * @implements IDeleteDocumentRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest=} [properties] Properties to set + */ + function DeleteDocumentRequest(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]]; + } + + /** + * DeleteDocumentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @instance */ - Object.defineProperty(HumanAgentHandoffConfig.prototype, "agentService", { - get: $util.oneOfGetter($oneOfFields = ["livePersonConfig", "salesforceLiveAgentConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteDocumentRequest.prototype.name = ""; /** - * Creates a new HumanAgentHandoffConfig instance using the specified properties. + * Creates a new DeleteDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest instance */ - HumanAgentHandoffConfig.create = function create(properties) { - return new HumanAgentHandoffConfig(properties); + DeleteDocumentRequest.create = function create(properties) { + return new DeleteDocumentRequest(properties); }; /** - * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. + * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentHandoffConfig.encode = function encode(message, writer) { + DeleteDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.livePersonConfig != null && Object.hasOwnProperty.call(message, "livePersonConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.encode(message.livePersonConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.salesforceLiveAgentConfig != null && Object.hasOwnProperty.call(message, "salesforceLiveAgentConfig")) - $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.encode(message.salesforceLiveAgentConfig, 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 HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.verify|verify} messages. + * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentHandoffConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig + * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentHandoffConfig.decode = function decode(reader, length) { + DeleteDocumentRequest.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.v2beta1.HumanAgentHandoffConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.decode(reader, reader.uint32()); - break; - case 2: - message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -131744,579 +133767,108 @@ }; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig + * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentHandoffConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HumanAgentHandoffConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HumanAgentHandoffConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { - properties.agentService = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify(message.livePersonConfig); - if (error) - return "livePersonConfig." + error; - } - } - if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { - if (properties.agentService === 1) - return "agentService: multiple values"; - properties.agentService = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify(message.salesforceLiveAgentConfig); - if (error) - return "salesforceLiveAgentConfig." + error; - } - } - return null; - }; - - /** - * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} HumanAgentHandoffConfig - */ - HumanAgentHandoffConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig(); - if (object.livePersonConfig != null) { - if (typeof object.livePersonConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.livePersonConfig: object expected"); - message.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.fromObject(object.livePersonConfig); - } - if (object.salesforceLiveAgentConfig != null) { - if (typeof object.salesforceLiveAgentConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.salesforceLiveAgentConfig: object expected"); - message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.fromObject(object.salesforceLiveAgentConfig); - } - return message; - }; - - /** - * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig} message HumanAgentHandoffConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HumanAgentHandoffConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { - object.livePersonConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.toObject(message.livePersonConfig, options); - if (options.oneofs) - object.agentService = "livePersonConfig"; - } - if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { - object.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.toObject(message.salesforceLiveAgentConfig, options); - if (options.oneofs) - object.agentService = "salesforceLiveAgentConfig"; - } - return object; - }; - - /** - * Converts this HumanAgentHandoffConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @instance - * @returns {Object.} JSON object - */ - HumanAgentHandoffConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - HumanAgentHandoffConfig.LivePersonConfig = (function() { - - /** - * Properties of a LivePersonConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @interface ILivePersonConfig - * @property {string|null} [accountNumber] LivePersonConfig accountNumber - */ - - /** - * Constructs a new LivePersonConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @classdesc Represents a LivePersonConfig. - * @implements ILivePersonConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set - */ - function LivePersonConfig(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]]; - } - - /** - * LivePersonConfig accountNumber. - * @member {string} accountNumber - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @instance - */ - LivePersonConfig.prototype.accountNumber = ""; - - /** - * Creates a new LivePersonConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig instance - */ - LivePersonConfig.create = function create(properties) { - return new LivePersonConfig(properties); - }; - - /** - * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LivePersonConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountNumber); - return writer; - }; - - /** - * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LivePersonConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LivePersonConfig.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.v2beta1.HumanAgentHandoffConfig.LivePersonConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.accountNumber = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LivePersonConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LivePersonConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LivePersonConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (!$util.isString(message.accountNumber)) - return "accountNumber: string expected"; - return null; - }; - - /** - * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - */ - LivePersonConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig(); - if (object.accountNumber != null) - message.accountNumber = String(object.accountNumber); - return message; - }; - - /** - * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig} message LivePersonConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LivePersonConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.accountNumber = ""; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - object.accountNumber = message.accountNumber; - return object; - }; - - /** - * Converts this LivePersonConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.LivePersonConfig - * @instance - * @returns {Object.} JSON object - */ - LivePersonConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LivePersonConfig; - })(); - - HumanAgentHandoffConfig.SalesforceLiveAgentConfig = (function() { - - /** - * Properties of a SalesforceLiveAgentConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @interface ISalesforceLiveAgentConfig - * @property {string|null} [organizationId] SalesforceLiveAgentConfig organizationId - * @property {string|null} [deploymentId] SalesforceLiveAgentConfig deploymentId - * @property {string|null} [buttonId] SalesforceLiveAgentConfig buttonId - * @property {string|null} [endpointDomain] SalesforceLiveAgentConfig endpointDomain - */ - - /** - * Constructs a new SalesforceLiveAgentConfig. - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig - * @classdesc Represents a SalesforceLiveAgentConfig. - * @implements ISalesforceLiveAgentConfig - * @constructor - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set - */ - function SalesforceLiveAgentConfig(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]]; - } - - /** - * SalesforceLiveAgentConfig organizationId. - * @member {string} organizationId - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.organizationId = ""; - - /** - * SalesforceLiveAgentConfig deploymentId. - * @member {string} deploymentId - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.deploymentId = ""; - - /** - * SalesforceLiveAgentConfig buttonId. - * @member {string} buttonId - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.buttonId = ""; - - /** - * SalesforceLiveAgentConfig endpointDomain. - * @member {string} endpointDomain - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.endpointDomain = ""; - - /** - * Creates a new SalesforceLiveAgentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig instance - */ - SalesforceLiveAgentConfig.create = function create(properties) { - return new SalesforceLiveAgentConfig(properties); - }; - - /** - * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SalesforceLiveAgentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.organizationId); - if (message.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); - if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonId); - if (message.endpointDomain != null && Object.hasOwnProperty.call(message, "endpointDomain")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpointDomain); - return writer; - }; - - /** - * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SalesforceLiveAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SalesforceLiveAgentConfig.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.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.organizationId = reader.string(); - break; - case 2: - message.deploymentId = reader.string(); - break; - case 3: - message.buttonId = reader.string(); - break; - case 4: - message.endpointDomain = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SalesforceLiveAgentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SalesforceLiveAgentConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SalesforceLiveAgentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) - if (!$util.isString(message.organizationId)) - return "organizationId: string expected"; - if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) - if (!$util.isString(message.deploymentId)) - return "deploymentId: string expected"; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - if (!$util.isString(message.buttonId)) - return "buttonId: string expected"; - if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) - if (!$util.isString(message.endpointDomain)) - return "endpointDomain: string expected"; - return null; - }; - - /** - * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - */ - SalesforceLiveAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); - if (object.organizationId != null) - message.organizationId = String(object.organizationId); - if (object.deploymentId != null) - message.deploymentId = String(object.deploymentId); - if (object.buttonId != null) - message.buttonId = String(object.buttonId); - if (object.endpointDomain != null) - message.endpointDomain = String(object.endpointDomain); - return message; - }; + * Verifies a DeleteDocumentRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDocumentRequest.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 a SalesforceLiveAgentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} message SalesforceLiveAgentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SalesforceLiveAgentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.organizationId = ""; - object.deploymentId = ""; - object.buttonId = ""; - object.endpointDomain = ""; - } - if (message.organizationId != null && message.hasOwnProperty("organizationId")) - object.organizationId = message.organizationId; - if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) - object.deploymentId = message.deploymentId; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - object.buttonId = message.buttonId; - if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) - object.endpointDomain = message.endpointDomain; + /** + * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest + */ + DeleteDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this SalesforceLiveAgentConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - * @returns {Object.} JSON object - */ - SalesforceLiveAgentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} message DeleteDocumentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDocumentRequest.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 SalesforceLiveAgentConfig; - })(); + /** + * Converts this DeleteDocumentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDocumentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return HumanAgentHandoffConfig; + return DeleteDocumentRequest; })(); - v2beta1.NotificationConfig = (function() { + v2beta1.UpdateDocumentRequest = (function() { /** - * Properties of a NotificationConfig. + * Properties of an UpdateDocumentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface INotificationConfig - * @property {string|null} [topic] NotificationConfig topic - * @property {google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat|null} [messageFormat] NotificationConfig messageFormat + * @interface IUpdateDocumentRequest + * @property {google.cloud.dialogflow.v2beta1.IDocument|null} [document] UpdateDocumentRequest document + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDocumentRequest updateMask */ /** - * Constructs a new NotificationConfig. + * Constructs a new UpdateDocumentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig + * @classdesc Represents an UpdateDocumentRequest. + * @implements IUpdateDocumentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.INotificationConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest=} [properties] Properties to set */ - function NotificationConfig(properties) { + function UpdateDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132324,88 +133876,88 @@ } /** - * NotificationConfig topic. - * @member {string} topic - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * UpdateDocumentRequest document. + * @member {google.cloud.dialogflow.v2beta1.IDocument|null|undefined} document + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @instance */ - NotificationConfig.prototype.topic = ""; + UpdateDocumentRequest.prototype.document = null; /** - * NotificationConfig messageFormat. - * @member {google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat} messageFormat - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * UpdateDocumentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @instance */ - NotificationConfig.prototype.messageFormat = 0; + UpdateDocumentRequest.prototype.updateMask = null; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new UpdateDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.INotificationConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest instance */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); + UpdateDocumentRequest.create = function create(properties) { + return new UpdateDocumentRequest(properties); }; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. + * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encode = function encode(message, writer) { + UpdateDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.messageFormat != null && Object.hasOwnProperty.call(message, "messageFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageFormat); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.dialogflow.v2beta1.Document.encode(message.document, 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 NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.NotificationConfig.verify|verify} messages. + * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decode = function decode(reader, length) { + UpdateDocumentRequest.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.v2beta1.NotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.topic = reader.string(); + message.document = $root.google.cloud.dialogflow.v2beta1.Document.decode(reader, reader.uint32()); break; case 2: - message.messageFormat = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -132416,150 +133968,126 @@ }; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationConfig message. + * Verifies an UpdateDocumentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationConfig.verify = function verify(message) { + UpdateDocumentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) - switch (message.messageFormat) { - default: - return "messageFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.document); + if (error) + return "document." + 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 NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.NotificationConfig) + UpdateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.NotificationConfig(); - if (object.topic != null) - message.topic = String(object.topic); - switch (object.messageFormat) { - case "MESSAGE_FORMAT_UNSPECIFIED": - case 0: - message.messageFormat = 0; - break; - case "PROTO": - case 1: - message.messageFormat = 1; - break; - case "JSON": - case 2: - message.messageFormat = 2; - break; + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.document: object expected"); + message.document = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.document); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.NotificationConfig} message NotificationConfig + * @param {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} message UpdateDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationConfig.toObject = function toObject(message, options) { + UpdateDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.topic = ""; - object.messageFormat = options.enums === String ? "MESSAGE_FORMAT_UNSPECIFIED" : 0; + object.document = null; + object.updateMask = null; } - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) - object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.document, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this NotificationConfig to JSON. + * Converts this UpdateDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.NotificationConfig + * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest * @instance * @returns {Object.} JSON object */ - NotificationConfig.prototype.toJSON = function toJSON() { + UpdateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * MessageFormat enum. - * @name google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat - * @enum {number} - * @property {number} MESSAGE_FORMAT_UNSPECIFIED=0 MESSAGE_FORMAT_UNSPECIFIED value - * @property {number} PROTO=1 PROTO value - * @property {number} JSON=2 JSON value - */ - NotificationConfig.MessageFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROTO"] = 1; - values[valuesById[2] = "JSON"] = 2; - return values; - })(); - - return NotificationConfig; + return UpdateDocumentRequest; })(); - v2beta1.LoggingConfig = (function() { + v2beta1.ExportOperationMetadata = (function() { /** - * Properties of a LoggingConfig. + * Properties of an ExportOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ILoggingConfig - * @property {boolean|null} [enableStackdriverLogging] LoggingConfig enableStackdriverLogging + * @interface IExportOperationMetadata + * @property {google.cloud.dialogflow.v2beta1.IGcsDestination|null} [exportedGcsDestination] ExportOperationMetadata exportedGcsDestination */ /** - * Constructs a new LoggingConfig. + * Constructs a new ExportOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a LoggingConfig. - * @implements ILoggingConfig + * @classdesc Represents an ExportOperationMetadata. + * @implements IExportOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IExportOperationMetadata=} [properties] Properties to set */ - function LoggingConfig(properties) { + function ExportOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132567,75 +134095,75 @@ } /** - * LoggingConfig enableStackdriverLogging. - * @member {boolean} enableStackdriverLogging - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * ExportOperationMetadata exportedGcsDestination. + * @member {google.cloud.dialogflow.v2beta1.IGcsDestination|null|undefined} exportedGcsDestination + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @instance */ - LoggingConfig.prototype.enableStackdriverLogging = false; + ExportOperationMetadata.prototype.exportedGcsDestination = null; /** - * Creates a new LoggingConfig instance using the specified properties. + * Creates a new ExportOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig instance + * @param {google.cloud.dialogflow.v2beta1.IExportOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ExportOperationMetadata} ExportOperationMetadata instance */ - LoggingConfig.create = function create(properties) { - return new LoggingConfig(properties); + ExportOperationMetadata.create = function create(properties) { + return new ExportOperationMetadata(properties); }; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. + * Encodes the specified ExportOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ExportOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IExportOperationMetadata} message ExportOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encode = function encode(message, writer) { + ExportOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableStackdriverLogging); + if (message.exportedGcsDestination != null && Object.hasOwnProperty.call(message, "exportedGcsDestination")) + $root.google.cloud.dialogflow.v2beta1.GcsDestination.encode(message.exportedGcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.LoggingConfig.verify|verify} messages. + * Encodes the specified ExportOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ExportOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IExportOperationMetadata} message ExportOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + ExportOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes an ExportOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2beta1.ExportOperationMetadata} ExportOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decode = function decode(reader, length) { + ExportOperationMetadata.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.v2beta1.LoggingConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.enableStackdriverLogging = reader.bool(); + case 1: + message.exportedGcsDestination = $root.google.cloud.dialogflow.v2beta1.GcsDestination.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -132646,109 +134174,114 @@ }; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes an ExportOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2beta1.ExportOperationMetadata} ExportOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decodeDelimited = function decodeDelimited(reader) { + ExportOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoggingConfig message. + * Verifies an ExportOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoggingConfig.verify = function verify(message) { + ExportOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - if (typeof message.enableStackdriverLogging !== "boolean") - return "enableStackdriverLogging: boolean expected"; + if (message.exportedGcsDestination != null && message.hasOwnProperty("exportedGcsDestination")) { + var error = $root.google.cloud.dialogflow.v2beta1.GcsDestination.verify(message.exportedGcsDestination); + if (error) + return "exportedGcsDestination." + error; + } return null; }; /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ExportOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2beta1.ExportOperationMetadata} ExportOperationMetadata */ - LoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.LoggingConfig) + ExportOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.LoggingConfig(); - if (object.enableStackdriverLogging != null) - message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + var message = new $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata(); + if (object.exportedGcsDestination != null) { + if (typeof object.exportedGcsDestination !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ExportOperationMetadata.exportedGcsDestination: object expected"); + message.exportedGcsDestination = $root.google.cloud.dialogflow.v2beta1.GcsDestination.fromObject(object.exportedGcsDestination); + } return message; }; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * Creates a plain object from an ExportOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.LoggingConfig} message LoggingConfig + * @param {google.cloud.dialogflow.v2beta1.ExportOperationMetadata} message ExportOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoggingConfig.toObject = function toObject(message, options) { + ExportOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.enableStackdriverLogging = false; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - object.enableStackdriverLogging = message.enableStackdriverLogging; + object.exportedGcsDestination = null; + if (message.exportedGcsDestination != null && message.hasOwnProperty("exportedGcsDestination")) + object.exportedGcsDestination = $root.google.cloud.dialogflow.v2beta1.GcsDestination.toObject(message.exportedGcsDestination, options); return object; }; /** - * Converts this LoggingConfig to JSON. + * Converts this ExportOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.LoggingConfig + * @memberof google.cloud.dialogflow.v2beta1.ExportOperationMetadata * @instance * @returns {Object.} JSON object */ - LoggingConfig.prototype.toJSON = function toJSON() { + ExportOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LoggingConfig; + return ExportOperationMetadata; })(); - v2beta1.ListConversationProfilesRequest = (function() { + v2beta1.KnowledgeOperationMetadata = (function() { /** - * Properties of a ListConversationProfilesRequest. + * Properties of a KnowledgeOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListConversationProfilesRequest - * @property {string|null} [parent] ListConversationProfilesRequest parent - * @property {number|null} [pageSize] ListConversationProfilesRequest pageSize - * @property {string|null} [pageToken] ListConversationProfilesRequest pageToken + * @interface IKnowledgeOperationMetadata + * @property {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|null} [state] KnowledgeOperationMetadata state + * @property {string|null} [knowledgeBase] KnowledgeOperationMetadata knowledgeBase + * @property {google.cloud.dialogflow.v2beta1.IExportOperationMetadata|null} [exportOperationMetadata] KnowledgeOperationMetadata exportOperationMetadata */ /** - * Constructs a new ListConversationProfilesRequest. + * Constructs a new KnowledgeOperationMetadata. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListConversationProfilesRequest. - * @implements IListConversationProfilesRequest + * @classdesc Represents a KnowledgeOperationMetadata. + * @implements IKnowledgeOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata=} [properties] Properties to set */ - function ListConversationProfilesRequest(properties) { + function KnowledgeOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132756,101 +134289,115 @@ } /** - * ListConversationProfilesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * KnowledgeOperationMetadata state. + * @member {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State} state + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @instance */ - ListConversationProfilesRequest.prototype.parent = ""; + KnowledgeOperationMetadata.prototype.state = 0; /** - * ListConversationProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * KnowledgeOperationMetadata knowledgeBase. + * @member {string} knowledgeBase + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @instance */ - ListConversationProfilesRequest.prototype.pageSize = 0; + KnowledgeOperationMetadata.prototype.knowledgeBase = ""; /** - * ListConversationProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * KnowledgeOperationMetadata exportOperationMetadata. + * @member {google.cloud.dialogflow.v2beta1.IExportOperationMetadata|null|undefined} exportOperationMetadata + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @instance */ - ListConversationProfilesRequest.prototype.pageToken = ""; + KnowledgeOperationMetadata.prototype.exportOperationMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListConversationProfilesRequest instance using the specified properties. + * KnowledgeOperationMetadata operationMetadata. + * @member {"exportOperationMetadata"|undefined} operationMetadata + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata + * @instance + */ + Object.defineProperty(KnowledgeOperationMetadata.prototype, "operationMetadata", { + get: $util.oneOfGetter($oneOfFields = ["exportOperationMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KnowledgeOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest instance + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata instance */ - ListConversationProfilesRequest.create = function create(properties) { - return new ListConversationProfilesRequest(properties); + KnowledgeOperationMetadata.create = function create(properties) { + return new KnowledgeOperationMetadata(properties); }; /** - * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. + * Encodes the specified KnowledgeOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata} message KnowledgeOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesRequest.encode = function encode(message, writer) { + KnowledgeOperationMetadata.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.knowledgeBase != null && Object.hasOwnProperty.call(message, "knowledgeBase")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.knowledgeBase); + if (message.exportOperationMetadata != null && Object.hasOwnProperty.call(message, "exportOperationMetadata")) + $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata.encode(message.exportOperationMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest.verify|verify} messages. + * Encodes the specified KnowledgeOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata} message KnowledgeOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + KnowledgeOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. + * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesRequest.decode = function decode(reader, length) { + KnowledgeOperationMetadata.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.v2beta1.ListConversationProfilesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); + message.state = reader.int32(); break; case 3: - message.pageToken = reader.string(); + message.knowledgeBase = reader.string(); + break; + case 4: + message.exportOperationMetadata = $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -132861,126 +134408,178 @@ }; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + KnowledgeOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationProfilesRequest message. + * Verifies a KnowledgeOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationProfilesRequest.verify = function verify(message) { + KnowledgeOperationMetadata.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"; + var properties = {}; + 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.knowledgeBase != null && message.hasOwnProperty("knowledgeBase")) + if (!$util.isString(message.knowledgeBase)) + return "knowledgeBase: string expected"; + if (message.exportOperationMetadata != null && message.hasOwnProperty("exportOperationMetadata")) { + properties.operationMetadata = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata.verify(message.exportOperationMetadata); + if (error) + return "exportOperationMetadata." + error; + } + } return null; }; /** - * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a KnowledgeOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata */ - ListConversationProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest) + KnowledgeOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest(); - 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.v2beta1.KnowledgeOperationMetadata(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; + } + if (object.knowledgeBase != null) + message.knowledgeBase = String(object.knowledgeBase); + if (object.exportOperationMetadata != null) { + if (typeof object.exportOperationMetadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.exportOperationMetadata: object expected"); + message.exportOperationMetadata = $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata.fromObject(object.exportOperationMetadata); + } return message; }; /** - * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. + * Creates a plain object from a KnowledgeOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @static - * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest} message ListConversationProfilesRequest + * @param {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} message KnowledgeOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationProfilesRequest.toObject = function toObject(message, options) { + KnowledgeOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.knowledgeBase = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State[message.state] : message.state; + if (message.knowledgeBase != null && message.hasOwnProperty("knowledgeBase")) + object.knowledgeBase = message.knowledgeBase; + if (message.exportOperationMetadata != null && message.hasOwnProperty("exportOperationMetadata")) { + object.exportOperationMetadata = $root.google.cloud.dialogflow.v2beta1.ExportOperationMetadata.toObject(message.exportOperationMetadata, options); + if (options.oneofs) + object.operationMetadata = "exportOperationMetadata"; } - 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 ListConversationProfilesRequest to JSON. + * Converts this KnowledgeOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata * @instance * @returns {Object.} JSON object */ - ListConversationProfilesRequest.prototype.toJSON = function toJSON() { + KnowledgeOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListConversationProfilesRequest; + /** + * State enum. + * @name google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + */ + KnowledgeOperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + return values; + })(); + + return KnowledgeOperationMetadata; })(); - v2beta1.ListConversationProfilesResponse = (function() { + v2beta1.ReloadDocumentRequest = (function() { /** - * Properties of a ListConversationProfilesResponse. + * Properties of a ReloadDocumentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListConversationProfilesResponse - * @property {Array.|null} [conversationProfiles] ListConversationProfilesResponse conversationProfiles - * @property {string|null} [nextPageToken] ListConversationProfilesResponse nextPageToken + * @interface IReloadDocumentRequest + * @property {string|null} [name] ReloadDocumentRequest name + * @property {google.cloud.dialogflow.v2beta1.IGcsSource|null} [gcsSource] ReloadDocumentRequest gcsSource + * @property {boolean|null} [importGcsCustomMetadata] ReloadDocumentRequest importGcsCustomMetadata */ /** - * Constructs a new ListConversationProfilesResponse. + * Constructs a new ReloadDocumentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListConversationProfilesResponse. - * @implements IListConversationProfilesResponse + * @classdesc Represents a ReloadDocumentRequest. + * @implements IReloadDocumentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest=} [properties] Properties to set */ - function ListConversationProfilesResponse(properties) { - this.conversationProfiles = []; + function ReloadDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -132988,91 +134587,115 @@ } /** - * ListConversationProfilesResponse conversationProfiles. - * @member {Array.} conversationProfiles - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * ReloadDocumentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @instance */ - ListConversationProfilesResponse.prototype.conversationProfiles = $util.emptyArray; + ReloadDocumentRequest.prototype.name = ""; /** - * ListConversationProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * ReloadDocumentRequest gcsSource. + * @member {google.cloud.dialogflow.v2beta1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @instance */ - ListConversationProfilesResponse.prototype.nextPageToken = ""; + ReloadDocumentRequest.prototype.gcsSource = null; /** - * Creates a new ListConversationProfilesResponse instance using the specified properties. + * ReloadDocumentRequest importGcsCustomMetadata. + * @member {boolean} importGcsCustomMetadata + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @instance + */ + ReloadDocumentRequest.prototype.importGcsCustomMetadata = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReloadDocumentRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @instance + */ + Object.defineProperty(ReloadDocumentRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReloadDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse instance + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest instance */ - ListConversationProfilesResponse.create = function create(properties) { - return new ListConversationProfilesResponse(properties); + ReloadDocumentRequest.create = function create(properties) { + return new ReloadDocumentRequest(properties); }; /** - * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. + * Encodes the specified ReloadDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} message ReloadDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesResponse.encode = function encode(message, writer) { + ReloadDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfiles != null && message.conversationProfiles.length) - for (var i = 0; i < message.conversationProfiles.length; ++i) - $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfiles[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); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.dialogflow.v2beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.importGcsCustomMetadata); return writer; }; /** - * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.verify|verify} messages. + * Encodes the specified ReloadDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} message ReloadDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ReloadDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. + * Decodes a ReloadDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse + * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesResponse.decode = function decode(reader, length) { + ReloadDocumentRequest.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.v2beta1.ListConversationProfilesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.conversationProfiles && message.conversationProfiles.length)) - message.conversationProfiles = []; - message.conversationProfiles.push($root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32())); + message.name = reader.string(); break; - case 2: - message.nextPageToken = reader.string(); + case 3: + message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.decode(reader, reader.uint32()); + break; + case 4: + message.importGcsCustomMetadata = reader.bool(); break; default: reader.skipType(tag & 7); @@ -133083,133 +134706,136 @@ }; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. + * Decodes a ReloadDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse + * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + ReloadDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationProfilesResponse message. + * Verifies a ReloadDocumentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationProfilesResponse.verify = function verify(message) { + ReloadDocumentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfiles != null && message.hasOwnProperty("conversationProfiles")) { - if (!Array.isArray(message.conversationProfiles)) - return "conversationProfiles: array expected"; - for (var i = 0; i < message.conversationProfiles.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfiles[i]); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.GcsSource.verify(message.gcsSource); if (error) - return "conversationProfiles." + error; + return "gcsSource." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + if (typeof message.importGcsCustomMetadata !== "boolean") + return "importGcsCustomMetadata: boolean expected"; return null; }; /** - * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ReloadDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} ListConversationProfilesResponse + * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest */ - ListConversationProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse) + ReloadDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse(); - if (object.conversationProfiles) { - if (!Array.isArray(object.conversationProfiles)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.conversationProfiles: array expected"); - message.conversationProfiles = []; - for (var i = 0; i < object.conversationProfiles.length; ++i) { - if (typeof object.conversationProfiles[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse.conversationProfiles: object expected"); - message.conversationProfiles[i] = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfiles[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.fromObject(object.gcsSource); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.importGcsCustomMetadata != null) + message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); return message; }; /** - * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ReloadDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse} message ListConversationProfilesResponse + * @param {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} message ReloadDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationProfilesResponse.toObject = function toObject(message, options) { + ReloadDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.conversationProfiles = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.conversationProfiles && message.conversationProfiles.length) { - object.conversationProfiles = []; - for (var j = 0; j < message.conversationProfiles.length; ++j) - object.conversationProfiles[j] = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfiles[j], options); + if (options.defaults) { + object.name = ""; + object.importGcsCustomMetadata = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) + object.importGcsCustomMetadata = message.importGcsCustomMetadata; return object; }; /** - * Converts this ListConversationProfilesResponse to JSON. + * Converts this ReloadDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListConversationProfilesResponse + * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest * @instance * @returns {Object.} JSON object */ - ListConversationProfilesResponse.prototype.toJSON = function toJSON() { + ReloadDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListConversationProfilesResponse; + return ReloadDocumentRequest; })(); - v2beta1.GetConversationProfileRequest = (function() { + v2beta1.GcsSources = (function() { /** - * Properties of a GetConversationProfileRequest. + * Properties of a GcsSources. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetConversationProfileRequest - * @property {string|null} [name] GetConversationProfileRequest name + * @interface IGcsSources + * @property {Array.|null} [uris] GcsSources uris */ /** - * Constructs a new GetConversationProfileRequest. + * Constructs a new GcsSources. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetConversationProfileRequest. - * @implements IGetConversationProfileRequest + * @classdesc Represents a GcsSources. + * @implements IGcsSources * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGcsSources=} [properties] Properties to set */ - function GetConversationProfileRequest(properties) { + function GcsSources(properties) { + this.uris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133217,75 +134843,78 @@ } /** - * GetConversationProfileRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * GcsSources uris. + * @member {Array.} uris + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @instance */ - GetConversationProfileRequest.prototype.name = ""; + GcsSources.prototype.uris = $util.emptyArray; /** - * Creates a new GetConversationProfileRequest instance using the specified properties. + * Creates a new GcsSources instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGcsSources=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources instance */ - GetConversationProfileRequest.create = function create(properties) { - return new GetConversationProfileRequest(properties); + GcsSources.create = function create(properties) { + return new GcsSources(properties); }; /** - * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsSources} message GcsSources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationProfileRequest.encode = function encode(message, writer) { + GcsSources.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.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); return writer; }; /** - * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSources.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static - * @param {google.cloud.dialogflow.v2beta1.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsSources} message GcsSources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsSources.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsSources message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationProfileRequest.decode = function decode(reader, length) { + GcsSources.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.v2beta1.GetConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GcsSources(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); + case 2: + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -133296,108 +134925,119 @@ }; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSources message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + GcsSources.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConversationProfileRequest message. + * Verifies a GcsSources message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConversationProfileRequest.verify = function verify(message) { + GcsSources.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.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } return null; }; /** - * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSources} GcsSources */ - GetConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest) + GcsSources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GcsSources) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetConversationProfileRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2beta1.GcsSources(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.dialogflow.v2beta1.GcsSources.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } return message; }; /** - * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsSources message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @static - * @param {google.cloud.dialogflow.v2beta1.GetConversationProfileRequest} message GetConversationProfileRequest + * @param {google.cloud.dialogflow.v2beta1.GcsSources} message GcsSources * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConversationProfileRequest.toObject = function toObject(message, options) { + GcsSources.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.arrays || options.defaults) + object.uris = []; + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } return object; }; /** - * Converts this GetConversationProfileRequest to JSON. + * Converts this GcsSources to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSources * @instance * @returns {Object.} JSON object */ - GetConversationProfileRequest.prototype.toJSON = function toJSON() { + GcsSources.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetConversationProfileRequest; + return GcsSources; })(); - v2beta1.CreateConversationProfileRequest = (function() { + v2beta1.GcsSource = (function() { /** - * Properties of a CreateConversationProfileRequest. + * Properties of a GcsSource. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateConversationProfileRequest - * @property {string|null} [parent] CreateConversationProfileRequest parent - * @property {google.cloud.dialogflow.v2beta1.IConversationProfile|null} [conversationProfile] CreateConversationProfileRequest conversationProfile + * @interface IGcsSource + * @property {string|null} [uri] GcsSource uri */ /** - * Constructs a new CreateConversationProfileRequest. + * Constructs a new GcsSource. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateConversationProfileRequest. - * @implements ICreateConversationProfileRequest + * @classdesc Represents a GcsSource. + * @implements IGcsSource * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGcsSource=} [properties] Properties to set */ - function CreateConversationProfileRequest(properties) { + function GcsSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133405,88 +135045,75 @@ } /** - * CreateConversationProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest - * @instance - */ - CreateConversationProfileRequest.prototype.parent = ""; - - /** - * CreateConversationProfileRequest conversationProfile. - * @member {google.cloud.dialogflow.v2beta1.IConversationProfile|null|undefined} conversationProfile - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * GcsSource uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @instance */ - CreateConversationProfileRequest.prototype.conversationProfile = null; + GcsSource.prototype.uri = ""; /** - * Creates a new CreateConversationProfileRequest instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource instance */ - CreateConversationProfileRequest.create = function create(properties) { - return new CreateConversationProfileRequest(properties); + GcsSource.create = function create(properties) { + return new GcsSource(properties); }; /** - * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationProfileRequest.encode = function encode(message, writer) { + GcsSource.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.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationProfileRequest.decode = function decode(reader, length) { + GcsSource.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.v2beta1.CreateConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32()); + message.uri = reader.string(); break; default: reader.skipType(tag & 7); @@ -133497,122 +135124,107 @@ }; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationProfileRequest message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationProfileRequest.verify = function verify(message) { + GcsSource.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.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfile); - if (error) - return "conversationProfile." + error; - } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsSource} GcsSource */ - CreateConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GcsSource) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.conversationProfile != null) { - if (typeof object.conversationProfile !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest.conversationProfile: object expected"); - message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfile); - } + var message = new $root.google.cloud.dialogflow.v2beta1.GcsSource(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @static - * @param {google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest} message CreateConversationProfileRequest + * @param {google.cloud.dialogflow.v2beta1.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationProfileRequest.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.conversationProfile = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfile, options); + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this CreateConversationProfileRequest to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsSource * @instance * @returns {Object.} JSON object */ - CreateConversationProfileRequest.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateConversationProfileRequest; + return GcsSource; })(); - v2beta1.UpdateConversationProfileRequest = (function() { + v2beta1.GcsDestination = (function() { /** - * Properties of an UpdateConversationProfileRequest. + * Properties of a GcsDestination. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateConversationProfileRequest - * @property {google.cloud.dialogflow.v2beta1.IConversationProfile|null} [conversationProfile] UpdateConversationProfileRequest conversationProfile - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversationProfileRequest updateMask + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri */ /** - * Constructs a new UpdateConversationProfileRequest. + * Constructs a new GcsDestination. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateConversationProfileRequest. - * @implements IUpdateConversationProfileRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGcsDestination=} [properties] Properties to set */ - function UpdateConversationProfileRequest(properties) { + function GcsDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133620,88 +135232,75 @@ } /** - * UpdateConversationProfileRequest conversationProfile. - * @member {google.cloud.dialogflow.v2beta1.IConversationProfile|null|undefined} conversationProfile - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest - * @instance - */ - UpdateConversationProfileRequest.prototype.conversationProfile = null; - - /** - * UpdateConversationProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @instance */ - UpdateConversationProfileRequest.prototype.updateMask = null; + GcsDestination.prototype.uri = ""; /** - * Creates a new UpdateConversationProfileRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GcsDestination} GcsDestination instance */ - UpdateConversationProfileRequest.create = function create(properties) { - return new UpdateConversationProfileRequest(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConversationProfileRequest.encode = function encode(message, writer) { + GcsDestination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfile, 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.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConversationProfileRequest.decode = function decode(reader, length) { + GcsDestination.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.v2beta1.UpdateConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.uri = reader.string(); break; default: reader.skipType(tag & 7); @@ -133712,126 +135311,346 @@ }; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateConversationProfileRequest message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateConversationProfileRequest.verify = function verify(message) { + GcsDestination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfile); - if (error) - return "conversationProfile." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.GcsDestination} GcsDestination */ - UpdateConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GcsDestination) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest(); - if (object.conversationProfile != null) { - if (typeof object.conversationProfile !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.conversationProfile: object expected"); - message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfile); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.dialogflow.v2beta1.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest} message UpdateConversationProfileRequest + * @param {google.cloud.dialogflow.v2beta1.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateConversationProfileRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conversationProfile = null; - object.updateMask = null; - } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfile, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GcsDestination; + })(); + + v2beta1.Environments = (function() { + + /** + * Constructs a new Environments service. + * @memberof google.cloud.dialogflow.v2beta1 + * @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; + + /** + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Environments#listEnvironments}. + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsRequest, $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironment}. + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.GetEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#createEnvironment}. + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#updateEnvironment}. + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Environment} [response] Environment + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest, $root.google.cloud.dialogflow.v2beta1.Environment, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#deleteEnvironment}. + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteEnvironmentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Environments#getEnvironmentHistory}. + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @typedef GetEnvironmentHistoryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory} [response] EnvironmentHistory + */ + + /** + * Calls GetEnvironmentHistory. + * @function getEnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.Environments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} request GetEnvironmentHistoryRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Environments.GetEnvironmentHistoryCallback} callback Node-style callback called with the error, if any, and EnvironmentHistory + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getEnvironmentHistory = function getEnvironmentHistory(request, callback) { + return this.rpcCall(getEnvironmentHistory, $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest, $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory, request, callback); + }, "name", { value: "GetEnvironmentHistory" }); /** - * Converts this UpdateConversationProfileRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateConversationProfileRequest + * Calls GetEnvironmentHistory. + * @function getEnvironmentHistory + * @memberof google.cloud.dialogflow.v2beta1.Environments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} request GetEnvironmentHistoryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateConversationProfileRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return UpdateConversationProfileRequest; + return Environments; })(); - v2beta1.DeleteConversationProfileRequest = (function() { + v2beta1.Environment = (function() { /** - * Properties of a DeleteConversationProfileRequest. + * Properties of an Environment. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteConversationProfileRequest - * @property {string|null} [name] DeleteConversationProfileRequest name + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {string|null} [description] Environment description + * @property {string|null} [agentVersion] Environment agentVersion + * @property {google.cloud.dialogflow.v2beta1.Environment.State|null} [state] Environment state + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null} [textToSpeechSettings] Environment textToSpeechSettings + * @property {google.cloud.dialogflow.v2beta1.IFulfillment|null} [fulfillment] Environment fulfillment */ /** - * Constructs a new DeleteConversationProfileRequest. + * Constructs a new Environment. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteConversationProfileRequest. - * @implements IDeleteConversationProfileRequest + * @classdesc Represents an Environment. + * @implements IEnvironment * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IEnvironment=} [properties] Properties to set */ - function DeleteConversationProfileRequest(properties) { + function Environment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -133839,76 +135658,154 @@ } /** - * DeleteConversationProfileRequest name. + * Environment name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @instance */ - DeleteConversationProfileRequest.prototype.name = ""; + Environment.prototype.name = ""; /** - * Creates a new DeleteConversationProfileRequest instance using the specified properties. + * Environment description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.description = ""; + + /** + * Environment agentVersion. + * @member {string} agentVersion + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.agentVersion = ""; + + /** + * Environment state. + * @member {google.cloud.dialogflow.v2beta1.Environment.State} state + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment textToSpeechSettings. + * @member {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings|null|undefined} textToSpeechSettings + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.textToSpeechSettings = null; + + /** + * Environment fulfillment. + * @member {google.cloud.dialogflow.v2beta1.IFulfillment|null|undefined} fulfillment + * @memberof google.cloud.dialogflow.v2beta1.Environment + * @instance + */ + Environment.prototype.fulfillment = null; + + /** + * Creates a new Environment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2beta1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment instance */ - DeleteConversationProfileRequest.create = function create(properties) { - return new DeleteConversationProfileRequest(properties); + Environment.create = function create(properties) { + return new Environment(properties); }; /** - * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationProfileRequest.encode = function encode(message, writer) { + Environment.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.agentVersion != null && Object.hasOwnProperty.call(message, "agentVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentVersion); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + 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.textToSpeechSettings != null && Object.hasOwnProperty.call(message, "textToSpeechSettings")) + $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.encode(message.textToSpeechSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) + $root.google.cloud.dialogflow.v2beta1.Fulfillment.encode(message.fulfillment, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest.verify|verify} messages. + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Environment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEnvironment} message Environment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + Environment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. + * Decodes an Environment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationProfileRequest.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.v2beta1.DeleteConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Environment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.description = reader.string(); + break; + case 3: + message.agentVersion = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.decode(reader, reader.uint32()); + break; + case 8: + message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -133918,622 +135815,646 @@ }; /** - * Decodes a DeleteConversationProfileRequest 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.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationProfileRequest.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 DeleteConversationProfileRequest message. + * Verifies an Environment message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConversationProfileRequest.verify = function verify(message) { + Environment.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) + if (!$util.isString(message.agentVersion)) + return "agentVersion: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) { + var error = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify(message.textToSpeechSettings); + if (error) + return "textToSpeechSettings." + error; + } + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { + var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.verify(message.fulfillment); + if (error) + return "fulfillment." + error; + } return null; }; /** - * Creates a DeleteConversationProfileRequest 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.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2beta1.Environment} Environment */ - DeleteConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest) + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Environment) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.Environment(); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.agentVersion != null) + message.agentVersion = String(object.agentVersion); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STOPPED": + case 1: + message.state = 1; + break; + case "LOADING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.textToSpeechSettings != null) { + if (typeof object.textToSpeechSettings !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.textToSpeechSettings: object expected"); + message.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.fromObject(object.textToSpeechSettings); + } + if (object.fulfillment != null) { + if (typeof object.fulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Environment.fulfillment: object expected"); + message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.fromObject(object.fulfillment); + } return message; }; /** - * Creates a plain object from a DeleteConversationProfileRequest 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.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest} message DeleteConversationProfileRequest + * @param {google.cloud.dialogflow.v2beta1.Environment} message Environment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConversationProfileRequest.toObject = function toObject(message, options) { + Environment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.description = ""; + object.agentVersion = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.updateTime = null; + object.textToSpeechSettings = null; + object.fulfillment = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) + object.agentVersion = message.agentVersion; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Environment.State[message.state] : message.state; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.textToSpeechSettings != null && message.hasOwnProperty("textToSpeechSettings")) + object.textToSpeechSettings = $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings.toObject(message.textToSpeechSettings, options); + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) + object.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.toObject(message.fulfillment, options); return object; }; /** - * Converts this DeleteConversationProfileRequest to JSON. + * Converts this Environment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2beta1.Environment * @instance * @returns {Object.} JSON object */ - DeleteConversationProfileRequest.prototype.toJSON = function toJSON() { + Environment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteConversationProfileRequest; - })(); - - v2beta1.Documents = (function() { - - /** - * Constructs a new Documents service. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Documents - * @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 Documents(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Documents.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Documents; - - /** - * Creates new Documents service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @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 {Documents} RPC service. Useful where requests and/or responses are streamed. - */ - Documents.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#listDocuments}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef ListDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} [response] ListDocumentsResponse - */ - - /** - * Calls ListDocuments. - * @function listDocuments - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} request ListDocumentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.ListDocumentsCallback} callback Node-style callback called with the error, if any, and ListDocumentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Documents.prototype.listDocuments = function listDocuments(request, callback) { - return this.rpcCall(listDocuments, $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest, $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse, request, callback); - }, "name", { value: "ListDocuments" }); - - /** - * Calls ListDocuments. - * @function listDocuments - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} request ListDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#getDocument}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef GetDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2beta1.Document} [response] Document - */ - - /** - * Calls GetDocument. - * @function getDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} request GetDocumentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.GetDocumentCallback} callback Node-style callback called with the error, if any, and Document - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Documents.prototype.getDocument = function getDocument(request, callback) { - return this.rpcCall(getDocument, $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest, $root.google.cloud.dialogflow.v2beta1.Document, request, callback); - }, "name", { value: "GetDocument" }); - - /** - * Calls GetDocument. - * @function getDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} request GetDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#createDocument}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef CreateDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateDocument. - * @function createDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} request CreateDocumentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.CreateDocumentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Documents.prototype.createDocument = function createDocument(request, callback) { - return this.rpcCall(createDocument, $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDocument" }); - - /** - * Calls CreateDocument. - * @function createDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} request CreateDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#importDocuments}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef ImportDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Documents.prototype.importDocuments = function importDocuments(request, callback) { - return this.rpcCall(importDocuments, $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportDocuments" }); - - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#deleteDocument}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef DeleteDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - /** - * Calls DeleteDocument. - * @function deleteDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.DeleteDocumentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * State enum. + * @name google.cloud.dialogflow.v2beta1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STOPPED=1 STOPPED value + * @property {number} LOADING=2 LOADING value + * @property {number} RUNNING=3 RUNNING value */ - Object.defineProperty(Documents.prototype.deleteDocument = function deleteDocument(request, callback) { - return this.rpcCall(deleteDocument, $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDocument" }); + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STOPPED"] = 1; + values[valuesById[2] = "LOADING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + return values; + })(); + + return Environment; + })(); + + v2beta1.TextToSpeechSettings = (function() { /** - * Calls DeleteDocument. - * @function deleteDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a TextToSpeechSettings. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ITextToSpeechSettings + * @property {boolean|null} [enableTextToSpeech] TextToSpeechSettings enableTextToSpeech + * @property {google.cloud.dialogflow.v2beta1.OutputAudioEncoding|null} [outputAudioEncoding] TextToSpeechSettings outputAudioEncoding + * @property {number|null} [sampleRateHertz] TextToSpeechSettings sampleRateHertz + * @property {Object.|null} [synthesizeSpeechConfigs] TextToSpeechSettings synthesizeSpeechConfigs */ /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#updateDocument}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef UpdateDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new TextToSpeechSettings. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a TextToSpeechSettings. + * @implements ITextToSpeechSettings + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings=} [properties] Properties to set */ + function TextToSpeechSettings(properties) { + this.synthesizeSpeechConfigs = {}; + 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 UpdateDocument. - * @function updateDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents + * TextToSpeechSettings enableTextToSpeech. + * @member {boolean} enableTextToSpeech + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.UpdateDocumentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Documents.prototype.updateDocument = function updateDocument(request, callback) { - return this.rpcCall(updateDocument, $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDocument" }); + TextToSpeechSettings.prototype.enableTextToSpeech = false; /** - * Calls UpdateDocument. - * @function updateDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents + * TextToSpeechSettings outputAudioEncoding. + * @member {google.cloud.dialogflow.v2beta1.OutputAudioEncoding} outputAudioEncoding + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings * @instance - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + TextToSpeechSettings.prototype.outputAudioEncoding = 0; /** - * Callback as used by {@link google.cloud.dialogflow.v2beta1.Documents#reloadDocument}. - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @typedef ReloadDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * TextToSpeechSettings sampleRateHertz. + * @member {number} sampleRateHertz + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @instance */ + TextToSpeechSettings.prototype.sampleRateHertz = 0; /** - * Calls ReloadDocument. - * @function reloadDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents + * TextToSpeechSettings synthesizeSpeechConfigs. + * @member {Object.} synthesizeSpeechConfigs + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings * @instance - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} request ReloadDocumentRequest message or plain object - * @param {google.cloud.dialogflow.v2beta1.Documents.ReloadDocumentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Documents.prototype.reloadDocument = function reloadDocument(request, callback) { - return this.rpcCall(reloadDocument, $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ReloadDocument" }); + TextToSpeechSettings.prototype.synthesizeSpeechConfigs = $util.emptyObject; /** - * Calls ReloadDocument. - * @function reloadDocument - * @memberof google.cloud.dialogflow.v2beta1.Documents - * @instance - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} request ReloadDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new TextToSpeechSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings instance */ - - return Documents; - })(); - - v2beta1.Document = (function() { + TextToSpeechSettings.create = function create(properties) { + return new TextToSpeechSettings(properties); + }; /** - * Properties of a Document. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDocument - * @property {string|null} [name] Document name - * @property {string|null} [displayName] Document displayName - * @property {string|null} [mimeType] Document mimeType - * @property {Array.|null} [knowledgeTypes] Document knowledgeTypes - * @property {string|null} [contentUri] Document contentUri - * @property {string|null} [content] Document content - * @property {Uint8Array|null} [rawContent] Document rawContent - * @property {boolean|null} [enableAutoReload] Document enableAutoReload - * @property {google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null} [latestReloadStatus] Document latestReloadStatus - * @property {Object.|null} [metadata] Document metadata + * Encodes the specified TextToSpeechSettings message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + TextToSpeechSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableTextToSpeech != null && Object.hasOwnProperty.call(message, "enableTextToSpeech")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableTextToSpeech); + if (message.outputAudioEncoding != null && Object.hasOwnProperty.call(message, "outputAudioEncoding")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.outputAudioEncoding); + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sampleRateHertz); + if (message.synthesizeSpeechConfigs != null && Object.hasOwnProperty.call(message, "synthesizeSpeechConfigs")) + for (var keys = Object.keys(message.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.encode(message.synthesizeSpeechConfigs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; /** - * Constructs a new Document. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a Document. - * @implements IDocument - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDocument=} [properties] Properties to set + * Encodes the specified TextToSpeechSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.TextToSpeechSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.ITextToSpeechSettings} message TextToSpeechSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - function Document(properties) { - this.knowledgeTypes = []; - this.metadata = {}; - 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]]; - } + TextToSpeechSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Document name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Decodes a TextToSpeechSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.prototype.name = ""; + TextToSpeechSettings.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.v2beta1.TextToSpeechSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.enableTextToSpeech = reader.bool(); + break; + case 2: + message.outputAudioEncoding = reader.int32(); + break; + case 3: + message.sampleRateHertz = reader.int32(); + break; + case 4: + if (message.synthesizeSpeechConfigs === $util.emptyObject) + message.synthesizeSpeechConfigs = {}; + 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.v2beta1.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.synthesizeSpeechConfigs[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Document displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Decodes a TextToSpeechSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.prototype.displayName = ""; + TextToSpeechSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Document mimeType. - * @member {string} mimeType - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Verifies a TextToSpeechSettings message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.prototype.mimeType = ""; + TextToSpeechSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableTextToSpeech != null && message.hasOwnProperty("enableTextToSpeech")) + if (typeof message.enableTextToSpeech !== "boolean") + return "enableTextToSpeech: boolean expected"; + if (message.outputAudioEncoding != null && message.hasOwnProperty("outputAudioEncoding")) + switch (message.outputAudioEncoding) { + default: + return "outputAudioEncoding: 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.synthesizeSpeechConfigs != null && message.hasOwnProperty("synthesizeSpeechConfigs")) { + if (!$util.isObject(message.synthesizeSpeechConfigs)) + return "synthesizeSpeechConfigs: object expected"; + var key = Object.keys(message.synthesizeSpeechConfigs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.verify(message.synthesizeSpeechConfigs[key[i]]); + if (error) + return "synthesizeSpeechConfigs." + error; + } + } + return null; + }; /** - * Document knowledgeTypes. - * @member {Array.} knowledgeTypes - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Creates a TextToSpeechSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} TextToSpeechSettings */ - Document.prototype.knowledgeTypes = $util.emptyArray; + TextToSpeechSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.TextToSpeechSettings(); + if (object.enableTextToSpeech != null) + message.enableTextToSpeech = Boolean(object.enableTextToSpeech); + switch (object.outputAudioEncoding) { + case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": + case 0: + message.outputAudioEncoding = 0; + break; + case "OUTPUT_AUDIO_ENCODING_LINEAR_16": + case 1: + message.outputAudioEncoding = 1; + break; + case "OUTPUT_AUDIO_ENCODING_MP3": + case 2: + message.outputAudioEncoding = 2; + break; + case "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": + case 4: + message.outputAudioEncoding = 4; + break; + case "OUTPUT_AUDIO_ENCODING_OGG_OPUS": + case 3: + message.outputAudioEncoding = 3; + break; + case "OUTPUT_AUDIO_ENCODING_MULAW": + case 5: + message.outputAudioEncoding = 5; + break; + } + if (object.sampleRateHertz != null) + message.sampleRateHertz = object.sampleRateHertz | 0; + if (object.synthesizeSpeechConfigs) { + if (typeof object.synthesizeSpeechConfigs !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs = {}; + for (var keys = Object.keys(object.synthesizeSpeechConfigs), i = 0; i < keys.length; ++i) { + if (typeof object.synthesizeSpeechConfigs[keys[i]] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.TextToSpeechSettings.synthesizeSpeechConfigs: object expected"); + message.synthesizeSpeechConfigs[keys[i]] = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.fromObject(object.synthesizeSpeechConfigs[keys[i]]); + } + } + return message; + }; /** - * Document contentUri. - * @member {string|null|undefined} contentUri - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Creates a plain object from a TextToSpeechSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings + * @static + * @param {google.cloud.dialogflow.v2beta1.TextToSpeechSettings} message TextToSpeechSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Document.prototype.contentUri = null; + TextToSpeechSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.synthesizeSpeechConfigs = {}; + if (options.defaults) { + object.enableTextToSpeech = false; + object.outputAudioEncoding = options.enums === String ? "OUTPUT_AUDIO_ENCODING_UNSPECIFIED" : 0; + object.sampleRateHertz = 0; + } + if (message.enableTextToSpeech != null && message.hasOwnProperty("enableTextToSpeech")) + object.enableTextToSpeech = message.enableTextToSpeech; + if (message.outputAudioEncoding != null && message.hasOwnProperty("outputAudioEncoding")) + object.outputAudioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.OutputAudioEncoding[message.outputAudioEncoding] : message.outputAudioEncoding; + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + object.sampleRateHertz = message.sampleRateHertz; + var keys2; + if (message.synthesizeSpeechConfigs && (keys2 = Object.keys(message.synthesizeSpeechConfigs)).length) { + object.synthesizeSpeechConfigs = {}; + for (var j = 0; j < keys2.length; ++j) + object.synthesizeSpeechConfigs[keys2[j]] = $root.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig.toObject(message.synthesizeSpeechConfigs[keys2[j]], options); + } + return object; + }; /** - * Document content. - * @member {string|null|undefined} content - * @memberof google.cloud.dialogflow.v2beta1.Document + * Converts this TextToSpeechSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.TextToSpeechSettings * @instance + * @returns {Object.} JSON object */ - Document.prototype.content = null; + TextToSpeechSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextToSpeechSettings; + })(); + + v2beta1.ListEnvironmentsRequest = (function() { /** - * Document rawContent. - * @member {Uint8Array|null|undefined} rawContent - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken */ - Document.prototype.rawContent = null; /** - * Document enableAutoReload. - * @member {boolean} enableAutoReload - * @memberof google.cloud.dialogflow.v2beta1.Document - * @instance + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest=} [properties] Properties to set */ - Document.prototype.enableAutoReload = false; + function ListEnvironmentsRequest(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]]; + } /** - * Document latestReloadStatus. - * @member {google.cloud.dialogflow.v2beta1.Document.IReloadStatus|null|undefined} latestReloadStatus - * @memberof google.cloud.dialogflow.v2beta1.Document + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @instance */ - Document.prototype.latestReloadStatus = null; + ListEnvironmentsRequest.prototype.parent = ""; /** - * Document metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.Document + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @instance */ - Document.prototype.metadata = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListEnvironmentsRequest.prototype.pageSize = 0; /** - * Document source. - * @member {"contentUri"|"content"|"rawContent"|undefined} source - * @memberof google.cloud.dialogflow.v2beta1.Document + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @instance */ - Object.defineProperty(Document.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["contentUri", "content", "rawContent"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListEnvironmentsRequest.prototype.pageToken = ""; /** - * Creates a new Document instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDocument=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Document} Document instance + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ - Document.create = function create(properties) { - return new Document(properties); + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Document - * @static - * @param {google.cloud.dialogflow.v2beta1.IDocument} message Document message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Document.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.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); - if (message.knowledgeTypes != null && message.knowledgeTypes.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.knowledgeTypes.length; ++i) - writer.int32(message.knowledgeTypes[i]); - writer.ldelim(); - } - if (message.contentUri != null && Object.hasOwnProperty.call(message, "contentUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.contentUri); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.content); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); - if (message.rawContent != null && Object.hasOwnProperty.call(message, "rawContent")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.rawContent); - if (message.enableAutoReload != null && Object.hasOwnProperty.call(message, "enableAutoReload")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutoReload); - if (message.latestReloadStatus != null && Object.hasOwnProperty.call(message, "latestReloadStatus")) - $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.encode(message.latestReloadStatus, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.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 Document message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.verify|verify} messages. + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IDocument} message Document message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.Document} Document + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.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.v2beta1.Document(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest(); 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.mimeType = reader.string(); - break; - case 4: - if (!(message.knowledgeTypes && message.knowledgeTypes.length)) - message.knowledgeTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.knowledgeTypes.push(reader.int32()); - } else - message.knowledgeTypes.push(reader.int32()); - break; - case 5: - message.contentUri = reader.string(); - break; - case 6: - message.content = reader.string(); - break; - case 9: - message.rawContent = reader.bytes(); - break; - case 11: - message.enableAutoReload = reader.bool(); - break; - case 12: - message.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.decode(reader, reader.uint32()); - break; - case 7: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -134544,503 +136465,355 @@ }; /** - * Decodes a Document 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.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Document} Document + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies a ListEnvironmentsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + ListEnvironmentsRequest.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.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.knowledgeTypes != null && message.hasOwnProperty("knowledgeTypes")) { - if (!Array.isArray(message.knowledgeTypes)) - return "knowledgeTypes: array expected"; - for (var i = 0; i < message.knowledgeTypes.length; ++i) - switch (message.knowledgeTypes[i]) { - default: - return "knowledgeTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.contentUri != null && message.hasOwnProperty("contentUri")) { - properties.source = 1; - if (!$util.isString(message.contentUri)) - return "contentUri: string expected"; - } - if (message.content != null && message.hasOwnProperty("content")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.content)) - return "content: string expected"; - } - if (message.rawContent != null && message.hasOwnProperty("rawContent")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!(message.rawContent && typeof message.rawContent.length === "number" || $util.isString(message.rawContent))) - return "rawContent: buffer expected"; - } - if (message.enableAutoReload != null && message.hasOwnProperty("enableAutoReload")) - if (typeof message.enableAutoReload !== "boolean") - return "enableAutoReload: boolean expected"; - if (message.latestReloadStatus != null && message.hasOwnProperty("latestReloadStatus")) { - var error = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify(message.latestReloadStatus); - if (error) - return "latestReloadStatus." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k: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 Document 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.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Document} Document + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} ListEnvironmentsRequest */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Document) + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Document(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.knowledgeTypes) { - if (!Array.isArray(object.knowledgeTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.Document.knowledgeTypes: array expected"); - message.knowledgeTypes = []; - for (var i = 0; i < object.knowledgeTypes.length; ++i) - switch (object.knowledgeTypes[i]) { - default: - case "KNOWLEDGE_TYPE_UNSPECIFIED": - case 0: - message.knowledgeTypes[i] = 0; - break; - case "FAQ": - case 1: - message.knowledgeTypes[i] = 1; - break; - case "EXTRACTIVE_QA": - case 2: - message.knowledgeTypes[i] = 2; - break; - case "ARTICLE_SUGGESTION": - case 3: - message.knowledgeTypes[i] = 3; - break; - case "SMART_REPLY": - case 4: - message.knowledgeTypes[i] = 4; - break; - } - } - if (object.contentUri != null) - message.contentUri = String(object.contentUri); - if (object.content != null) - message.content = String(object.content); - if (object.rawContent != null) - if (typeof object.rawContent === "string") - $util.base64.decode(object.rawContent, message.rawContent = $util.newBuffer($util.base64.length(object.rawContent)), 0); - else if (object.rawContent.length) - message.rawContent = object.rawContent; - if (object.enableAutoReload != null) - message.enableAutoReload = Boolean(object.enableAutoReload); - if (object.latestReloadStatus != null) { - if (typeof object.latestReloadStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Document.latestReloadStatus: object expected"); - message.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.fromObject(object.latestReloadStatus); - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Document.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.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 a Document 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.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @static - * @param {google.cloud.dialogflow.v2beta1.Document} message Document + * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + ListEnvironmentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.knowledgeTypes = []; - if (options.objects || options.defaults) - object.metadata = {}; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.mimeType = ""; - object.enableAutoReload = false; - object.latestReloadStatus = 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.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.knowledgeTypes && message.knowledgeTypes.length) { - object.knowledgeTypes = []; - for (var j = 0; j < message.knowledgeTypes.length; ++j) - object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; - } - if (message.contentUri != null && message.hasOwnProperty("contentUri")) { - object.contentUri = message.contentUri; - if (options.oneofs) - object.source = "contentUri"; - } - if (message.content != null && message.hasOwnProperty("content")) { - object.content = message.content; - if (options.oneofs) - object.source = "content"; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.rawContent != null && message.hasOwnProperty("rawContent")) { - object.rawContent = options.bytes === String ? $util.base64.encode(message.rawContent, 0, message.rawContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawContent) : message.rawContent; - if (options.oneofs) - object.source = "rawContent"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.enableAutoReload != null && message.hasOwnProperty("enableAutoReload")) - object.enableAutoReload = message.enableAutoReload; - if (message.latestReloadStatus != null && message.hasOwnProperty("latestReloadStatus")) - object.latestReloadStatus = $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus.toObject(message.latestReloadStatus, 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 Document to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Document + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * KnowledgeType enum. - * @name google.cloud.dialogflow.v2beta1.Document.KnowledgeType - * @enum {number} - * @property {number} KNOWLEDGE_TYPE_UNSPECIFIED=0 KNOWLEDGE_TYPE_UNSPECIFIED value - * @property {number} FAQ=1 FAQ value - * @property {number} EXTRACTIVE_QA=2 EXTRACTIVE_QA value - * @property {number} ARTICLE_SUGGESTION=3 ARTICLE_SUGGESTION value - * @property {number} SMART_REPLY=4 SMART_REPLY value - */ - Document.KnowledgeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KNOWLEDGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FAQ"] = 1; - values[valuesById[2] = "EXTRACTIVE_QA"] = 2; - values[valuesById[3] = "ARTICLE_SUGGESTION"] = 3; - values[valuesById[4] = "SMART_REPLY"] = 4; - return values; - })(); - - Document.ReloadStatus = (function() { + return ListEnvironmentsRequest; + })(); - /** - * Properties of a ReloadStatus. - * @memberof google.cloud.dialogflow.v2beta1.Document - * @interface IReloadStatus - * @property {google.protobuf.ITimestamp|null} [time] ReloadStatus time - * @property {google.rpc.IStatus|null} [status] ReloadStatus status - */ + v2beta1.ListEnvironmentsResponse = (function() { - /** - * Constructs a new ReloadStatus. - * @memberof google.cloud.dialogflow.v2beta1.Document - * @classdesc Represents a ReloadStatus. - * @implements IReloadStatus - * @constructor - * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus=} [properties] Properties to set - */ - function ReloadStatus(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 ListEnvironmentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ - /** - * ReloadStatus time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @instance - */ - ReloadStatus.prototype.time = null; + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + 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]]; + } - /** - * ReloadStatus status. - * @member {google.rpc.IStatus|null|undefined} status - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @instance - */ - ReloadStatus.prototype.status = null; + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - /** - * Creates a new ReloadStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus instance - */ - ReloadStatus.create = function create(properties) { - return new ReloadStatus(properties); - }; + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified ReloadStatus message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus} message ReloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; - /** - * Encodes the specified ReloadStatus message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Document.ReloadStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {google.cloud.dialogflow.v2beta1.Document.IReloadStatus} message ReloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReloadStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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.v2beta1.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; + }; - /** - * Decodes a ReloadStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadStatus.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.v2beta1.Document.ReloadStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse(); + 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.v2beta1.Environment.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a ReloadStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReloadStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ReloadStatus message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReloadStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.rpc.Status.verify(message.status); + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @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) { + 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.v2beta1.Environment.verify(message.environments[i]); if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a ReloadStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} ReloadStatus - */ - ReloadStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.Document.ReloadStatus(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Document.ReloadStatus.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.Document.ReloadStatus.status: object expected"); - message.status = $root.google.rpc.Status.fromObject(object.status); + return "environments." + error; } - return message; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a ReloadStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @static - * @param {google.cloud.dialogflow.v2beta1.Document.ReloadStatus} message ReloadStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReloadStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.time = null; - object.status = null; - } - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.rpc.Status.toObject(message.status, options); + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) return object; - }; + var message = new $root.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dialogflow.v2beta1.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.v2beta1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Converts this ReloadStatus to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.Document.ReloadStatus - * @instance - * @returns {Object.} JSON object - */ - ReloadStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.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.v2beta1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return ReloadStatus; - })(); + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Document; + return ListEnvironmentsResponse; })(); - v2beta1.GetDocumentRequest = (function() { + v2beta1.GetEnvironmentRequest = (function() { /** - * Properties of a GetDocumentRequest. + * Properties of a GetEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IGetDocumentRequest - * @property {string|null} [name] GetDocumentRequest name + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name */ /** - * Constructs a new GetDocumentRequest. + * Constructs a new GetEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a GetDocumentRequest. - * @implements IGetDocumentRequest + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest=} [properties] Properties to set */ - function GetDocumentRequest(properties) { + function GetEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135048,35 +136821,35 @@ } /** - * GetDocumentRequest name. + * GetEnvironmentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @instance */ - GetDocumentRequest.prototype.name = ""; + GetEnvironmentRequest.prototype.name = ""; /** - * Creates a new GetDocumentRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest instance */ - GetDocumentRequest.create = function create(properties) { - return new GetDocumentRequest(properties); + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); }; /** - * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDocumentRequest.encode = function encode(message, writer) { + GetEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -135085,33 +136858,33 @@ }; /** - * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetDocumentRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.GetDocumentRequest} GetDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDocumentRequest.decode = function decode(reader, length) { + 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.v2beta1.GetDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -135127,30 +136900,30 @@ }; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDocumentRequest message. + * Verifies a GetEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDocumentRequest.verify = function verify(message) { + GetEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -135160,32 +136933,32 @@ }; /** - * Creates a GetDocumentRequest 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. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.GetDocumentRequest} GetDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} GetEnvironmentRequest */ - GetDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest) + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.GetDocumentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.GetDocumentRequest} message GetDocumentRequest + * @param {google.cloud.dialogflow.v2beta1.GetEnvironmentRequest} message GetEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDocumentRequest.toObject = function toObject(message, options) { + GetEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -135197,40 +136970,39 @@ }; /** - * Converts this GetDocumentRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.GetDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentRequest * @instance * @returns {Object.} JSON object */ - GetDocumentRequest.prototype.toJSON = function toJSON() { + GetEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDocumentRequest; + return GetEnvironmentRequest; })(); - v2beta1.ListDocumentsRequest = (function() { + v2beta1.CreateEnvironmentRequest = (function() { /** - * Properties of a ListDocumentsRequest. + * Properties of a CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListDocumentsRequest - * @property {string|null} [parent] ListDocumentsRequest parent - * @property {number|null} [pageSize] ListDocumentsRequest pageSize - * @property {string|null} [pageToken] ListDocumentsRequest pageToken - * @property {string|null} [filter] ListDocumentsRequest filter + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.dialogflow.v2beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId */ /** - * Constructs a new ListDocumentsRequest. + * Constructs a new CreateEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListDocumentsRequest. - * @implements IListDocumentsRequest + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest=} [properties] Properties to set */ - function ListDocumentsRequest(properties) { + function CreateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135238,100 +137010,90 @@ } /** - * ListDocumentsRequest parent. + * CreateEnvironmentRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.parent = ""; - - /** - * ListDocumentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @instance */ - ListDocumentsRequest.prototype.pageSize = 0; + CreateEnvironmentRequest.prototype.parent = ""; /** - * ListDocumentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * CreateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.v2beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @instance */ - ListDocumentsRequest.prototype.pageToken = ""; + CreateEnvironmentRequest.prototype.environment = null; /** - * ListDocumentsRequest filter. - * @member {string} filter - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * CreateEnvironmentRequest environmentId. + * @member {string} environmentId + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @instance */ - ListDocumentsRequest.prototype.filter = ""; + CreateEnvironmentRequest.prototype.environmentId = ""; /** - * Creates a new ListDocumentsRequest instance using the specified properties. + * Creates a new CreateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest instance + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ - ListDocumentsRequest.create = function create(properties) { - return new ListDocumentsRequest(properties); + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); }; /** - * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDocumentsRequest.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.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dialogflow.v2beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.environmentId); return writer; }; /** - * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsRequest.verify|verify} messages. + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer. + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsRequest.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.v2beta1.ListDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -135339,13 +137101,10 @@ message.parent = reader.string(); break; case 2: - message.pageSize = reader.int32(); + message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.decode(reader, reader.uint32()); break; case 3: - message.pageToken = reader.string(); - break; - case 4: - message.filter = reader.string(); + message.environmentId = reader.string(); break; default: reader.skipType(tag & 7); @@ -135356,134 +137115,131 @@ }; /** - * Decodes a ListDocumentsRequest 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.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsRequest.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 ListDocumentsRequest message. + * Verifies a CreateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDocumentsRequest.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.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.v2beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + if (!$util.isString(message.environmentId)) + return "environmentId: string expected"; return null; }; /** - * Creates a ListDocumentsRequest 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.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} CreateEnvironmentRequest */ - ListDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest) + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListDocumentsRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest(); 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.filter != null) - message.filter = String(object.filter); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environment); + } + if (object.environmentId != null) + message.environmentId = String(object.environmentId); return message; }; /** - * Creates a plain object from a ListDocumentsRequest 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.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListDocumentsRequest} message ListDocumentsRequest + * @param {google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDocumentsRequest.toObject = function toObject(message, options) { + CreateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.environment = null; + object.environmentId = ""; } 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.v2beta1.Environment.toObject(message.environment, options); + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + object.environmentId = message.environmentId; return object; }; /** - * Converts this ListDocumentsRequest to JSON. + * Converts this CreateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.CreateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListDocumentsRequest.prototype.toJSON = function toJSON() { + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDocumentsRequest; + return CreateEnvironmentRequest; })(); - v2beta1.ListDocumentsResponse = (function() { + v2beta1.UpdateEnvironmentRequest = (function() { /** - * Properties of a ListDocumentsResponse. + * Properties of an UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IListDocumentsResponse - * @property {Array.|null} [documents] ListDocumentsResponse documents - * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken + * @interface IUpdateEnvironmentRequest + * @property {google.cloud.dialogflow.v2beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @property {boolean|null} [allowLoadToDraftAndDiscardChanges] UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges */ /** - * Constructs a new ListDocumentsResponse. + * Constructs a new UpdateEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ListDocumentsResponse. - * @implements IListDocumentsResponse + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest=} [properties] Properties to set */ - function ListDocumentsResponse(properties) { - this.documents = []; + function UpdateEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135491,91 +137247,101 @@ } /** - * ListDocumentsResponse documents. - * @member {Array.} documents - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dialogflow.v2beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @instance */ - ListDocumentsResponse.prototype.documents = $util.emptyArray; + UpdateEnvironmentRequest.prototype.environment = null; /** - * ListDocumentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @instance */ - ListDocumentsResponse.prototype.nextPageToken = ""; + UpdateEnvironmentRequest.prototype.updateMask = null; /** - * Creates a new ListDocumentsResponse instance using the specified properties. + * UpdateEnvironmentRequest allowLoadToDraftAndDiscardChanges. + * @member {boolean} allowLoadToDraftAndDiscardChanges + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.allowLoadToDraftAndDiscardChanges = false; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ - ListDocumentsResponse.create = function create(properties) { - return new ListDocumentsResponse(properties); + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); }; /** - * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDocumentsResponse.encode = function encode(message, writer) { + UpdateEnvironmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.dialogflow.v2beta1.Document.encode(message.documents[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.v2beta1.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(); + if (message.allowLoadToDraftAndDiscardChanges != null && Object.hasOwnProperty.call(message, "allowLoadToDraftAndDiscardChanges")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowLoadToDraftAndDiscardChanges); return writer; }; /** - * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ListDocumentsResponse.verify|verify} messages. + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDocumentsResponse message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.ListDocumentsResponse} ListDocumentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsResponse.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.v2beta1.ListDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.dialogflow.v2beta1.Document.decode(reader, reader.uint32())); + message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.decode(reader, reader.uint32()); break; case 2: - message.nextPageToken = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.allowLoadToDraftAndDiscardChanges = reader.bool(); break; default: reader.skipType(tag & 7); @@ -135586,135 +137352,134 @@ }; /** - * Decodes a ListDocumentsResponse 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.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsResponse.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 ListDocumentsResponse message. + * Verifies an UpdateEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDocumentsResponse.verify = function verify(message) { + UpdateEnvironmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.documents[i]); - if (error) - return "documents." + error; - } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dialogflow.v2beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: 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.allowLoadToDraftAndDiscardChanges != null && message.hasOwnProperty("allowLoadToDraftAndDiscardChanges")) + if (typeof message.allowLoadToDraftAndDiscardChanges !== "boolean") + return "allowLoadToDraftAndDiscardChanges: boolean expected"; return null; }; /** - * Creates a ListDocumentsResponse 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.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} ListDocumentsResponse + * @returns {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ - ListDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse) + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ListDocumentsResponse(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ListDocumentsResponse.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ListDocumentsResponse.documents: object expected"); - message.documents[i] = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.documents[i]); - } + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest(); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dialogflow.v2beta1.Environment.fromObject(object.environment); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowLoadToDraftAndDiscardChanges != null) + message.allowLoadToDraftAndDiscardChanges = Boolean(object.allowLoadToDraftAndDiscardChanges); return message; }; /** - * Creates a plain object from a ListDocumentsResponse 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.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ListDocumentsResponse} message ListDocumentsResponse + * @param {google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDocumentsResponse.toObject = function toObject(message, options) { + UpdateEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.documents[j], options); + if (options.defaults) { + object.environment = null; + object.updateMask = null; + object.allowLoadToDraftAndDiscardChanges = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dialogflow.v2beta1.Environment.toObject(message.environment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowLoadToDraftAndDiscardChanges != null && message.hasOwnProperty("allowLoadToDraftAndDiscardChanges")) + object.allowLoadToDraftAndDiscardChanges = message.allowLoadToDraftAndDiscardChanges; return object; }; /** - * Converts this ListDocumentsResponse to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ListDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.UpdateEnvironmentRequest * @instance * @returns {Object.} JSON object */ - ListDocumentsResponse.prototype.toJSON = function toJSON() { + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDocumentsResponse; + return UpdateEnvironmentRequest; })(); - v2beta1.CreateDocumentRequest = (function() { + v2beta1.DeleteEnvironmentRequest = (function() { /** - * Properties of a CreateDocumentRequest. + * Properties of a DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface ICreateDocumentRequest - * @property {string|null} [parent] CreateDocumentRequest parent - * @property {google.cloud.dialogflow.v2beta1.IDocument|null} [document] CreateDocumentRequest document - * @property {boolean|null} [importGcsCustomMetadata] CreateDocumentRequest importGcsCustomMetadata + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name */ /** - * Constructs a new CreateDocumentRequest. + * Constructs a new DeleteEnvironmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a CreateDocumentRequest. - * @implements ICreateDocumentRequest + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest=} [properties] Properties to set */ - function CreateDocumentRequest(properties) { + function DeleteEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135722,101 +137487,75 @@ } /** - * CreateDocumentRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest - * @instance - */ - CreateDocumentRequest.prototype.parent = ""; - - /** - * CreateDocumentRequest document. - * @member {google.cloud.dialogflow.v2beta1.IDocument|null|undefined} document - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest - * @instance - */ - CreateDocumentRequest.prototype.document = null; - - /** - * CreateDocumentRequest importGcsCustomMetadata. - * @member {boolean} importGcsCustomMetadata - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @instance */ - CreateDocumentRequest.prototype.importGcsCustomMetadata = false; + DeleteEnvironmentRequest.prototype.name = ""; /** - * Creates a new CreateDocumentRequest instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ - CreateDocumentRequest.create = function create(properties) { - return new CreateDocumentRequest(properties); + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); }; /** - * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDocumentRequest.encode = function encode(message, writer) { + DeleteEnvironmentRequest.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.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.dialogflow.v2beta1.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.importGcsCustomMetadata); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CreateDocumentRequest.verify|verify} messages. + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDocumentRequest message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDocumentRequest.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.v2beta1.CreateDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.document = $root.google.cloud.dialogflow.v2beta1.Document.decode(reader, reader.uint32()); - break; - case 3: - message.importGcsCustomMetadata = reader.bool(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -135827,132 +137566,109 @@ }; /** - * Decodes a CreateDocumentRequest 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.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDocumentRequest.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 CreateDocumentRequest message. + * Verifies a DeleteEnvironmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDocumentRequest.verify = function verify(message) { + DeleteEnvironmentRequest.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.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.document); - if (error) - return "document." + error; - } - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - if (typeof message.importGcsCustomMetadata !== "boolean") - return "importGcsCustomMetadata: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateDocumentRequest 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.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ - CreateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest) + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.CreateDocumentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.CreateDocumentRequest.document: object expected"); - message.document = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.document); - } - if (object.importGcsCustomMetadata != null) - message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); + var message = new $root.google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateDocumentRequest 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.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.CreateDocumentRequest} message CreateDocumentRequest + * @param {google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDocumentRequest.toObject = function toObject(message, options) { + DeleteEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.document = null; - object.importGcsCustomMetadata = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.document, options); - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - object.importGcsCustomMetadata = message.importGcsCustomMetadata; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateDocumentRequest to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.CreateDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.DeleteEnvironmentRequest * @instance * @returns {Object.} JSON object */ - CreateDocumentRequest.prototype.toJSON = function toJSON() { + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDocumentRequest; + return DeleteEnvironmentRequest; })(); - v2beta1.ImportDocumentsRequest = (function() { + v2beta1.GetEnvironmentHistoryRequest = (function() { /** - * Properties of an ImportDocumentsRequest. + * Properties of a GetEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IImportDocumentsRequest - * @property {string|null} [parent] ImportDocumentsRequest parent - * @property {google.cloud.dialogflow.v2beta1.IGcsSources|null} [gcsSource] ImportDocumentsRequest gcsSource - * @property {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null} [documentTemplate] ImportDocumentsRequest documentTemplate - * @property {boolean|null} [importGcsCustomMetadata] ImportDocumentsRequest importGcsCustomMetadata + * @interface IGetEnvironmentHistoryRequest + * @property {string|null} [parent] GetEnvironmentHistoryRequest parent + * @property {number|null} [pageSize] GetEnvironmentHistoryRequest pageSize + * @property {string|null} [pageToken] GetEnvironmentHistoryRequest pageToken */ /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new GetEnvironmentHistoryRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an ImportDocumentsRequest. - * @implements IImportDocumentsRequest + * @classdesc Represents a GetEnvironmentHistoryRequest. + * @implements IGetEnvironmentHistoryRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest=} [properties] Properties to set */ - function ImportDocumentsRequest(properties) { + function GetEnvironmentHistoryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -135960,114 +137676,90 @@ } /** - * ImportDocumentsRequest parent. + * GetEnvironmentHistoryRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.parent = ""; - - /** - * ImportDocumentsRequest gcsSource. - * @member {google.cloud.dialogflow.v2beta1.IGcsSources|null|undefined} gcsSource - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.gcsSource = null; - - /** - * ImportDocumentsRequest documentTemplate. - * @member {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate|null|undefined} documentTemplate - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @instance */ - ImportDocumentsRequest.prototype.documentTemplate = null; + GetEnvironmentHistoryRequest.prototype.parent = ""; /** - * ImportDocumentsRequest importGcsCustomMetadata. - * @member {boolean} importGcsCustomMetadata - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * GetEnvironmentHistoryRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @instance */ - ImportDocumentsRequest.prototype.importGcsCustomMetadata = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GetEnvironmentHistoryRequest.prototype.pageSize = 0; /** - * ImportDocumentsRequest source. - * @member {"gcsSource"|undefined} source - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * GetEnvironmentHistoryRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @instance */ - Object.defineProperty(ImportDocumentsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetEnvironmentHistoryRequest.prototype.pageToken = ""; /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new GetEnvironmentHistoryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest instance */ - ImportDocumentsRequest.create = function create(properties) { - return new ImportDocumentsRequest(properties); + GetEnvironmentHistoryRequest.create = function create(properties) { + return new GetEnvironmentHistoryRequest(properties); }; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentHistoryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.dialogflow.v2beta1.GcsSources.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.documentTemplate != null && Object.hasOwnProperty.call(message, "documentTemplate")) - $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.encode(message.documentTemplate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.importGcsCustomMetadata); + GetEnvironmentHistoryRequest.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 ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentHistoryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentHistoryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decode = function decode(reader, length) { + GetEnvironmentHistoryRequest.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.v2beta1.ImportDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -136075,13 +137767,10 @@ message.parent = reader.string(); break; case 2: - message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; case 3: - message.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.decode(reader, reader.uint32()); - break; - case 4: - message.importGcsCustomMetadata = reader.bool(); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -136092,152 +137781,127 @@ }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentHistoryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + GetEnvironmentHistoryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsRequest message. + * Verifies a GetEnvironmentHistoryRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsRequest.verify = function verify(message) { + GetEnvironmentHistoryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.GcsSources.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.documentTemplate != null && message.hasOwnProperty("documentTemplate")) { - var error = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify(message.documentTemplate); - if (error) - return "documentTemplate." + error; - } - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - if (typeof message.importGcsCustomMetadata !== "boolean") - return "importGcsCustomMetadata: boolean 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 ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentHistoryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} GetEnvironmentHistoryRequest */ - ImportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest) + GetEnvironmentHistoryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentsRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.fromObject(object.gcsSource); - } - if (object.documentTemplate != null) { - if (typeof object.documentTemplate !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsRequest.documentTemplate: object expected"); - message.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.fromObject(object.documentTemplate); - } - if (object.importGcsCustomMetadata != null) - message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); + 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 ImportDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEnvironmentHistoryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest} message GetEnvironmentHistoryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsRequest.toObject = function toObject(message, options) { + GetEnvironmentHistoryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.documentTemplate = null; - object.importGcsCustomMetadata = false; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSources.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.documentTemplate != null && message.hasOwnProperty("documentTemplate")) - object.documentTemplate = $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.toObject(message.documentTemplate, options); - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - object.importGcsCustomMetadata = message.importGcsCustomMetadata; + 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 ImportDocumentsRequest to JSON. + * Converts this GetEnvironmentHistoryRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsRequest + * @memberof google.cloud.dialogflow.v2beta1.GetEnvironmentHistoryRequest * @instance * @returns {Object.} JSON object */ - ImportDocumentsRequest.prototype.toJSON = function toJSON() { + GetEnvironmentHistoryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportDocumentsRequest; + return GetEnvironmentHistoryRequest; })(); - v2beta1.ImportDocumentTemplate = (function() { + v2beta1.EnvironmentHistory = (function() { /** - * Properties of an ImportDocumentTemplate. + * Properties of an EnvironmentHistory. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IImportDocumentTemplate - * @property {string|null} [mimeType] ImportDocumentTemplate mimeType - * @property {Array.|null} [knowledgeTypes] ImportDocumentTemplate knowledgeTypes - * @property {Object.|null} [metadata] ImportDocumentTemplate metadata + * @interface IEnvironmentHistory + * @property {string|null} [parent] EnvironmentHistory parent + * @property {Array.|null} [entries] EnvironmentHistory entries + * @property {string|null} [nextPageToken] EnvironmentHistory nextPageToken */ /** - * Constructs a new ImportDocumentTemplate. + * Constructs a new EnvironmentHistory. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an ImportDocumentTemplate. - * @implements IImportDocumentTemplate + * @classdesc Represents an EnvironmentHistory. + * @implements IEnvironmentHistory * @constructor - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory=} [properties] Properties to set */ - function ImportDocumentTemplate(properties) { - this.knowledgeTypes = []; - this.metadata = {}; + function EnvironmentHistory(properties) { + this.entries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136245,132 +137909,104 @@ } /** - * ImportDocumentTemplate mimeType. - * @member {string} mimeType - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * EnvironmentHistory parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @instance */ - ImportDocumentTemplate.prototype.mimeType = ""; + EnvironmentHistory.prototype.parent = ""; /** - * ImportDocumentTemplate knowledgeTypes. - * @member {Array.} knowledgeTypes - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * EnvironmentHistory entries. + * @member {Array.} entries + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @instance */ - ImportDocumentTemplate.prototype.knowledgeTypes = $util.emptyArray; + EnvironmentHistory.prototype.entries = $util.emptyArray; /** - * ImportDocumentTemplate metadata. - * @member {Object.} metadata - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * EnvironmentHistory nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @instance */ - ImportDocumentTemplate.prototype.metadata = $util.emptyObject; + EnvironmentHistory.prototype.nextPageToken = ""; /** - * Creates a new ImportDocumentTemplate instance using the specified properties. + * Creates a new EnvironmentHistory instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate instance + * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory instance */ - ImportDocumentTemplate.create = function create(properties) { - return new ImportDocumentTemplate(properties); + EnvironmentHistory.create = function create(properties) { + return new EnvironmentHistory(properties); }; /** - * Encodes the specified ImportDocumentTemplate message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * Encodes the specified EnvironmentHistory message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate} message ImportDocumentTemplate message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory} message EnvironmentHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentTemplate.encode = function encode(message, writer) { + EnvironmentHistory.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.knowledgeTypes != null && message.knowledgeTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.knowledgeTypes.length; ++i) - writer.int32(message.knowledgeTypes[i]); - writer.ldelim(); - } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ImportDocumentTemplate message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.verify|verify} messages. + * Encodes the specified EnvironmentHistory message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentTemplate} message ImportDocumentTemplate message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IEnvironmentHistory} message EnvironmentHistory message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentTemplate.encodeDelimited = function encodeDelimited(message, writer) { + EnvironmentHistory.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentTemplate message from the specified reader or buffer. + * Decodes an EnvironmentHistory message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentTemplate.decode = function decode(reader, length) { + EnvironmentHistory.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.v2beta1.ImportDocumentTemplate(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mimeType = reader.string(); + message.parent = reader.string(); break; case 2: - if (!(message.knowledgeTypes && message.knowledgeTypes.length)) - message.knowledgeTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.knowledgeTypes.push(reader.int32()); - } else - message.knowledgeTypes.push(reader.int32()); + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.decode(reader, reader.uint32())); break; case 3: - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -136381,389 +138017,485 @@ }; /** - * Decodes an ImportDocumentTemplate message from the specified reader or buffer, length delimited. + * Decodes an EnvironmentHistory message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentTemplate.decodeDelimited = function decodeDelimited(reader) { + EnvironmentHistory.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentTemplate message. + * Verifies an EnvironmentHistory message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentTemplate.verify = function verify(message) { + EnvironmentHistory.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.knowledgeTypes != null && message.hasOwnProperty("knowledgeTypes")) { - if (!Array.isArray(message.knowledgeTypes)) - return "knowledgeTypes: array expected"; - for (var i = 0; i < message.knowledgeTypes.length; ++i) - switch (message.knowledgeTypes[i]) { - default: - return "knowledgeTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify(message.entries[i]); + if (error) + return "entries." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an ImportDocumentTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an EnvironmentHistory message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} ImportDocumentTemplate + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory} EnvironmentHistory */ - ImportDocumentTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate) + EnvironmentHistory.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentTemplate(); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.knowledgeTypes) { - if (!Array.isArray(object.knowledgeTypes)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.knowledgeTypes: array expected"); - message.knowledgeTypes = []; - for (var i = 0; i < object.knowledgeTypes.length; ++i) - switch (object.knowledgeTypes[i]) { - default: - case "KNOWLEDGE_TYPE_UNSPECIFIED": - case 0: - message.knowledgeTypes[i] = 0; - break; - case "FAQ": + var message = new $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.entries: object expected"); + message.entries[i] = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.fromObject(object.entries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from an EnvironmentHistory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @static + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory} message EnvironmentHistory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentHistory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.parent = ""; + object.nextPageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.toObject(message.entries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this EnvironmentHistory to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @instance + * @returns {Object.} JSON object + */ + EnvironmentHistory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnvironmentHistory.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @interface IEntry + * @property {string|null} [agentVersion] Entry agentVersion + * @property {string|null} [description] Entry description + * @property {google.protobuf.ITimestamp|null} [createTime] Entry createTime + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry=} [properties] Properties to set + */ + function Entry(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]]; + } + + /** + * Entry agentVersion. + * @member {string} agentVersion + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @instance + */ + Entry.prototype.agentVersion = ""; + + /** + * Entry description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @instance + */ + Entry.prototype.description = ""; + + /** + * Entry createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @instance + */ + Entry.prototype.createTime = null; + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agentVersion != null && Object.hasOwnProperty.call(message, "agentVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentVersion); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.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.v2beta1.EnvironmentHistory.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { case 1: - message.knowledgeTypes[i] = 1; + message.agentVersion = reader.string(); break; - case "EXTRACTIVE_QA": case 2: - message.knowledgeTypes[i] = 2; + message.description = reader.string(); break; - case "ARTICLE_SUGGESTION": case 3: - message.knowledgeTypes[i] = 3; + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case "SMART_REPLY": - case 4: - message.knowledgeTypes[i] = 4; + default: + reader.skipType(tag & 7); break; } - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentTemplate.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an ImportDocumentTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate - * @static - * @param {google.cloud.dialogflow.v2beta1.ImportDocumentTemplate} message ImportDocumentTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportDocumentTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.knowledgeTypes = []; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) - object.mimeType = ""; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.knowledgeTypes && message.knowledgeTypes.length) { - object.knowledgeTypes = []; - for (var j = 0; j < message.knowledgeTypes.length; ++j) - object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; - } - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - return object; - }; + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this ImportDocumentTemplate to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentTemplate - * @instance - * @returns {Object.} JSON object - */ - ImportDocumentTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) + if (!$util.isString(message.agentVersion)) + return "agentVersion: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; - return ImportDocumentTemplate; - })(); + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry(); + if (object.agentVersion != null) + message.agentVersion = String(object.agentVersion); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; - v2beta1.ImportDocumentsResponse = (function() { + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @static + * @param {google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.agentVersion = ""; + object.description = ""; + object.createTime = null; + } + if (message.agentVersion != null && message.hasOwnProperty("agentVersion")) + object.agentVersion = message.agentVersion; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; - /** - * Properties of an ImportDocumentsResponse. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IImportDocumentsResponse - * @property {Array.|null} [warnings] ImportDocumentsResponse warnings - */ + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.EnvironmentHistory.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Entry; + })(); + + return EnvironmentHistory; + })(); + + v2beta1.Fulfillments = (function() { /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new Fulfillments service. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an ImportDocumentsResponse. - * @implements IImportDocumentsResponse + * @classdesc Represents a Fulfillments + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse=} [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 ImportDocumentsResponse(properties) { - this.warnings = []; - 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 Fulfillments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * ImportDocumentsResponse warnings. - * @member {Array.} warnings - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @instance - */ - ImportDocumentsResponse.prototype.warnings = $util.emptyArray; + (Fulfillments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Fulfillments; /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates new Fulfillments service using the specified rpc implementation. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse instance - */ - ImportDocumentsResponse.create = function create(properties) { - return new ImportDocumentsResponse(properties); - }; - - /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportDocumentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.warnings != null && message.warnings.length) - for (var i = 0; i < message.warnings.length; ++i) - $root.google.rpc.Status.encode(message.warnings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments * @static - * @param {google.cloud.dialogflow.v2beta1.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * @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 {Fulfillments} RPC service. Useful where requests and/or responses are streamed. */ - ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Fulfillments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse - * @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.v2beta1.Fulfillments#getFulfillment}. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments + * @typedef GetFulfillmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Fulfillment} [response] Fulfillment */ - ImportDocumentsResponse.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.v2beta1.ImportDocumentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.warnings && message.warnings.length)) - message.warnings = []; - message.warnings.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetFulfillment. + * @function getFulfillment + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} request GetFulfillmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Fulfillments.GetFulfillmentCallback} callback Node-style callback called with the error, if any, and Fulfillment + * @returns {undefined} + * @variation 1 */ - ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Fulfillments.prototype.getFulfillment = function getFulfillment(request, callback) { + return this.rpcCall(getFulfillment, $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest, $root.google.cloud.dialogflow.v2beta1.Fulfillment, request, callback); + }, "name", { value: "GetFulfillment" }); /** - * Verifies an ImportDocumentsResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetFulfillment. + * @function getFulfillment + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} request GetFulfillmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImportDocumentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.warnings != null && message.hasOwnProperty("warnings")) { - if (!Array.isArray(message.warnings)) - return "warnings: array expected"; - for (var i = 0; i < message.warnings.length; ++i) { - var error = $root.google.rpc.Status.verify(message.warnings[i]); - if (error) - return "warnings." + error; - } - } - return null; - }; /** - * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} ImportDocumentsResponse + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Fulfillments#updateFulfillment}. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments + * @typedef UpdateFulfillmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.Fulfillment} [response] Fulfillment */ - ImportDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ImportDocumentsResponse) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ImportDocumentsResponse(); - if (object.warnings) { - if (!Array.isArray(object.warnings)) - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.warnings: array expected"); - message.warnings = []; - for (var i = 0; i < object.warnings.length; ++i) { - if (typeof object.warnings[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ImportDocumentsResponse.warnings: object expected"); - message.warnings[i] = $root.google.rpc.Status.fromObject(object.warnings[i]); - } - } - return message; - }; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse - * @static - * @param {google.cloud.dialogflow.v2beta1.ImportDocumentsResponse} message ImportDocumentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateFulfillment. + * @function updateFulfillment + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments + * @instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} request UpdateFulfillmentRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Fulfillments.UpdateFulfillmentCallback} callback Node-style callback called with the error, if any, and Fulfillment + * @returns {undefined} + * @variation 1 */ - ImportDocumentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.warnings = []; - if (message.warnings && message.warnings.length) { - object.warnings = []; - for (var j = 0; j < message.warnings.length; ++j) - object.warnings[j] = $root.google.rpc.Status.toObject(message.warnings[j], options); - } - return object; - }; + Object.defineProperty(Fulfillments.prototype.updateFulfillment = function updateFulfillment(request, callback) { + return this.rpcCall(updateFulfillment, $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest, $root.google.cloud.dialogflow.v2beta1.Fulfillment, request, callback); + }, "name", { value: "UpdateFulfillment" }); /** - * Converts this ImportDocumentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ImportDocumentsResponse + * Calls UpdateFulfillment. + * @function updateFulfillment + * @memberof google.cloud.dialogflow.v2beta1.Fulfillments * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} request UpdateFulfillmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ImportDocumentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return ImportDocumentsResponse; + return Fulfillments; })(); - v2beta1.DeleteDocumentRequest = (function() { + v2beta1.Fulfillment = (function() { /** - * Properties of a DeleteDocumentRequest. + * Properties of a Fulfillment. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IDeleteDocumentRequest - * @property {string|null} [name] DeleteDocumentRequest name + * @interface IFulfillment + * @property {string|null} [name] Fulfillment name + * @property {string|null} [displayName] Fulfillment displayName + * @property {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null} [genericWebService] Fulfillment genericWebService + * @property {boolean|null} [enabled] Fulfillment enabled + * @property {Array.|null} [features] Fulfillment features */ /** - * Constructs a new DeleteDocumentRequest. + * Constructs a new Fulfillment. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a DeleteDocumentRequest. - * @implements IDeleteDocumentRequest + * @classdesc Represents a Fulfillment. + * @implements IFulfillment * @constructor - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IFulfillment=} [properties] Properties to set */ - function DeleteDocumentRequest(properties) { + function Fulfillment(properties) { + this.features = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -136771,76 +138503,145 @@ } /** - * DeleteDocumentRequest name. + * Fulfillment name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @instance */ - DeleteDocumentRequest.prototype.name = ""; + Fulfillment.prototype.name = ""; /** - * Creates a new DeleteDocumentRequest instance using the specified properties. + * Fulfillment displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.displayName = ""; + + /** + * Fulfillment genericWebService. + * @member {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService|null|undefined} genericWebService + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.genericWebService = null; + + /** + * Fulfillment enabled. + * @member {boolean} enabled + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.enabled = false; + + /** + * Fulfillment features. + * @member {Array.} features + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @instance + */ + Fulfillment.prototype.features = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Fulfillment fulfillment. + * @member {"genericWebService"|undefined} fulfillment + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @instance + */ + Object.defineProperty(Fulfillment.prototype, "fulfillment", { + get: $util.oneOfGetter($oneOfFields = ["genericWebService"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Fulfillment instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IFulfillment=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment instance */ - DeleteDocumentRequest.create = function create(properties) { - return new DeleteDocumentRequest(properties); + Fulfillment.create = function create(properties) { + return new Fulfillment(properties); }; /** - * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. + * Encodes the specified Fulfillment message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDocumentRequest.encode = function encode(message, writer) { + Fulfillment.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.v2beta1.Fulfillment.GenericWebService.encode(message.genericWebService, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enabled); + if (message.features != null && message.features.length) + for (var i = 0; i < message.features.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.encode(message.features[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.DeleteDocumentRequest.verify|verify} messages. + * Encodes the specified Fulfillment message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.v2beta1.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IFulfillment} message Fulfillment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + Fulfillment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer. + * Decodes a Fulfillment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.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.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDocumentRequest.decode = function decode(reader, length) { + 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.v2beta1.DeleteDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment(); 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.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.decode(reader, reader.uint32()); + break; + case 4: + message.enabled = reader.bool(); + break; + case 5: + if (!(message.features && message.features.length)) + message.features = []; + message.features.push($root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -136850,580 +138651,695 @@ }; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a Fulfillment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + Fulfillment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDocumentRequest message. + * Verifies a Fulfillment message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDocumentRequest.verify = function verify(message) { + Fulfillment.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.fulfillment = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify(message.genericWebService); + if (error) + return "genericWebService." + error; + } + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + if (!Array.isArray(message.features)) + return "features: array expected"; + for (var i = 0; i < message.features.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify(message.features[i]); + if (error) + return "features." + error; + } + } return null; }; /** - * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Fulfillment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment} Fulfillment */ - DeleteDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest) + Fulfillment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment(); 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.v2beta1.Fulfillment.genericWebService: object expected"); + message.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.fromObject(object.genericWebService); + } + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.features) { + if (!Array.isArray(object.features)) + throw TypeError(".google.cloud.dialogflow.v2beta1.Fulfillment.features: array expected"); + message.features = []; + for (var i = 0; i < object.features.length; ++i) { + if (typeof object.features[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.Fulfillment.features: object expected"); + message.features[i] = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.fromObject(object.features[i]); + } + } return message; }; /** - * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a Fulfillment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @static - * @param {google.cloud.dialogflow.v2beta1.DeleteDocumentRequest} message DeleteDocumentRequest + * @param {google.cloud.dialogflow.v2beta1.Fulfillment} message Fulfillment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDocumentRequest.toObject = function toObject(message, options) { + Fulfillment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.features = []; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.enabled = 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.genericWebService != null && message.hasOwnProperty("genericWebService")) { + object.genericWebService = $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.toObject(message.genericWebService, options); + if (options.oneofs) + object.fulfillment = "genericWebService"; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.features && message.features.length) { + object.features = []; + for (var j = 0; j < message.features.length; ++j) + object.features[j] = $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.toObject(message.features[j], options); + } return object; }; /** - * Converts this DeleteDocumentRequest to JSON. + * Converts this Fulfillment to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.DeleteDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment * @instance * @returns {Object.} JSON object */ - DeleteDocumentRequest.prototype.toJSON = function toJSON() { + Fulfillment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDocumentRequest; - })(); + Fulfillment.GenericWebService = (function() { - v2beta1.UpdateDocumentRequest = (function() { + /** + * Properties of a GenericWebService. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @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 + * @property {boolean|null} [isCloudFunction] GenericWebService isCloudFunction + */ - /** - * Properties of an UpdateDocumentRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IUpdateDocumentRequest - * @property {google.cloud.dialogflow.v2beta1.IDocument|null} [document] UpdateDocumentRequest document - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDocumentRequest updateMask - */ + /** + * Constructs a new GenericWebService. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @classdesc Represents a GenericWebService. + * @implements IGenericWebService + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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]]; + } - /** - * Constructs a new UpdateDocumentRequest. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents an UpdateDocumentRequest. - * @implements IUpdateDocumentRequest - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest=} [properties] Properties to set - */ - function UpdateDocumentRequest(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]]; - } + /** + * GenericWebService uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + */ + GenericWebService.prototype.uri = ""; - /** - * UpdateDocumentRequest document. - * @member {google.cloud.dialogflow.v2beta1.IDocument|null|undefined} document - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @instance - */ - UpdateDocumentRequest.prototype.document = null; + /** + * GenericWebService username. + * @member {string} username + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + */ + GenericWebService.prototype.username = ""; - /** - * UpdateDocumentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @instance - */ - UpdateDocumentRequest.prototype.updateMask = null; + /** + * GenericWebService password. + * @member {string} password + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + */ + GenericWebService.prototype.password = ""; - /** - * Creates a new UpdateDocumentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest instance - */ - UpdateDocumentRequest.create = function create(properties) { - return new UpdateDocumentRequest(properties); - }; + /** + * GenericWebService requestHeaders. + * @member {Object.} requestHeaders + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + */ + GenericWebService.prototype.requestHeaders = $util.emptyObject; - /** - * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDocumentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.dialogflow.v2beta1.Document.encode(message.document, 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; - }; + /** + * GenericWebService isCloudFunction. + * @member {boolean} isCloudFunction + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + */ + GenericWebService.prototype.isCloudFunction = false; - /** - * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new GenericWebService instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IGenericWebService=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService} GenericWebService instance + */ + GenericWebService.create = function create(properties) { + return new GenericWebService(properties); + }; - /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDocumentRequest.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.v2beta1.UpdateDocumentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.document = $root.google.cloud.dialogflow.v2beta1.Document.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; - }; + /** + * Encodes the specified GenericWebService message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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(); + if (message.isCloudFunction != null && Object.hasOwnProperty.call(message, "isCloudFunction")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isCloudFunction); + return writer; + }; - /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified GenericWebService message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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(); + }; - /** - * Verifies an UpdateDocumentRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDocumentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.dialogflow.v2beta1.Document.verify(message.document); - if (error) - return "document." + 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 GenericWebService message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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; + case 5: + message.isCloudFunction = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} UpdateDocumentRequest - */ - UpdateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest(); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.document: object expected"); - message.document = $root.google.cloud.dialogflow.v2beta1.Document.fromObject(object.document); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateDocumentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * Decodes a GenericWebService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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"; + } + if (message.isCloudFunction != null && message.hasOwnProperty("isCloudFunction")) + if (typeof message.isCloudFunction !== "boolean") + return "isCloudFunction: boolean expected"; + return null; + }; - /** - * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @static - * @param {google.cloud.dialogflow.v2beta1.UpdateDocumentRequest} message UpdateDocumentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDocumentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.document = null; - object.updateMask = null; - } - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.dialogflow.v2beta1.Document.toObject(message.document, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Creates a GenericWebService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService} GenericWebService + */ + GenericWebService.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment.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.v2beta1.Fulfillment.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]]); + } + if (object.isCloudFunction != null) + message.isCloudFunction = Boolean(object.isCloudFunction); + return message; + }; - /** - * Converts this UpdateDocumentRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.UpdateDocumentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDocumentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GenericWebService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.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 = ""; + object.isCloudFunction = false; + } + 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]]; + } + if (message.isCloudFunction != null && message.hasOwnProperty("isCloudFunction")) + object.isCloudFunction = message.isCloudFunction; + return object; + }; - return UpdateDocumentRequest; - })(); + /** + * Converts this GenericWebService to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.GenericWebService + * @instance + * @returns {Object.} JSON object + */ + GenericWebService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v2beta1.KnowledgeOperationMetadata = (function() { + return GenericWebService; + })(); - /** - * Properties of a KnowledgeOperationMetadata. - * @memberof google.cloud.dialogflow.v2beta1 - * @interface IKnowledgeOperationMetadata - * @property {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State|null} [state] KnowledgeOperationMetadata state - * @property {string|null} [knowledgeBase] KnowledgeOperationMetadata knowledgeBase - */ + Fulfillment.Feature = (function() { - /** - * Constructs a new KnowledgeOperationMetadata. - * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a KnowledgeOperationMetadata. - * @implements IKnowledgeOperationMetadata - * @constructor - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata=} [properties] Properties to set - */ - function KnowledgeOperationMetadata(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 Feature. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @interface IFeature + * @property {google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type|null} [type] Feature type + */ - /** - * KnowledgeOperationMetadata state. - * @member {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State} state - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @instance - */ - KnowledgeOperationMetadata.prototype.state = 0; + /** + * Constructs a new Feature. + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment + * @classdesc Represents a Feature. + * @implements IFeature + * @constructor + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature=} [properties] Properties to set + */ + function Feature(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]]; + } - /** - * KnowledgeOperationMetadata knowledgeBase. - * @member {string} knowledgeBase - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @instance - */ - KnowledgeOperationMetadata.prototype.knowledgeBase = ""; + /** + * Feature type. + * @member {google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type} type + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @instance + */ + Feature.prototype.type = 0; - /** - * Creates a new KnowledgeOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata instance - */ - KnowledgeOperationMetadata.create = function create(properties) { - return new KnowledgeOperationMetadata(properties); - }; + /** + * Creates a new Feature instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature instance + */ + Feature.create = function create(properties) { + return new Feature(properties); + }; - /** - * Encodes the specified KnowledgeOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata} message KnowledgeOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.knowledgeBase != null && Object.hasOwnProperty.call(message, "knowledgeBase")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.knowledgeBase); - return writer; - }; + /** + * Encodes the specified Feature message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature} message Feature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feature.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); + return writer; + }; - /** - * Encodes the specified KnowledgeOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2beta1.IKnowledgeOperationMetadata} message KnowledgeOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.Fulfillment.Feature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.IFeature} message Feature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeOperationMetadata.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.v2beta1.KnowledgeOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 3: - message.knowledgeBase = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; + /** + * Decodes a Feature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feature.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.v2beta1.Fulfillment.Feature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } } - } - return message; - }; + return message; + }; - /** - * Decodes a KnowledgeOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Feature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a KnowledgeOperationMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; + /** + * Verifies a Feature message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Feature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} Feature + */ + Feature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature(); + switch (object.type) { + case "TYPE_UNSPECIFIED": case 0: + message.type = 0; + break; + case "SMALLTALK": case 1: - case 2: - case 3: + message.type = 1; break; } - if (message.knowledgeBase != null && message.hasOwnProperty("knowledgeBase")) - if (!$util.isString(message.knowledgeBase)) - return "knowledgeBase: string expected"; - return null; - }; + return message; + }; - /** - * Creates a KnowledgeOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} KnowledgeOperationMetadata - */ - KnowledgeOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata) + /** + * Creates a plain object from a Feature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @static + * @param {google.cloud.dialogflow.v2beta1.Fulfillment.Feature} message Feature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type[message.type] : message.type; return object; - var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "DONE": - case 3: - message.state = 3; - break; - } - if (object.knowledgeBase != null) - message.knowledgeBase = String(object.knowledgeBase); - return message; - }; - - /** - * Creates a plain object from a KnowledgeOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata} message KnowledgeOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.knowledgeBase = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State[message.state] : message.state; - if (message.knowledgeBase != null && message.hasOwnProperty("knowledgeBase")) - object.knowledgeBase = message.knowledgeBase; - return object; - }; + }; - /** - * Converts this KnowledgeOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - KnowledgeOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Feature to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.Fulfillment.Feature + * @instance + * @returns {Object.} JSON object + */ + Feature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * State enum. - * @name google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} DONE=3 DONE value - */ - KnowledgeOperationMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "DONE"] = 3; - return values; + /** + * Type enum. + * @name google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SMALLTALK=1 SMALLTALK value + */ + Feature.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SMALLTALK"] = 1; + return values; + })(); + + return Feature; })(); - return KnowledgeOperationMetadata; + return Fulfillment; })(); - v2beta1.ReloadDocumentRequest = (function() { + v2beta1.GetFulfillmentRequest = (function() { /** - * Properties of a ReloadDocumentRequest. + * Properties of a GetFulfillmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IReloadDocumentRequest - * @property {string|null} [name] ReloadDocumentRequest name - * @property {google.cloud.dialogflow.v2beta1.IGcsSource|null} [gcsSource] ReloadDocumentRequest gcsSource - * @property {boolean|null} [importGcsCustomMetadata] ReloadDocumentRequest importGcsCustomMetadata + * @interface IGetFulfillmentRequest + * @property {string|null} [name] GetFulfillmentRequest name */ /** - * Constructs a new ReloadDocumentRequest. + * Constructs a new GetFulfillmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ReloadDocumentRequest. - * @implements IReloadDocumentRequest + * @classdesc Represents a GetFulfillmentRequest. + * @implements IGetFulfillmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest=} [properties] Properties to set */ - function ReloadDocumentRequest(properties) { + function GetFulfillmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137431,116 +139347,76 @@ } /** - * ReloadDocumentRequest name. + * GetFulfillmentRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest - * @instance - */ - ReloadDocumentRequest.prototype.name = ""; - - /** - * ReloadDocumentRequest gcsSource. - * @member {google.cloud.dialogflow.v2beta1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest - * @instance - */ - ReloadDocumentRequest.prototype.gcsSource = null; - - /** - * ReloadDocumentRequest importGcsCustomMetadata. - * @member {boolean} importGcsCustomMetadata - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest - * @instance - */ - ReloadDocumentRequest.prototype.importGcsCustomMetadata = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ReloadDocumentRequest source. - * @member {"gcsSource"|undefined} source - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @instance */ - Object.defineProperty(ReloadDocumentRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetFulfillmentRequest.prototype.name = ""; /** - * Creates a new ReloadDocumentRequest instance using the specified properties. + * Creates a new GetFulfillmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest instance + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest instance */ - ReloadDocumentRequest.create = function create(properties) { - return new ReloadDocumentRequest(properties); + GetFulfillmentRequest.create = function create(properties) { + return new GetFulfillmentRequest(properties); }; /** - * Encodes the specified ReloadDocumentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. + * Encodes the specified GetFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} message ReloadDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} message GetFulfillmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadDocumentRequest.encode = function encode(message, writer) { + GetFulfillmentRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.dialogflow.v2beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.importGcsCustomMetadata != null && Object.hasOwnProperty.call(message, "importGcsCustomMetadata")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.importGcsCustomMetadata); return writer; }; /** - * Encodes the specified ReloadDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.verify|verify} messages. + * Encodes the specified GetFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GetFulfillmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IReloadDocumentRequest} message ReloadDocumentRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGetFulfillmentRequest} message GetFulfillmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReloadDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetFulfillmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReloadDocumentRequest message from the specified reader or buffer. + * Decodes a GetFulfillmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadDocumentRequest.decode = function decode(reader, length) { + GetFulfillmentRequest.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.v2beta1.ReloadDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 3: - message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.decode(reader, reader.uint32()); - break; - case 4: - message.importGcsCustomMetadata = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -137550,138 +139426,108 @@ }; /** - * Decodes a ReloadDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFulfillmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReloadDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + GetFulfillmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReloadDocumentRequest message. + * Verifies a GetFulfillmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReloadDocumentRequest.verify = function verify(message) { + GetFulfillmentRequest.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.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - if (typeof message.importGcsCustomMetadata !== "boolean") - return "importGcsCustomMetadata: boolean expected"; return null; }; /** - * Creates a ReloadDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFulfillmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} ReloadDocumentRequest + * @returns {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} GetFulfillmentRequest */ - ReloadDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest) + GetFulfillmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest(); + var message = new $root.google.cloud.dialogflow.v2beta1.GetFulfillmentRequest(); if (object.name != null) message.name = String(object.name); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.fromObject(object.gcsSource); - } - if (object.importGcsCustomMetadata != null) - message.importGcsCustomMetadata = Boolean(object.importGcsCustomMetadata); return message; }; /** - * Creates a plain object from a ReloadDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetFulfillmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ReloadDocumentRequest} message ReloadDocumentRequest + * @param {google.cloud.dialogflow.v2beta1.GetFulfillmentRequest} message GetFulfillmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReloadDocumentRequest.toObject = function toObject(message, options) { + GetFulfillmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.importGcsCustomMetadata = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.dialogflow.v2beta1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.importGcsCustomMetadata != null && message.hasOwnProperty("importGcsCustomMetadata")) - object.importGcsCustomMetadata = message.importGcsCustomMetadata; return object; }; /** - * Converts this ReloadDocumentRequest to JSON. + * Converts this GetFulfillmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ReloadDocumentRequest + * @memberof google.cloud.dialogflow.v2beta1.GetFulfillmentRequest * @instance * @returns {Object.} JSON object */ - ReloadDocumentRequest.prototype.toJSON = function toJSON() { + GetFulfillmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ReloadDocumentRequest; + return GetFulfillmentRequest; })(); - v2beta1.ConversationEvent = (function() { + v2beta1.UpdateFulfillmentRequest = (function() { /** - * Properties of a ConversationEvent. + * Properties of an UpdateFulfillmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IConversationEvent - * @property {string|null} [conversation] ConversationEvent conversation - * @property {google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null} [type] ConversationEvent type - * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus - * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload + * @interface IUpdateFulfillmentRequest + * @property {google.cloud.dialogflow.v2beta1.IFulfillment|null} [fulfillment] UpdateFulfillmentRequest fulfillment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFulfillmentRequest updateMask */ /** - * Constructs a new ConversationEvent. + * Constructs a new UpdateFulfillmentRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ConversationEvent. - * @implements IConversationEvent + * @classdesc Represents an UpdateFulfillmentRequest. + * @implements IUpdateFulfillmentRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest=} [properties] Properties to set */ - function ConversationEvent(properties) { + function UpdateFulfillmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -137689,128 +139535,88 @@ } /** - * ConversationEvent conversation. - * @member {string} conversation - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent - * @instance - */ - ConversationEvent.prototype.conversation = ""; - - /** - * ConversationEvent type. - * @member {google.cloud.dialogflow.v2beta1.ConversationEvent.Type} type - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent - * @instance - */ - ConversationEvent.prototype.type = 0; - - /** - * ConversationEvent errorStatus. - * @member {google.rpc.IStatus|null|undefined} errorStatus - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent - * @instance - */ - ConversationEvent.prototype.errorStatus = null; - - /** - * ConversationEvent newMessagePayload. - * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} newMessagePayload - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * UpdateFulfillmentRequest fulfillment. + * @member {google.cloud.dialogflow.v2beta1.IFulfillment|null|undefined} fulfillment + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @instance */ - ConversationEvent.prototype.newMessagePayload = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateFulfillmentRequest.prototype.fulfillment = null; /** - * ConversationEvent payload. - * @member {"newMessagePayload"|undefined} payload - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * UpdateFulfillmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @instance */ - Object.defineProperty(ConversationEvent.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateFulfillmentRequest.prototype.updateMask = null; /** - * Creates a new ConversationEvent instance using the specified properties. + * Creates a new UpdateFulfillmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent instance + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest instance */ - ConversationEvent.create = function create(properties) { - return new ConversationEvent(properties); + UpdateFulfillmentRequest.create = function create(properties) { + return new UpdateFulfillmentRequest(properties); }; /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * Encodes the specified UpdateFulfillmentRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} message UpdateFulfillmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationEvent.encode = function encode(message, writer) { + UpdateFulfillmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) - $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) - $root.google.cloud.dialogflow.v2beta1.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fulfillment != null && Object.hasOwnProperty.call(message, "fulfillment")) + $root.google.cloud.dialogflow.v2beta1.Fulfillment.encode(message.fulfillment, 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 ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * Encodes the specified UpdateFulfillmentRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IUpdateFulfillmentRequest} message UpdateFulfillmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { + UpdateFulfillmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationEvent message from the specified reader or buffer. + * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationEvent.decode = function decode(reader, length) { + UpdateFulfillmentRequest.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.v2beta1.ConversationEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.conversation = reader.string(); + message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.decode(reader, reader.uint32()); break; case 2: - message.type = reader.int32(); - break; - case 3: - message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 4: - message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -137821,176 +139627,106 @@ }; /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateFulfillmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationEvent.decodeDelimited = function decodeDelimited(reader) { + UpdateFulfillmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationEvent message. + * Verifies an UpdateFulfillmentRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationEvent.verify = function verify(message) { + UpdateFulfillmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.conversation != null && message.hasOwnProperty("conversation")) - if (!$util.isString(message.conversation)) - return "conversation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 5: - case 4: - break; - } - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { - var error = $root.google.rpc.Status.verify(message.errorStatus); + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) { + var error = $root.google.cloud.dialogflow.v2beta1.Fulfillment.verify(message.fulfillment); if (error) - return "errorStatus." + error; + return "fulfillment." + error; } - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - properties.payload = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.newMessagePayload); - if (error) - return "newMessagePayload." + 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 ConversationEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFulfillmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} UpdateFulfillmentRequest */ - ConversationEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationEvent) + UpdateFulfillmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); - if (object.conversation != null) - message.conversation = String(object.conversation); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONVERSATION_STARTED": - case 1: - message.type = 1; - break; - case "CONVERSATION_FINISHED": - case 2: - message.type = 2; - break; - case "NEW_MESSAGE": - case 5: - message.type = 5; - break; - case "UNRECOVERABLE_ERROR": - case 4: - message.type = 4; - break; - } - if (object.errorStatus != null) { - if (typeof object.errorStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.errorStatus: object expected"); - message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + var message = new $root.google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest(); + if (object.fulfillment != null) { + if (typeof object.fulfillment !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.fulfillment: object expected"); + message.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.fromObject(object.fulfillment); } - if (object.newMessagePayload != null) { - if (typeof object.newMessagePayload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.newMessagePayload: object expected"); - message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.newMessagePayload); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * Creates a plain object from an UpdateFulfillmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @static - * @param {google.cloud.dialogflow.v2beta1.ConversationEvent} message ConversationEvent + * @param {google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest} message UpdateFulfillmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationEvent.toObject = function toObject(message, options) { + UpdateFulfillmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversation = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.errorStatus = null; - } - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = message.conversation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] : message.type; - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) - object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - object.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.newMessagePayload, options); - if (options.oneofs) - object.payload = "newMessagePayload"; + object.fulfillment = null; + object.updateMask = null; } + if (message.fulfillment != null && message.hasOwnProperty("fulfillment")) + object.fulfillment = $root.google.cloud.dialogflow.v2beta1.Fulfillment.toObject(message.fulfillment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ConversationEvent to JSON. + * Converts this UpdateFulfillmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.UpdateFulfillmentRequest * @instance * @returns {Object.} JSON object */ - ConversationEvent.prototype.toJSON = function toJSON() { + UpdateFulfillmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Type enum. - * @name google.cloud.dialogflow.v2beta1.ConversationEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value - * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value - * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value - * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value - */ - ConversationEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONVERSATION_STARTED"] = 1; - values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; - values[valuesById[5] = "NEW_MESSAGE"] = 5; - values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; - return values; - })(); - - return ConversationEvent; + return UpdateFulfillmentRequest; })(); v2beta1.HumanAgentAssistantEvent = (function() { diff --git a/packages/google-cloud-dialogflow/protos/protos.json b/packages/google-cloud-dialogflow/protos/protos.json index 379d3e5476b..7718f81f34d 100644 --- a/packages/google-cloud-dialogflow/protos/protos.json +++ b/packages/google-cloud-dialogflow/protos/protos.json @@ -9969,1112 +9969,762 @@ } } }, - "Environments": { + "ValidationError": { + "fields": { + "severity": { + "type": "Severity", + "id": 1 + }, + "entries": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "errorMessage": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "INFO": 1, + "WARNING": 2, + "ERROR": 3, + "CRITICAL": 4 + } + } + } + }, + "ValidationResult": { + "fields": { + "validationErrors": { + "rule": "repeated", + "type": "ValidationError", + "id": 1 + } + } + }, + "AnswerRecords": { "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", + "GetAnswerRecord": { + "requestType": "GetAnswerRecordRequest", + "responseType": "AnswerRecord", "options": { - "(google.api.http).get": "/v2beta1/{parent=projects/*/agent}/environments", - "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", - "(google.api.method_signature)": "parent" + "deprecated": true, + "(google.api.http).get": "/v2beta1/{name=projects/*/answerRecords/*}", + "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/answerRecords/*}" }, "parsedOptions": [ { - "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*/agent}/environments", - "additional_bindings": { - "get": "/v2beta1/{parent=projects/*/locations/*/agent}/environments" - } - } + "deprecated": true }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).get": "/v2beta1/{name=projects/*/agent/environments/*}", - "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" - }, - "parsedOptions": [ { "(google.api.http)": { - "get": "/v2beta1/{name=projects/*/agent/environments/*}", + "get": "/v2beta1/{name=projects/*/answerRecords/*}", "additional_bindings": { - "get": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" + "get": "/v2beta1/{name=projects/*/locations/*/answerRecords/*}" } } } ] }, - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "Environment", + "ListAnswerRecords": { + "requestType": "ListAnswerRecordsRequest", + "responseType": "ListAnswerRecordsResponse", "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/agent}/environments", - "(google.api.http).body": "environment", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", - "(google.api.http).additional_bindings.body": "environment" + "(google.api.http).get": "/v2beta1/{parent=projects/*}/answerRecords", + "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*}/answerRecords", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/agent}/environments", - "body": "environment", + "get": "/v2beta1/{parent=projects/*}/answerRecords", "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", - "body": "environment" + "get": "/v2beta1/{parent=projects/*/locations/*}/answerRecords" } } - } - ] - }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).patch": "/v2beta1/{environment.name=projects/*/agent/environments/*}", - "(google.api.http).body": "environment", - "(google.api.http).additional_bindings.patch": "/v2beta1/{environment.name=projects/*/locations/*/agent/environments/*}", - "(google.api.http).additional_bindings.body": "environment" - }, - "parsedOptions": [ + }, { - "(google.api.http)": { - "patch": "/v2beta1/{environment.name=projects/*/agent/environments/*}", - "body": "environment", - "additional_bindings": { - "patch": "/v2beta1/{environment.name=projects/*/locations/*/agent/environments/*}", - "body": "environment" - } - } + "(google.api.method_signature)": "parent" } ] }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.protobuf.Empty", + "UpdateAnswerRecord": { + "requestType": "UpdateAnswerRecordRequest", + "responseType": "AnswerRecord", "options": { - "(google.api.http).delete": "/v2beta1/{name=projects/*/agent/environments/*}", - "(google.api.http).additional_bindings.delete": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" + "(google.api.http).patch": "/v2beta1/{answer_record.name=projects/*/answerRecords/*}", + "(google.api.http).body": "answer_record", + "(google.api.http).additional_bindings.patch": "/v2beta1/{answer_record.name=projects/*/locations/*/answerRecords/*}", + "(google.api.http).additional_bindings.body": "answer_record", + "(google.api.method_signature)": "answer_record,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v2beta1/{name=projects/*/agent/environments/*}", + "patch": "/v2beta1/{answer_record.name=projects/*/answerRecords/*}", + "body": "answer_record", "additional_bindings": { - "delete": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" + "patch": "/v2beta1/{answer_record.name=projects/*/locations/*/answerRecords/*}", + "body": "answer_record" } } - } - ] - }, - "GetEnvironmentHistory": { - "requestType": "GetEnvironmentHistoryRequest", - "responseType": "EnvironmentHistory", - "options": { - "(google.api.http).get": "/v2beta1/{parent=projects/*/agent/environments/*}/history", - "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/history" - }, - "parsedOptions": [ + }, { - "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*/agent/environments/*}/history", - "additional_bindings": { - "get": "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/history" - } - } + "(google.api.method_signature)": "answer_record,update_mask" } ] } } }, - "Environment": { + "AnswerRecord": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Environment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agent/environments/{environment}" + "(google.api.resource).type": "dialogflow.googleapis.com/AnswerRecord", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/answerRecords/{answer_record}" + }, + "oneofs": { + "record": { + "oneof": [ + "agentAssistantRecord" + ] + } }, "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "agentVersion": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" - } + "id": 1 }, - "state": { - "type": "State", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "answerFeedback": { + "type": "AnswerFeedback", + "id": 3 }, - "updateTime": { - "type": "google.protobuf.Timestamp", + "agentAssistantRecord": { + "type": "AgentAssistantRecord", + "id": 4 + } + } + }, + "AgentAssistantRecord": { + "oneofs": { + "answer": { + "oneof": [ + "articleSuggestionAnswer", + "faqAnswer" + ] + } + }, + "fields": { + "articleSuggestionAnswer": { + "type": "ArticleAnswer", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "textToSpeechSettings": { - "type": "TextToSpeechSettings", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "fulfillment": { - "type": "Fulfillment", - "id": 8, + "faqAnswer": { + "type": "FaqAnswer", + "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STOPPED": 1, - "LOADING": 2, - "RUNNING": 3 + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "TextToSpeechSettings": { + "AnswerFeedback": { + "oneofs": { + "detailFeedback": { + "oneof": [ + "agentAssistantDetailFeedback" + ] + } + }, "fields": { - "enableTextToSpeech": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "correctnessLevel": { + "type": "CorrectnessLevel", + "id": 1 }, - "outputAudioEncoding": { - "type": "OutputAudioEncoding", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "agentAssistantDetailFeedback": { + "type": "AgentAssistantFeedback", + "id": 2 }, - "sampleRateHertz": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "clicked": { + "type": "bool", + "id": 3 }, - "synthesizeSpeechConfigs": { - "keyType": "string", - "type": "SynthesizeSpeechConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEnvironmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" - } + "clickTime": { + "type": "google.protobuf.Timestamp", + "id": 5 }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "displayed": { + "type": "bool", + "id": 4 }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "displayTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "CorrectnessLevel": { + "values": { + "CORRECTNESS_LEVEL_UNSPECIFIED": 0, + "NOT_CORRECT": 1, + "PARTIALLY_CORRECT": 2, + "FULLY_CORRECT": 3 } } } }, - "ListEnvironmentsResponse": { + "AgentAssistantFeedback": { "fields": { - "environments": { - "rule": "repeated", - "type": "Environment", + "answerRelevance": { + "type": "AnswerRelevance", "id": 1 }, - "nextPageToken": { - "type": "string", + "documentCorrectness": { + "type": "DocumentCorrectness", "id": 2 - } - } - }, - "GetEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" - } - } - } - }, - "CreateEnvironmentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" - } }, - "environment": { - "type": "Environment", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "documentEfficiency": { + "type": "DocumentEfficiency", + "id": 3 }, - "environmentId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "summarizationFeedback": { + "type": "SummarizationFeedback", + "id": 4 } - } - }, - "UpdateEnvironmentRequest": { - "fields": { - "environment": { - "type": "Environment", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + }, + "nested": { + "AnswerRelevance": { + "values": { + "ANSWER_RELEVANCE_UNSPECIFIED": 0, + "IRRELEVANT": 1, + "RELEVANT": 2 } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "DocumentCorrectness": { + "values": { + "DOCUMENT_CORRECTNESS_UNSPECIFIED": 0, + "INCORRECT": 1, + "CORRECT": 2 } }, - "allowLoadToDraftAndDiscardChanges": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "DocumentEfficiency": { + "values": { + "DOCUMENT_EFFICIENCY_UNSPECIFIED": 0, + "INEFFICIENT": 1, + "EFFICIENT": 2 + } + }, + "SummarizationFeedback": { + "fields": { + "startTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "submitTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "summaryText": { + "type": "string", + "id": 3 + } } } } }, - "DeleteEnvironmentRequest": { + "GetAnswerRecordRequest": { "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" - } + "id": 1 } } }, - "GetEnvironmentHistoryRequest": { + "ListAnswerRecordsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/AnswerRecord" } }, "pageSize": { "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 3 }, "pageToken": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 4 } } }, - "EnvironmentHistory": { + "ListAnswerRecordsResponse": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "entries": { + "answerRecords": { "rule": "repeated", - "type": "Entry", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "type": "AnswerRecord", + "id": 1 }, "nextPageToken": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 2 } - }, - "nested": { - "Entry": { - "fields": { - "agentVersion": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } + } + }, + "UpdateAnswerRecordRequest": { + "fields": { + "answerRecord": { + "type": "AnswerRecord", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 } } }, - "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 - } - }, - "SpeechContext": { - "fields": { - "phrases": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "boost": { - "type": "float", - "id": 2 - } - } - }, - "SpeechModelVariant": { - "values": { - "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, - "USE_BEST_AVAILABLE": 1, - "USE_STANDARD": 2, - "USE_ENHANCED": 3 - } - }, - "SpeechWordInfo": { - "fields": { - "word": { - "type": "string", - "id": 3 - }, - "startOffset": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "endOffset": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "confidence": { - "type": "float", - "id": 4 - } - } - }, - "InputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "AudioEncoding", - "id": 1 - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "languageCode": { - "type": "string", - "id": 3 - }, - "enableWordInfo": { - "type": "bool", - "id": 13 - }, - "phraseHints": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "deprecated": true - } - }, - "speechContexts": { - "rule": "repeated", - "type": "SpeechContext", - "id": 11 - }, - "model": { - "type": "string", - "id": 7 - }, - "modelVariant": { - "type": "SpeechModelVariant", - "id": 10 - }, - "singleUtterance": { - "type": "bool", - "id": 8 - }, - "disableNoSpeechRecognizedEvent": { - "type": "bool", - "id": 14 - } - } - }, - "SsmlVoiceGender": { - "values": { - "SSML_VOICE_GENDER_UNSPECIFIED": 0, - "SSML_VOICE_GENDER_MALE": 1, - "SSML_VOICE_GENDER_FEMALE": 2, - "SSML_VOICE_GENDER_NEUTRAL": 3 - } - }, - "VoiceSelectionParams": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "ssmlGender": { - "type": "SsmlVoiceGender", - "id": 2 - } - } - }, - "SynthesizeSpeechConfig": { - "fields": { - "speakingRate": { - "type": "double", - "id": 1 - }, - "pitch": { - "type": "double", - "id": 2 - }, - "volumeGainDb": { - "type": "double", - "id": 3 - }, - "effectsProfileId": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "voice": { - "type": "VoiceSelectionParams", - "id": 4 - } - } - }, - "OutputAudioEncoding": { - "values": { - "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 - } - }, - "OutputAudioConfig": { - "fields": { - "audioEncoding": { - "type": "OutputAudioEncoding", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleRateHertz": { - "type": "int32", - "id": 2 - }, - "synthesizeSpeechConfig": { - "type": "SynthesizeSpeechConfig", - "id": 3 - } - } - }, - "TelephonyDtmf": { - "values": { - "TELEPHONY_DTMF_UNSPECIFIED": 0, - "DTMF_ONE": 1, - "DTMF_TWO": 2, - "DTMF_THREE": 3, - "DTMF_FOUR": 4, - "DTMF_FIVE": 5, - "DTMF_SIX": 6, - "DTMF_SEVEN": 7, - "DTMF_EIGHT": 8, - "DTMF_NINE": 9, - "DTMF_ZERO": 10, - "DTMF_A": 11, - "DTMF_B": 12, - "DTMF_C": 13, - "DTMF_D": 14, - "DTMF_STAR": 15, - "DTMF_POUND": 16 - } - }, - "TelephonyDtmfEvents": { - "fields": { - "dtmfEvents": { - "rule": "repeated", - "type": "TelephonyDtmf", - "id": 1 - } - } - }, - "SpeechToTextConfig": { - "fields": { - "speechModelVariant": { - "type": "SpeechModelVariant", - "id": 1 - } - } - }, - "Fulfillments": { + "Participants": { "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": { - "GetFulfillment": { - "requestType": "GetFulfillmentRequest", - "responseType": "Fulfillment", + "CreateParticipant": { + "requestType": "CreateParticipantRequest", + "responseType": "Participant", "options": { - "(google.api.http).get": "/v2beta1/{name=projects/*/agent/fulfillment}", - "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/agent/fulfillment}", - "(google.api.method_signature)": "name" + "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*}/participants", + "(google.api.http).body": "participant", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", + "(google.api.http).additional_bindings.body": "participant", + "(google.api.method_signature)": "parent,participant" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2beta1/{name=projects/*/agent/fulfillment}", + "post": "/v2beta1/{parent=projects/*/conversations/*}/participants", + "body": "participant", "additional_bindings": { - "get": "/v2beta1/{name=projects/*/locations/*/agent/fulfillment}" + "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", + "body": "participant" } } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "parent,participant" } ] }, - "UpdateFulfillment": { - "requestType": "UpdateFulfillmentRequest", - "responseType": "Fulfillment", + "GetParticipant": { + "requestType": "GetParticipantRequest", + "responseType": "Participant", "options": { - "(google.api.http).patch": "/v2beta1/{fulfillment.name=projects/*/agent/fulfillment}", - "(google.api.http).body": "fulfillment", - "(google.api.http).additional_bindings.patch": "/v2beta1/{fulfillment.name=projects/*/locations/*/agent/fulfillment}", - "(google.api.http).additional_bindings.body": "fulfillment", - "(google.api.method_signature)": "fulfillment,update_mask" + "(google.api.http).get": "/v2beta1/{name=projects/*/conversations/*/participants/*}", + "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}", + "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v2beta1/{fulfillment.name=projects/*/agent/fulfillment}", - "body": "fulfillment", + "get": "/v2beta1/{name=projects/*/conversations/*/participants/*}", "additional_bindings": { - "patch": "/v2beta1/{fulfillment.name=projects/*/locations/*/agent/fulfillment}", - "body": "fulfillment" + "get": "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}" } } }, { - "(google.api.method_signature)": "fulfillment,update_mask" + "(google.api.method_signature)": "name" } ] - } - } - }, - "Fulfillment": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Fulfillment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/agent/fulfillment" - }, - "oneofs": { - "fulfillment": { - "oneof": [ - "genericWebService" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "displayName": { - "type": "string", - "id": 2 - }, - "genericWebService": { - "type": "GenericWebService", - "id": 3 - }, - "enabled": { - "type": "bool", - "id": 4 - }, - "features": { - "rule": "repeated", - "type": "Feature", - "id": 5 - } - }, - "nested": { - "GenericWebService": { - "fields": { - "uri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "username": { - "type": "string", - "id": 2 - }, - "password": { - "type": "string", - "id": 3 - }, - "requestHeaders": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "isCloudFunction": { - "type": "bool", - "id": 5, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - } - } }, - "Feature": { - "fields": { - "type": { - "type": "Type", - "id": 1 - } + "ListParticipants": { + "requestType": "ListParticipantsRequest", + "responseType": "ListParticipantsResponse", + "options": { + "(google.api.http).get": "/v2beta1/{parent=projects/*/conversations/*}/participants", + "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", + "(google.api.method_signature)": "parent" }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "SMALLTALK": 1 + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{parent=projects/*/conversations/*}/participants", + "additional_bindings": { + "get": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants" + } } + }, + { + "(google.api.method_signature)": "parent" } - } - } - } - }, - "GetFulfillmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Fulfillment" - } - } - } - }, - "UpdateFulfillmentRequest": { - "fields": { - "fulfillment": { - "type": "Fulfillment", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ValidationError": { - "fields": { - "severity": { - "type": "Severity", - "id": 1 - }, - "entries": { - "rule": "repeated", - "type": "string", - "id": 3 + ] }, - "errorMessage": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Severity": { - "values": { - "SEVERITY_UNSPECIFIED": 0, - "INFO": 1, - "WARNING": 2, - "ERROR": 3, - "CRITICAL": 4 - } - } - } - }, - "ValidationResult": { - "fields": { - "validationErrors": { - "rule": "repeated", - "type": "ValidationError", - "id": 1 - } - } - }, - "AnswerRecords": { - "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": { - "GetAnswerRecord": { - "requestType": "GetAnswerRecordRequest", - "responseType": "AnswerRecord", + "UpdateParticipant": { + "requestType": "UpdateParticipantRequest", + "responseType": "Participant", "options": { - "deprecated": true, - "(google.api.http).get": "/v2beta1/{name=projects/*/answerRecords/*}", - "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/answerRecords/*}" + "(google.api.http).patch": "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}", + "(google.api.http).body": "participant", + "(google.api.http).additional_bindings.patch": "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}", + "(google.api.http).additional_bindings.body": "participant", + "(google.api.method_signature)": "participant,update_mask" }, "parsedOptions": [ - { - "deprecated": true - }, { "(google.api.http)": { - "get": "/v2beta1/{name=projects/*/answerRecords/*}", + "patch": "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}", + "body": "participant", "additional_bindings": { - "get": "/v2beta1/{name=projects/*/locations/*/answerRecords/*}" + "patch": "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}", + "body": "participant" } } + }, + { + "(google.api.method_signature)": "participant,update_mask" } ] }, - "ListAnswerRecords": { - "requestType": "ListAnswerRecordsRequest", - "responseType": "ListAnswerRecordsResponse", + "AnalyzeContent": { + "requestType": "AnalyzeContentRequest", + "responseType": "AnalyzeContentResponse", "options": { - "(google.api.http).get": "/v2beta1/{parent=projects/*}/answerRecords", - "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*}/answerRecords", - "(google.api.method_signature)": "parent" + "(google.api.http).post": "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "participant,event_input" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*}/answerRecords", + "post": "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent", + "body": "*", "additional_bindings": { - "get": "/v2beta1/{parent=projects/*/locations/*}/answerRecords" + "post": "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent", + "body": "*" } } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "participant,text_input" + }, + { + "(google.api.method_signature)": "participant,event_input" } ] }, - "UpdateAnswerRecord": { - "requestType": "UpdateAnswerRecordRequest", - "responseType": "AnswerRecord", + "SuggestArticles": { + "requestType": "SuggestArticlesRequest", + "responseType": "SuggestArticlesResponse", "options": { - "(google.api.http).patch": "/v2beta1/{answer_record.name=projects/*/answerRecords/*}", - "(google.api.http).body": "answer_record", - "(google.api.http).additional_bindings.patch": "/v2beta1/{answer_record.name=projects/*/locations/*/answerRecords/*}", - "(google.api.http).additional_bindings.body": "answer_record", - "(google.api.method_signature)": "answer_record,update_mask" + "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v2beta1/{answer_record.name=projects/*/answerRecords/*}", - "body": "answer_record", + "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles", + "body": "*", "additional_bindings": { - "patch": "/v2beta1/{answer_record.name=projects/*/locations/*/answerRecords/*}", - "body": "answer_record" + "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles", + "body": "*" } } }, { - "(google.api.method_signature)": "answer_record,update_mask" + "(google.api.method_signature)": "parent" } ] - } - } - }, - "AnswerRecord": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/AnswerRecord", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/answerRecords/{answer_record}" - }, - "oneofs": { - "record": { - "oneof": [ - "agentAssistantRecord" + }, + "SuggestFaqAnswers": { + "requestType": "SuggestFaqAnswersRequest", + "responseType": "SuggestFaqAnswersResponse", + "options": { + "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent" + } ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 }, - "answerFeedback": { - "type": "AnswerFeedback", - "id": 3 + "SuggestSmartReplies": { + "requestType": "SuggestSmartRepliesRequest", + "responseType": "SuggestSmartRepliesResponse", + "options": { + "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "agentAssistantRecord": { - "type": "AgentAssistantRecord", - "id": 4 + "ListSuggestions": { + "requestType": "ListSuggestionsRequest", + "responseType": "ListSuggestionsResponse", + "options": { + "deprecated": true, + "(google.api.http).get": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "get": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions" + } + } + ] + }, + "CompileSuggestion": { + "requestType": "CompileSuggestionRequest", + "responseType": "CompileSuggestionResponse", + "options": { + "deprecated": true, + "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "deprecated": true + }, + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile", + "body": "*" + } + } + ] } } }, - "AgentAssistantRecord": { - "oneofs": { - "answer": { - "oneof": [ - "articleSuggestionAnswer", - "faqAnswer" - ] - } + "Participant": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Participant", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" }, "fields": { - "articleSuggestionAnswer": { - "type": "ArticleAnswer", - "id": 5, + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "faqAnswer": { - "type": "FaqAnswer", - "id": 6, + "role": { + "type": "Role", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } - } - } - }, - "AnswerFeedback": { - "oneofs": { - "detailFeedback": { - "oneof": [ - "agentAssistantDetailFeedback" - ] - } - }, - "fields": { - "correctnessLevel": { - "type": "CorrectnessLevel", - "id": 1 - }, - "agentAssistantDetailFeedback": { - "type": "AgentAssistantFeedback", - "id": 2 - }, - "clicked": { - "type": "bool", - "id": 3 - }, - "clickTime": { - "type": "google.protobuf.Timestamp", - "id": 5 }, - "displayed": { - "type": "bool", - "id": 4 + "obfuscatedExternalUserId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "displayTime": { - "type": "google.protobuf.Timestamp", - "id": 6 + "documentsMetadataFilters": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { - "CorrectnessLevel": { + "Role": { "values": { - "CORRECTNESS_LEVEL_UNSPECIFIED": 0, - "NOT_CORRECT": 1, - "PARTIALLY_CORRECT": 2, - "FULLY_CORRECT": 3 + "ROLE_UNSPECIFIED": 0, + "HUMAN_AGENT": 1, + "AUTOMATED_AGENT": 2, + "END_USER": 3 } } } }, - "AgentAssistantFeedback": { + "Message": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Message", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}" + }, "fields": { - "answerRelevance": { - "type": "AnswerRelevance", - "id": 1 - }, - "documentCorrectness": { - "type": "DocumentCorrectness", - "id": 2 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "documentEfficiency": { - "type": "DocumentEfficiency", - "id": 3 + "content": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "summarizationFeedback": { - "type": "SummarizationFeedback", - "id": 4 - } - }, - "nested": { - "AnswerRelevance": { - "values": { - "ANSWER_RELEVANCE_UNSPECIFIED": 0, - "IRRELEVANT": 1, - "RELEVANT": 2 + "languageCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "DocumentCorrectness": { - "values": { - "DOCUMENT_CORRECTNESS_UNSPECIFIED": 0, - "INCORRECT": 1, - "CORRECT": 2 + "participant": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "DocumentEfficiency": { - "values": { - "DOCUMENT_EFFICIENCY_UNSPECIFIED": 0, - "INEFFICIENT": 1, - "EFFICIENT": 2 + "participantRole": { + "type": "Participant.Role", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "SummarizationFeedback": { - "fields": { - "startTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "submitTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "summaryText": { - "type": "string", - "id": 3 - } + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sendTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "messageAnnotation": { + "type": "MessageAnnotation", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sentimentAnalysis": { + "type": "SentimentAnalysisResult", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "GetAnswerRecordRequest": { + "CreateParticipantRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Participant" + } + }, + "participant": { + "type": "Participant", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetParticipantRequest": { "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" + } } } }, - "ListAnswerRecordsRequest": { + "ListParticipantsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/AnswerRecord" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Participant" } }, "pageSize": { "type": "int32", - "id": 3 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 4 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListAnswerRecordsResponse": { + "ListParticipantsResponse": { "fields": { - "answerRecords": { + "participants": { "rule": "repeated", - "type": "AnswerRecord", + "type": "Participant", "id": 1 }, "nextPageToken": { @@ -11083,10 +10733,10 @@ } } }, - "UpdateAnswerRecordRequest": { + "UpdateParticipantRequest": { "fields": { - "answerRecord": { - "type": "AnswerRecord", + "participant": { + "type": "Participant", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -11094,584 +10744,398 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "OutputAudio": { + "fields": { + "config": { + "type": "OutputAudioConfig", + "id": 1 + }, + "audio": { + "type": "bytes", "id": 2 } } }, - "Participants": { - "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": { - "CreateParticipant": { - "requestType": "CreateParticipantRequest", - "responseType": "Participant", - "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*}/participants", - "(google.api.http).body": "participant", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", - "(google.api.http).additional_bindings.body": "participant", - "(google.api.method_signature)": "parent,participant" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/conversations/*}/participants", - "body": "participant", - "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", - "body": "participant" - } - } - }, - { - "(google.api.method_signature)": "parent,participant" - } + "AutomatedAgentReply": { + "oneofs": { + "response": { + "oneof": [ + "detectIntentResponse" ] }, - "GetParticipant": { - "requestType": "GetParticipantRequest", - "responseType": "Participant", - "options": { - "(google.api.http).get": "/v2beta1/{name=projects/*/conversations/*/participants/*}", - "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2beta1/{name=projects/*/conversations/*/participants/*}", - "additional_bindings": { - "get": "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } + "match": { + "oneof": [ + "intent", + "event" ] + } + }, + "fields": { + "detectIntentResponse": { + "type": "DetectIntentResponse", + "id": 1 }, - "ListParticipants": { - "requestType": "ListParticipantsRequest", - "responseType": "ListParticipantsResponse", - "options": { - "(google.api.http).get": "/v2beta1/{parent=projects/*/conversations/*}/participants", - "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*/conversations/*}/participants", - "additional_bindings": { - "get": "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "responseMessages": { + "rule": "repeated", + "type": "ResponseMessage", + "id": 3 }, - "UpdateParticipant": { - "requestType": "UpdateParticipantRequest", - "responseType": "Participant", + "intent": { + "type": "string", + "id": 4, "options": { - "(google.api.http).patch": "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}", - "(google.api.http).body": "participant", - "(google.api.http).additional_bindings.patch": "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}", - "(google.api.http).additional_bindings.body": "participant", - "(google.api.method_signature)": "participant,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}", - "body": "participant", - "additional_bindings": { - "patch": "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}", - "body": "participant" - } - } - }, - { - "(google.api.method_signature)": "participant,update_mask" - } - ] + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" + } }, - "AnalyzeContent": { - "requestType": "AnalyzeContentRequest", - "responseType": "AnalyzeContentResponse", + "event": { + "type": "string", + "id": 5 + }, + "matchConfidence": { + "type": "float", + "id": 9 + }, + "parameters": { + "type": "google.protobuf.Struct", + "id": 10 + }, + "cxSessionParameters": { + "type": "google.protobuf.Struct", + "id": 6, "options": { - "(google.api.http).post": "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "participant,event_input" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent", - "body": "*", - "additional_bindings": { - "post": "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "participant,text_input" - }, - { - "(google.api.method_signature)": "participant,event_input" - } - ] - }, - "SuggestArticles": { - "requestType": "SuggestArticlesRequest", - "responseType": "SuggestArticlesResponse", - "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles", - "body": "*", - "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "SuggestFaqAnswers": { - "requestType": "SuggestFaqAnswersRequest", - "responseType": "SuggestFaqAnswersResponse", - "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", - "body": "*", - "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "SuggestSmartReplies": { - "requestType": "SuggestSmartRepliesRequest", - "responseType": "SuggestSmartRepliesResponse", - "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", - "body": "*", - "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "deprecated": true + } }, - "ListSuggestions": { - "requestType": "ListSuggestionsRequest", - "responseType": "ListSuggestionsResponse", - "options": { - "deprecated": true, - "(google.api.http).get": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions" - } - } - ] + "automatedAgentReplyType": { + "type": "AutomatedAgentReplyType", + "id": 7 }, - "CompileSuggestion": { - "requestType": "CompileSuggestionRequest", - "responseType": "CompileSuggestionResponse", - "options": { - "deprecated": true, - "(google.api.http).post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "deprecated": true - }, - { - "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile", - "body": "*" - } - } - ] + "allowCancellation": { + "type": "bool", + "id": 8 + } + }, + "nested": { + "AutomatedAgentReplyType": { + "values": { + "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": 0, + "PARTIAL": 1, + "FINAL": 2 + } } } }, - "Participant": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Participant", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" - }, + "SuggestionFeature": { "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "role": { - "type": "Role", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "obfuscatedExternalUserId": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "documentsMetadataFilters": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "type": { + "type": "Type", + "id": 1 } }, "nested": { - "Role": { + "Type": { "values": { - "ROLE_UNSPECIFIED": 0, - "HUMAN_AGENT": 1, - "AUTOMATED_AGENT": 2, - "END_USER": 3 + "TYPE_UNSPECIFIED": 0, + "ARTICLE_SUGGESTION": 1, + "FAQ": 2, + "SMART_REPLY": 3 } } } }, - "Message": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Message", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}" + "AssistQueryParameters": { + "fields": { + "documentsMetadataFilters": { + "keyType": "string", + "type": "string", + "id": 1 + } + } + }, + "AnalyzeContentRequest": { + "oneofs": { + "input": { + "oneof": [ + "textInput", + "eventInput" + ] + } }, "fields": { - "name": { + "participant": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" } }, - "content": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "textInput": { + "type": "TextInput", + "id": 6 }, - "languageCode": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "eventInput": { + "type": "EventInput", + "id": 8 }, - "participant": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "replyAudioConfig": { + "type": "OutputAudioConfig", + "id": 5 }, - "participantRole": { - "type": "Participant.Role", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "queryParams": { + "type": "QueryParameters", + "id": 9 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "assistQueryParams": { + "type": "AssistQueryParameters", + "id": 14 }, - "sendTime": { + "messageSendTime": { "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "messageAnnotation": { - "type": "MessageAnnotation", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 10 }, - "sentimentAnalysis": { - "type": "SentimentAnalysisResult", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "requestId": { + "type": "string", + "id": 11 } } }, - "CreateParticipantRequest": { + "DtmfParameters": { "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Participant" - } - }, - "participant": { - "type": "Participant", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "acceptsDtmfInput": { + "type": "bool", + "id": 1 } } }, - "GetParticipantRequest": { + "AnalyzeContentResponse": { "fields": { - "name": { + "replyText": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" - } + "id": 1 + }, + "replyAudio": { + "type": "OutputAudio", + "id": 2 + }, + "automatedAgentReply": { + "type": "AutomatedAgentReply", + "id": 3 + }, + "message": { + "type": "Message", + "id": 5 + }, + "humanAgentSuggestionResults": { + "rule": "repeated", + "type": "SuggestionResult", + "id": 6 + }, + "endUserSuggestionResults": { + "rule": "repeated", + "type": "SuggestionResult", + "id": 7 + }, + "dtmfParameters": { + "type": "DtmfParameters", + "id": 9 } } }, - "ListParticipantsRequest": { + "AnnotatedMessagePart": { "fields": { - "parent": { + "text": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Participant" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 1 }, - "pageToken": { + "entityType": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 2 + }, + "formattedValue": { + "type": "google.protobuf.Value", + "id": 3 } } }, - "ListParticipantsResponse": { + "MessageAnnotation": { "fields": { - "participants": { + "parts": { "rule": "repeated", - "type": "Participant", + "type": "AnnotatedMessagePart", "id": 1 }, - "nextPageToken": { + "containEntities": { + "type": "bool", + "id": 2 + } + } + }, + "ArticleAnswer": { + "fields": { + "title": { + "type": "string", + "id": 1 + }, + "uri": { "type": "string", "id": 2 + }, + "snippets": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "answerRecord": { + "type": "string", + "id": 6 } } }, - "UpdateParticipantRequest": { + "FaqAnswer": { "fields": { - "participant": { - "type": "Participant", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "answer": { + "type": "string", + "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "confidence": { + "type": "float", + "id": 2 + }, + "question": { + "type": "string", + "id": 3 + }, + "source": { + "type": "string", + "id": 4 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "answerRecord": { + "type": "string", + "id": 6 } } }, - "OutputAudio": { + "SmartReplyAnswer": { "fields": { - "config": { - "type": "OutputAudioConfig", + "reply": { + "type": "string", "id": 1 }, - "audio": { - "type": "bytes", + "confidence": { + "type": "float", "id": 2 + }, + "answerRecord": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/AnswerRecord" + } } } }, - "AutomatedAgentReply": { + "SuggestionResult": { "oneofs": { - "response": { - "oneof": [ - "detectIntentResponse" - ] - }, - "match": { + "suggestionResponse": { "oneof": [ - "intent", - "event" + "error", + "suggestArticlesResponse", + "suggestFaqAnswersResponse", + "suggestSmartRepliesResponse" ] } }, "fields": { - "detectIntentResponse": { - "type": "DetectIntentResponse", + "error": { + "type": "google.rpc.Status", "id": 1 }, - "responseMessages": { - "rule": "repeated", - "type": "ResponseMessage", + "suggestArticlesResponse": { + "type": "SuggestArticlesResponse", + "id": 2 + }, + "suggestFaqAnswersResponse": { + "type": "SuggestFaqAnswersResponse", "id": 3 }, - "intent": { + "suggestSmartRepliesResponse": { + "type": "SuggestSmartRepliesResponse", + "id": 4 + } + } + }, + "SuggestArticlesRequest": { + "fields": { + "parent": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Intent" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" } }, - "event": { + "latestMessage": { "type": "string", - "id": 5 - }, - "matchConfidence": { - "type": "float", - "id": 9 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, - "parameters": { - "type": "google.protobuf.Struct", - "id": 10 - }, - "cxSessionParameters": { - "type": "google.protobuf.Struct", - "id": 6, + "contextSize": { + "type": "int32", + "id": 3, "options": { - "deprecated": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "automatedAgentReplyType": { - "type": "AutomatedAgentReplyType", - "id": 7 - }, - "allowCancellation": { - "type": "bool", - "id": 8 - } - }, - "nested": { - "AutomatedAgentReplyType": { - "values": { - "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": 0, - "PARTIAL": 1, - "FINAL": 2 + "assistQueryParams": { + "type": "AssistQueryParameters", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "SuggestionFeature": { + "SuggestArticlesResponse": { "fields": { - "type": { - "type": "Type", + "articleAnswers": { + "rule": "repeated", + "type": "ArticleAnswer", "id": 1 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ARTICLE_SUGGESTION": 1, - "FAQ": 2, - "SMART_REPLY": 3 - } - } - } - }, - "AssistQueryParameters": { - "fields": { - "documentsMetadataFilters": { - "keyType": "string", + }, + "latestMessage": { "type": "string", - "id": 1 + "id": 2 + }, + "contextSize": { + "type": "int32", + "id": 3 } } }, - "AnalyzeContentRequest": { - "oneofs": { - "input": { - "oneof": [ - "textInput", - "eventInput" - ] - } - }, + "SuggestFaqAnswersRequest": { "fields": { - "participant": { + "parent": { "type": "string", "id": 1, "options": { @@ -11679,386 +11143,120 @@ "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" } }, - "textInput": { - "type": "TextInput", - "id": 6 - }, - "eventInput": { - "type": "EventInput", - "id": 8 - }, - "replyAudioConfig": { - "type": "OutputAudioConfig", - "id": 5 + "latestMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, - "queryParams": { - "type": "QueryParameters", - "id": 9 + "contextSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "assistQueryParams": { "type": "AssistQueryParameters", - "id": 14 - }, - "messageSendTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "requestId": { - "type": "string", - "id": 11 - } - } - }, - "DtmfParameters": { - "fields": { - "acceptsDtmfInput": { - "type": "bool", - "id": 1 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "AnalyzeContentResponse": { + "SuggestFaqAnswersResponse": { "fields": { - "replyText": { - "type": "string", + "faqAnswers": { + "rule": "repeated", + "type": "FaqAnswer", "id": 1 }, - "replyAudio": { - "type": "OutputAudio", + "latestMessage": { + "type": "string", "id": 2 }, - "automatedAgentReply": { - "type": "AutomatedAgentReply", + "contextSize": { + "type": "int32", "id": 3 - }, - "message": { - "type": "Message", - "id": 5 - }, - "humanAgentSuggestionResults": { - "rule": "repeated", - "type": "SuggestionResult", - "id": 6 - }, - "endUserSuggestionResults": { - "rule": "repeated", - "type": "SuggestionResult", - "id": 7 - }, - "dtmfParameters": { - "type": "DtmfParameters", - "id": 9 } } }, - "AnnotatedMessagePart": { + "SuggestSmartRepliesRequest": { "fields": { - "text": { + "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" + } }, - "entityType": { + "currentTextInput": { + "type": "TextInput", + "id": 4 + }, + "latestMessage": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, - "formattedValue": { - "type": "google.protobuf.Value", + "contextSize": { + "type": "int32", "id": 3 } } }, - "MessageAnnotation": { + "SuggestSmartRepliesResponse": { "fields": { - "parts": { + "smartReplyAnswers": { "rule": "repeated", - "type": "AnnotatedMessagePart", - "id": 1 - }, - "containEntities": { - "type": "bool", - "id": 2 - } - } - }, - "ArticleAnswer": { - "fields": { - "title": { - "type": "string", + "type": "SmartReplyAnswer", "id": 1 }, - "uri": { + "latestMessage": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, - "snippets": { - "rule": "repeated", - "type": "string", + "contextSize": { + "type": "int32", "id": 3 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 5 - }, - "answerRecord": { - "type": "string", - "id": 6 } } }, - "FaqAnswer": { + "Suggestion": { + "options": { + "deprecated": true + }, "fields": { - "answer": { + "name": { "type": "string", "id": 1 }, - "confidence": { - "type": "float", + "articles": { + "rule": "repeated", + "type": "Article", "id": 2 }, - "question": { - "type": "string", - "id": 3 - }, - "source": { - "type": "string", + "faqAnswers": { + "rule": "repeated", + "type": "FaqAnswer", "id": 4 }, - "metadata": { - "keyType": "string", - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 5 }, - "answerRecord": { + "latestMessage": { "type": "string", - "id": 6 - } - } - }, - "SmartReplyAnswer": { - "fields": { - "reply": { - "type": "string", - "id": 1 - }, - "confidence": { - "type": "float", - "id": 2 - }, - "answerRecord": { - "type": "string", - "id": 3, - "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/AnswerRecord" - } - } - } - }, - "SuggestionResult": { - "oneofs": { - "suggestionResponse": { - "oneof": [ - "error", - "suggestArticlesResponse", - "suggestFaqAnswersResponse", - "suggestSmartRepliesResponse" - ] - } - }, - "fields": { - "error": { - "type": "google.rpc.Status", - "id": 1 - }, - "suggestArticlesResponse": { - "type": "SuggestArticlesResponse", - "id": 2 - }, - "suggestFaqAnswersResponse": { - "type": "SuggestFaqAnswersResponse", - "id": 3 - }, - "suggestSmartRepliesResponse": { - "type": "SuggestSmartRepliesResponse", - "id": 4 - } - } - }, - "SuggestArticlesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" - } - }, - "latestMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" - } - }, - "contextSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "assistQueryParams": { - "type": "AssistQueryParameters", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SuggestArticlesResponse": { - "fields": { - "articleAnswers": { - "rule": "repeated", - "type": "ArticleAnswer", - "id": 1 - }, - "latestMessage": { - "type": "string", - "id": 2 - }, - "contextSize": { - "type": "int32", - "id": 3 - } - } - }, - "SuggestFaqAnswersRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" - } - }, - "latestMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" - } - }, - "contextSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "assistQueryParams": { - "type": "AssistQueryParameters", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SuggestFaqAnswersResponse": { - "fields": { - "faqAnswers": { - "rule": "repeated", - "type": "FaqAnswer", - "id": 1 - }, - "latestMessage": { - "type": "string", - "id": 2 - }, - "contextSize": { - "type": "int32", - "id": 3 - } - } - }, - "SuggestSmartRepliesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" - } - }, - "currentTextInput": { - "type": "TextInput", - "id": 4 - }, - "latestMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" - } - }, - "contextSize": { - "type": "int32", - "id": 3 - } - } - }, - "SuggestSmartRepliesResponse": { - "fields": { - "smartReplyAnswers": { - "rule": "repeated", - "type": "SmartReplyAnswer", - "id": 1 - }, - "latestMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" - } - }, - "contextSize": { - "type": "int32", - "id": 3 - } - } - }, - "Suggestion": { - "options": { - "deprecated": true - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "articles": { - "rule": "repeated", - "type": "Article", - "id": 2 - }, - "faqAnswers": { - "rule": "repeated", - "type": "FaqAnswer", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "latestMessage": { - "type": "string", - "id": 7 + "id": 7 } }, "nested": { @@ -12273,31 +11471,225 @@ } } }, - "GcsSources": { - "fields": { - "uris": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } + "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 } }, - "GcsSource": { + "SpeechContext": { "fields": { - "uri": { + "phrases": { + "rule": "repeated", "type": "string", "id": 1 + }, + "boost": { + "type": "float", + "id": 2 } } }, - "Sessions": { - "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" - }, + "SpeechModelVariant": { + "values": { + "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, + "USE_BEST_AVAILABLE": 1, + "USE_STANDARD": 2, + "USE_ENHANCED": 3 + } + }, + "SpeechWordInfo": { + "fields": { + "word": { + "type": "string", + "id": 3 + }, + "startOffset": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "endOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "confidence": { + "type": "float", + "id": 4 + } + } + }, + "InputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "AudioEncoding", + "id": 1 + }, + "sampleRateHertz": { + "type": "int32", + "id": 2 + }, + "languageCode": { + "type": "string", + "id": 3 + }, + "enableWordInfo": { + "type": "bool", + "id": 13 + }, + "phraseHints": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "speechContexts": { + "rule": "repeated", + "type": "SpeechContext", + "id": 11 + }, + "model": { + "type": "string", + "id": 7 + }, + "modelVariant": { + "type": "SpeechModelVariant", + "id": 10 + }, + "singleUtterance": { + "type": "bool", + "id": 8 + }, + "disableNoSpeechRecognizedEvent": { + "type": "bool", + "id": 14 + } + } + }, + "SsmlVoiceGender": { + "values": { + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3 + } + }, + "VoiceSelectionParams": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "ssmlGender": { + "type": "SsmlVoiceGender", + "id": 2 + } + } + }, + "SynthesizeSpeechConfig": { + "fields": { + "speakingRate": { + "type": "double", + "id": 1 + }, + "pitch": { + "type": "double", + "id": 2 + }, + "volumeGainDb": { + "type": "double", + "id": 3 + }, + "effectsProfileId": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "voice": { + "type": "VoiceSelectionParams", + "id": 4 + } + } + }, + "OutputAudioEncoding": { + "values": { + "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 + } + }, + "OutputAudioConfig": { + "fields": { + "audioEncoding": { + "type": "OutputAudioEncoding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 2 + }, + "synthesizeSpeechConfig": { + "type": "SynthesizeSpeechConfig", + "id": 3 + } + } + }, + "TelephonyDtmf": { + "values": { + "TELEPHONY_DTMF_UNSPECIFIED": 0, + "DTMF_ONE": 1, + "DTMF_TWO": 2, + "DTMF_THREE": 3, + "DTMF_FOUR": 4, + "DTMF_FIVE": 5, + "DTMF_SIX": 6, + "DTMF_SEVEN": 7, + "DTMF_EIGHT": 8, + "DTMF_NINE": 9, + "DTMF_ZERO": 10, + "DTMF_A": 11, + "DTMF_B": 12, + "DTMF_C": 13, + "DTMF_D": 14, + "DTMF_STAR": 15, + "DTMF_POUND": 16 + } + }, + "TelephonyDtmfEvents": { + "fields": { + "dtmfEvents": { + "rule": "repeated", + "type": "TelephonyDtmf", + "id": 1 + } + } + }, + "SpeechToTextConfig": { + "fields": { + "speechModelVariant": { + "type": "SpeechModelVariant", + "id": 1 + } + } + }, + "Sessions": { + "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": { "DetectIntent": { "requestType": "DetectIntentRequest", @@ -16060,6 +15452,45 @@ } } }, + "ConversationEvent": { + "oneofs": { + "payload": { + "oneof": [ + "newMessagePayload" + ] + } + }, + "fields": { + "conversation": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "errorStatus": { + "type": "google.rpc.Status", + "id": 3 + }, + "newMessagePayload": { + "type": "Message", + "id": 4 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CONVERSATION_STARTED": 1, + "CONVERSATION_FINISHED": 2, + "HUMAN_INTERVENTION_NEEDED": 3, + "NEW_MESSAGE": 5, + "UNRECOVERABLE_ERROR": 4 + } + } + } + }, "ConversationProfiles": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", @@ -16183,28 +15614,96 @@ "(google.api.method_signature)": "name" } ] - } - } - }, - "ConversationProfile": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/ConversationProfile", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 }, - "displayName": { - "type": "string", - "id": 2, + "SetSuggestionFeatureConfig": { + "requestType": "SetSuggestionFeatureConfigRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", + "(google.api.http).post": "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "conversation_profile", + "(google.longrunning.operation_info).response_type": "ConversationProfile", + "(google.longrunning.operation_info).metadata_type": "SetSuggestionFeatureConfigOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "conversation_profile" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationProfile", + "metadata_type": "SetSuggestionFeatureConfigOperationMetadata" + } + } + ] + }, + "ClearSuggestionFeatureConfig": { + "requestType": "ClearSuggestionFeatureConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "conversation_profile", + "(google.longrunning.operation_info).response_type": "ConversationProfile", + "(google.longrunning.operation_info).metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "conversation_profile" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationProfile", + "metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + } + } + ] + } + } + }, + "ConversationProfile": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/ConversationProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", "id": 11, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" @@ -16473,175 +15972,918 @@ } } }, - "HumanAgentHandoffConfig": { - "oneofs": { - "agentService": { - "oneof": [ - "livePersonConfig", - "salesforceLiveAgentConfig" - ] - } - }, + "HumanAgentHandoffConfig": { + "oneofs": { + "agentService": { + "oneof": [ + "livePersonConfig", + "salesforceLiveAgentConfig" + ] + } + }, + "fields": { + "livePersonConfig": { + "type": "LivePersonConfig", + "id": 1 + }, + "salesforceLiveAgentConfig": { + "type": "SalesforceLiveAgentConfig", + "id": 2 + } + }, + "nested": { + "LivePersonConfig": { + "fields": { + "accountNumber": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SalesforceLiveAgentConfig": { + "fields": { + "organizationId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "deploymentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "buttonId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endpointDomain": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "NotificationConfig": { + "fields": { + "topic": { + "type": "string", + "id": 1 + }, + "messageFormat": { + "type": "MessageFormat", + "id": 2 + } + }, + "nested": { + "MessageFormat": { + "values": { + "MESSAGE_FORMAT_UNSPECIFIED": 0, + "PROTO": 1, + "JSON": 2 + } + } + } + }, + "LoggingConfig": { + "fields": { + "enableStackdriverLogging": { + "type": "bool", + "id": 3 + } + } + }, + "ListConversationProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListConversationProfilesResponse": { + "fields": { + "conversationProfiles": { + "rule": "repeated", + "type": "ConversationProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetConversationProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + } + } + } + }, + "CreateConversationProfileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + } + }, + "conversationProfile": { + "type": "ConversationProfile", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConversationProfileRequest": { + "fields": { + "conversationProfile": { + "type": "ConversationProfile", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConversationProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + } + } + } + }, + "SetSuggestionFeatureConfigRequest": { + "fields": { + "conversationProfile": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "participantRole": { + "type": "Participant.Role", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "suggestionFeatureConfig": { + "type": "HumanAgentAssistantConfig.SuggestionFeatureConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ClearSuggestionFeatureConfigRequest": { + "fields": { + "conversationProfile": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "participantRole": { + "type": "Participant.Role", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SetSuggestionFeatureConfigOperationMetadata": { + "fields": { + "conversationProfile": { + "type": "string", + "id": 1 + }, + "participantRole": { + "type": "Participant.Role", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "ClearSuggestionFeatureConfigOperationMetadata": { + "fields": { + "conversationProfile": { + "type": "string", + "id": 1 + }, + "participantRole": { + "type": "Participant.Role", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "Documents": { + "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": { + "ListDocuments": { + "requestType": "ListDocumentsRequest", + "responseType": "ListDocumentsResponse", + "options": { + "(google.api.http).get": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", + "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", + "additional_bindings": [ + { + "get": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents" + }, + { + "get": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDocument": { + "requestType": "GetDocumentRequest", + "responseType": "Document", + "options": { + "(google.api.http).get": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", + "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", + "additional_bindings": [ + { + "get": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" + }, + { + "get": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDocument": { + "requestType": "CreateDocumentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", + "(google.api.http).body": "document", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", + "(google.api.http).additional_bindings.body": "document", + "(google.api.method_signature)": "parent,document", + "(google.longrunning.operation_info).response_type": "Document", + "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", + "body": "document", + "additional_bindings": [ + { + "post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents", + "body": "document" + }, + { + "post": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", + "body": "document" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,document" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Document", + "metadata_type": "KnowledgeOperationMetadata" + } + } + ] + }, + "ImportDocuments": { + "requestType": "ImportDocumentsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:import", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "ImportDocumentsResponse", + "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:import", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ImportDocumentsResponse", + "metadata_type": "KnowledgeOperationMetadata" + } + } + ] + }, + "DeleteDocument": { + "requestType": "DeleteDocumentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", + "(google.api.http).additional_bindings.delete": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", + "additional_bindings": [ + { + "delete": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" + }, + { + "delete": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "KnowledgeOperationMetadata" + } + } + ] + }, + "UpdateDocument": { + "requestType": "UpdateDocumentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}", + "(google.api.http).body": "document", + "(google.api.http).additional_bindings.patch": "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}", + "(google.api.http).additional_bindings.body": "document", + "(google.api.method_signature)": "document", + "(google.longrunning.operation_info).response_type": "Document", + "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}", + "body": "document", + "additional_bindings": [ + { + "patch": "/v2beta1/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}", + "body": "document" + }, + { + "patch": "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}", + "body": "document" + } + ] + } + }, + { + "(google.api.method_signature)": "document,update_mask" + }, + { + "(google.api.method_signature)": "document" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Document", + "metadata_type": "KnowledgeOperationMetadata" + } + } + ] + }, + "ReloadDocument": { + "requestType": "ReloadDocumentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,gcs_source", + "(google.longrunning.operation_info).response_type": "Document", + "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload", + "body": "*", + "additional_bindings": [ + { + "post": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload", + "body": "*" + }, + { + "post": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "name,gcs_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Document", + "metadata_type": "KnowledgeOperationMetadata" + } + } + ] + } + } + }, + "Document": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Document", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}" + }, + "oneofs": { + "source": { + "oneof": [ + "contentUri", + "content", + "rawContent" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "mimeType": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "knowledgeTypes": { + "rule": "repeated", + "type": "KnowledgeType", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "contentUri": { + "type": "string", + "id": 5 + }, + "content": { + "type": "string", + "id": 6, + "options": { + "deprecated": true + } + }, + "rawContent": { + "type": "bytes", + "id": 9 + }, + "enableAutoReload": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "latestReloadStatus": { + "type": "ReloadStatus", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "KnowledgeType": { + "options": { + "allow_alias": true + }, + "values": { + "KNOWLEDGE_TYPE_UNSPECIFIED": 0, + "FAQ": 1, + "EXTRACTIVE_QA": 2, + "ARTICLE_SUGGESTION": 3, + "AGENT_FACING_SMART_REPLY": 4, + "SMART_REPLY": 4 + } + }, + "ReloadStatus": { + "fields": { + "time": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "status": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "RELOADING": 4, + "DELETING": 5 + } + } + } + }, + "GetDocumentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + } + } + } + }, + "ListDocumentsRequest": { "fields": { - "livePersonConfig": { - "type": "LivePersonConfig", - "id": 1 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" + } }, - "salesforceLiveAgentConfig": { - "type": "SalesforceLiveAgentConfig", + "pageSize": { + "type": "int32", "id": 2 - } - }, - "nested": { - "LivePersonConfig": { - "fields": { - "accountNumber": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } }, - "SalesforceLiveAgentConfig": { - "fields": { - "organizationId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deploymentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "buttonId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endpointDomain": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 } } }, - "NotificationConfig": { + "ListDocumentsResponse": { "fields": { - "topic": { - "type": "string", + "documents": { + "rule": "repeated", + "type": "Document", "id": 1 }, - "messageFormat": { - "type": "MessageFormat", + "nextPageToken": { + "type": "string", "id": 2 } - }, - "nested": { - "MessageFormat": { - "values": { - "MESSAGE_FORMAT_UNSPECIFIED": 0, - "PROTO": 1, - "JSON": 2 - } - } } }, - "LoggingConfig": { + "CreateDocumentRequest": { "fields": { - "enableStackdriverLogging": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" + } + }, + "document": { + "type": "Document", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "importGcsCustomMetadata": { "type": "bool", "id": 3 } } }, - "ListConversationProfilesRequest": { + "ImportDocumentsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" } }, - "pageSize": { - "type": "int32", + "gcsSource": { + "type": "GcsSources", "id": 2 }, - "pageToken": { + "documentTemplate": { + "type": "ImportDocumentTemplate", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "importGcsCustomMetadata": { + "type": "bool", + "id": 4 + } + } + }, + "ImportDocumentTemplate": { + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "knowledgeTypes": { + "rule": "repeated", + "type": "Document.KnowledgeType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metadata": { + "keyType": "string", "type": "string", "id": 3 } } }, - "ListConversationProfilesResponse": { + "ImportDocumentsResponse": { "fields": { - "conversationProfiles": { + "warnings": { "rule": "repeated", - "type": "ConversationProfile", + "type": "google.rpc.Status", "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 } } }, - "GetConversationProfileRequest": { + "DeleteDocumentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" } } } }, - "CreateConversationProfileRequest": { + "UpdateDocumentRequest": { + "fields": { + "document": { + "type": "Document", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportOperationMetadata": { + "fields": { + "exportedGcsDestination": { + "type": "GcsDestination", + "id": 1 + } + } + }, + "KnowledgeOperationMetadata": { + "oneofs": { + "operationMetadata": { + "oneof": [ + "exportOperationMetadata" + ] + } + }, + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "knowledgeBase": { + "type": "string", + "id": 3 + }, + "exportOperationMetadata": { + "type": "ExportOperationMetadata", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "DONE": 3 + } + } + } + }, + "ReloadDocumentRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" } }, - "conversationProfile": { - "type": "ConversationProfile", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "gcsSource": { + "type": "GcsSource", + "id": 3 + }, + "importGcsCustomMetadata": { + "type": "bool", + "id": 4 } } }, - "UpdateConversationProfileRequest": { + "GcsSources": { "fields": { - "conversationProfile": { - "type": "ConversationProfile", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "uris": { + "rule": "repeated", + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -16649,44 +16891,43 @@ } } }, - "DeleteConversationProfileRequest": { + "GcsSource": { "fields": { - "name": { + "uri": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" - } + "id": 1 } } }, - "Documents": { + "GcsDestination": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "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": { - "ListDocuments": { - "requestType": "ListDocumentsRequest", - "responseType": "ListDocumentsResponse", + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", "options": { - "(google.api.http).get": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", - "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", + "(google.api.http).get": "/v2beta1/{parent=projects/*/agent}/environments", + "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", - "additional_bindings": [ - { - "get": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents" - }, - { - "get": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" - } - ] + "get": "/v2beta1/{parent=projects/*/agent}/environments", + "additional_bindings": { + "get": "/v2beta1/{parent=projects/*/locations/*/agent}/environments" + } } }, { @@ -16694,370 +16935,238 @@ } ] }, - "GetDocument": { - "requestType": "GetDocumentRequest", - "responseType": "Document", - "options": { - "(google.api.http).get": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", - "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", - "additional_bindings": [ - { - "get": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - }, - { - "get": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateDocument": { - "requestType": "CreateDocumentRequest", - "responseType": "google.longrunning.Operation", + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", - "(google.api.http).body": "document", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", - "(google.api.http).additional_bindings.body": "document", - "(google.api.method_signature)": "parent,document", - "(google.longrunning.operation_info).response_type": "Document", - "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + "(google.api.http).get": "/v2beta1/{name=projects/*/agent/environments/*}", + "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents", - "body": "document", - "additional_bindings": [ - { - "post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents", - "body": "document" - }, - { - "post": "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents", - "body": "document" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,document" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Document", - "metadata_type": "KnowledgeOperationMetadata" + "get": "/v2beta1/{name=projects/*/agent/environments/*}", + "additional_bindings": { + "get": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" + } } } ] }, - "ImportDocuments": { - "requestType": "ImportDocumentsRequest", - "responseType": "google.longrunning.Operation", + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "Environment", "options": { - "(google.api.http).post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:import", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import", - "(google.api.http).additional_bindings.body": "*", - "(google.longrunning.operation_info).response_type": "ImportDocumentsResponse", - "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + "(google.api.http).post": "/v2beta1/{parent=projects/*/agent}/environments", + "(google.api.http).body": "environment", + "(google.api.http).additional_bindings.post": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", + "(google.api.http).additional_bindings.body": "environment" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:import", - "body": "*", + "post": "/v2beta1/{parent=projects/*/agent}/environments", + "body": "environment", "additional_bindings": { - "post": "/v2beta1/{parent=projects/*/locations/*/knowledgeBases/*}/documents:import", - "body": "*" + "post": "/v2beta1/{parent=projects/*/locations/*/agent}/environments", + "body": "environment" } } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ImportDocumentsResponse", - "metadata_type": "KnowledgeOperationMetadata" - } } ] }, - "DeleteDocument": { - "requestType": "DeleteDocumentRequest", - "responseType": "google.longrunning.Operation", + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "Environment", "options": { - "(google.api.http).delete": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", - "(google.api.http).additional_bindings.delete": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + "(google.api.http).patch": "/v2beta1/{environment.name=projects/*/agent/environments/*}", + "(google.api.http).body": "environment", + "(google.api.http).additional_bindings.patch": "/v2beta1/{environment.name=projects/*/locations/*/agent/environments/*}", + "(google.api.http).additional_bindings.body": "environment" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}", - "additional_bindings": [ - { - "delete": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}" - }, - { - "delete": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "KnowledgeOperationMetadata" + "patch": "/v2beta1/{environment.name=projects/*/agent/environments/*}", + "body": "environment", + "additional_bindings": { + "patch": "/v2beta1/{environment.name=projects/*/locations/*/agent/environments/*}", + "body": "environment" + } } } ] }, - "UpdateDocument": { - "requestType": "UpdateDocumentRequest", - "responseType": "google.longrunning.Operation", + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).patch": "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}", - "(google.api.http).body": "document", - "(google.api.http).additional_bindings.patch": "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}", - "(google.api.http).additional_bindings.body": "document", - "(google.api.method_signature)": "document", - "(google.longrunning.operation_info).response_type": "Document", - "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + "(google.api.http).delete": "/v2beta1/{name=projects/*/agent/environments/*}", + "(google.api.http).additional_bindings.delete": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" }, "parsedOptions": [ { "(google.api.http)": { - "patch": "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}", - "body": "document", - "additional_bindings": [ - { - "patch": "/v2beta1/{document.name=projects/*/locations/*/knowledgeBases/*/documents/*}", - "body": "document" - }, - { - "patch": "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}", - "body": "document" - } - ] - } - }, - { - "(google.api.method_signature)": "document,update_mask" - }, - { - "(google.api.method_signature)": "document" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Document", - "metadata_type": "KnowledgeOperationMetadata" + "delete": "/v2beta1/{name=projects/*/agent/environments/*}", + "additional_bindings": { + "delete": "/v2beta1/{name=projects/*/locations/*/agent/environments/*}" + } } } ] }, - "ReloadDocument": { - "requestType": "ReloadDocumentRequest", - "responseType": "google.longrunning.Operation", + "GetEnvironmentHistory": { + "requestType": "GetEnvironmentHistoryRequest", + "responseType": "EnvironmentHistory", "options": { - "(google.api.http).post": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "name,gcs_source", - "(google.longrunning.operation_info).response_type": "Document", - "(google.longrunning.operation_info).metadata_type": "KnowledgeOperationMetadata" + "(google.api.http).get": "/v2beta1/{parent=projects/*/agent/environments/*}/history", + "(google.api.http).additional_bindings.get": "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/history" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload", - "body": "*", - "additional_bindings": [ - { - "post": "/v2beta1/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:reload", - "body": "*" - }, - { - "post": "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload", - "body": "*" - } - ] - } - }, - { - "(google.api.method_signature)": "name,gcs_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Document", - "metadata_type": "KnowledgeOperationMetadata" + "get": "/v2beta1/{parent=projects/*/agent/environments/*}/history", + "additional_bindings": { + "get": "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/history" + } } } ] } } }, - "Document": { + "Environment": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/Document", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}" - }, - "oneofs": { - "source": { - "oneof": [ - "contentUri", - "content", - "rawContent" - ] - } + "(google.api.resource).type": "dialogflow.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agent/environments/{environment}" }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "displayName": { + "description": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "mimeType": { + "agentVersion": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Version" } }, - "knowledgeTypes": { - "rule": "repeated", - "type": "KnowledgeType", + "state": { + "type": "State", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "contentUri": { - "type": "string", - "id": 5 - }, - "content": { - "type": "string", - "id": 6, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, "options": { - "deprecated": true + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "rawContent": { - "type": "bytes", - "id": 9 - }, - "enableAutoReload": { - "type": "bool", - "id": 11, + "textToSpeechSettings": { + "type": "TextToSpeechSettings", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "latestReloadStatus": { - "type": "ReloadStatus", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 7, + "fulfillment": { + "type": "Fulfillment", + "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL" } } }, "nested": { - "KnowledgeType": { + "State": { "values": { - "KNOWLEDGE_TYPE_UNSPECIFIED": 0, - "FAQ": 1, - "EXTRACTIVE_QA": 2, - "ARTICLE_SUGGESTION": 3, - "SMART_REPLY": 4 - } - }, - "ReloadStatus": { - "fields": { - "time": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "status": { - "type": "google.rpc.Status", - "id": 2 - } + "STATE_UNSPECIFIED": 0, + "STOPPED": 1, + "LOADING": 2, + "RUNNING": 3 } } } }, - "GetDocumentRequest": { + "TextToSpeechSettings": { "fields": { - "name": { - "type": "string", + "enableTextToSpeech": { + "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputAudioEncoding": { + "type": "OutputAudioEncoding", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sampleRateHertz": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "synthesizeSpeechConfigs": { + "keyType": "string", + "type": "SynthesizeSpeechConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListDocumentsRequest": { + "ListEnvironmentsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListDocumentsResponse": { + "ListEnvironmentsResponse": { "fields": { - "documents": { + "environments": { "rule": "repeated", - "type": "Document", + "type": "Environment", "id": 1 }, "nextPageToken": { @@ -17066,212 +17175,322 @@ } } }, - "CreateDocumentRequest": { + "GetEnvironmentRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" - } - }, - "document": { - "type": "Document", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } - }, - "importGcsCustomMetadata": { - "type": "bool", - "id": 3 } } }, - "ImportDocumentsRequest": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource" - ] - } - }, + "CreateEnvironmentRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Document" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/Environment" } }, - "gcsSource": { - "type": "GcsSources", - "id": 2 + "environment": { + "type": "Environment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "documentTemplate": { - "type": "ImportDocumentTemplate", + "environmentId": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "importGcsCustomMetadata": { - "type": "bool", - "id": 4 } } }, - "ImportDocumentTemplate": { + "UpdateEnvironmentRequest": { "fields": { - "mimeType": { - "type": "string", + "environment": { + "type": "Environment", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "knowledgeTypes": { - "rule": "repeated", - "type": "Document.KnowledgeType", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 - } - } - }, - "ImportDocumentsResponse": { - "fields": { - "warnings": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 1 + "allowLoadToDraftAndDiscardChanges": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "DeleteDocumentRequest": { + "DeleteEnvironmentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } } } }, - "UpdateDocumentRequest": { + "GetEnvironmentHistoryRequest": { "fields": { - "document": { - "type": "Document", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "pageSize": { + "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "KnowledgeOperationMetadata": { + "EnvironmentHistory": { "fields": { - "state": { - "type": "State", + "parent": { + "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "knowledgeBase": { + "entries": { + "rule": "repeated", + "type": "Entry", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nextPageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "DONE": 3 + "Entry": { + "fields": { + "agentVersion": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } } } } }, - "ReloadDocumentRequest": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource" - ] - } + "Fulfillments": { + "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" }, - "fields": { - "name": { - "type": "string", - "id": 1, + "methods": { + "GetFulfillment": { + "requestType": "GetFulfillmentRequest", + "responseType": "Fulfillment", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" - } - }, - "gcsSource": { - "type": "GcsSource", - "id": 3 + "(google.api.http).get": "/v2beta1/{name=projects/*/agent/fulfillment}", + "(google.api.http).additional_bindings.get": "/v2beta1/{name=projects/*/locations/*/agent/fulfillment}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{name=projects/*/agent/fulfillment}", + "additional_bindings": { + "get": "/v2beta1/{name=projects/*/locations/*/agent/fulfillment}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "importGcsCustomMetadata": { - "type": "bool", - "id": 4 + "UpdateFulfillment": { + "requestType": "UpdateFulfillmentRequest", + "responseType": "Fulfillment", + "options": { + "(google.api.http).patch": "/v2beta1/{fulfillment.name=projects/*/agent/fulfillment}", + "(google.api.http).body": "fulfillment", + "(google.api.http).additional_bindings.patch": "/v2beta1/{fulfillment.name=projects/*/locations/*/agent/fulfillment}", + "(google.api.http).additional_bindings.body": "fulfillment", + "(google.api.method_signature)": "fulfillment,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2beta1/{fulfillment.name=projects/*/agent/fulfillment}", + "body": "fulfillment", + "additional_bindings": { + "patch": "/v2beta1/{fulfillment.name=projects/*/locations/*/agent/fulfillment}", + "body": "fulfillment" + } + } + }, + { + "(google.api.method_signature)": "fulfillment,update_mask" + } + ] } } }, - "ConversationEvent": { + "Fulfillment": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/Fulfillment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/agent/fulfillment" + }, "oneofs": { - "payload": { + "fulfillment": { "oneof": [ - "newMessagePayload" + "genericWebService" ] } }, "fields": { - "conversation": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "type": { - "type": "Type", + "displayName": { + "type": "string", "id": 2 }, - "errorStatus": { - "type": "google.rpc.Status", + "genericWebService": { + "type": "GenericWebService", "id": 3 }, - "newMessagePayload": { - "type": "Message", + "enabled": { + "type": "bool", "id": 4 + }, + "features": { + "rule": "repeated", + "type": "Feature", + "id": 5 } }, "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CONVERSATION_STARTED": 1, - "CONVERSATION_FINISHED": 2, - "NEW_MESSAGE": 5, - "UNRECOVERABLE_ERROR": 4 + "GenericWebService": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "username": { + "type": "string", + "id": 2 + }, + "password": { + "type": "string", + "id": 3 + }, + "requestHeaders": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "isCloudFunction": { + "type": "bool", + "id": 5, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Feature": { + "fields": { + "type": { + "type": "Type", + "id": 1 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SMALLTALK": 1 + } + } + } + } + } + }, + "GetFulfillmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Fulfillment" + } + } + } + }, + "UpdateFulfillmentRequest": { + "fields": { + "fulfillment": { + "type": "Fulfillment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js index 7ec3c8b0020..d97f077db1a 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js @@ -37,6 +37,11 @@ function main(parent) { * URI to export the agent to. * The format of this URI must be `gs:///`. * If left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js index da0ba5dedd0..aab0be3f6d5 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js @@ -34,6 +34,11 @@ function main(parent) { /** * The URI to a Google Cloud Storage file containing the agent to import. * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' /** diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js index 4237b7c9a75..7eed51da7e8 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js @@ -34,6 +34,11 @@ function main(parent) { /** * The URI to a Google Cloud Storage file containing the agent to restore. * Note: The URI must start with "gs://". + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' /** diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js new file mode 100644 index 00000000000..c7b535a99c0 --- /dev/null +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js @@ -0,0 +1,72 @@ +// Copyright 2022 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. ** + + + +'use strict'; + +function main(conversationProfile, participantRole, suggestionFeatureType) { + // [START dialogflow_v2beta1_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + */ + // const conversationProfile = 'abc123' + /** + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + */ + // const participantRole = {} + /** + * Required. The type of the suggestion feature to remove. + */ + // const suggestionFeatureType = {} + + // Imports the Dialogflow library + const {ConversationProfilesClient} = require('@google-cloud/dialogflow').v2beta1; + + // Instantiates a client + const dialogflowClient = new ConversationProfilesClient(); + + async function callClearSuggestionFeatureConfig() { + // Construct request + const request = { + conversationProfile, + participantRole, + suggestionFeatureType, + }; + + // Run request + const [operation] = await dialogflowClient.clearSuggestionFeatureConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callClearSuggestionFeatureConfig(); + // [END dialogflow_v2beta1_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js new file mode 100644 index 00000000000..453bd5bb45d --- /dev/null +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js @@ -0,0 +1,72 @@ +// Copyright 2022 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. ** + + + +'use strict'; + +function main(conversationProfile, participantRole, suggestionFeatureConfig) { + // [START dialogflow_v2beta1_generated_ConversationProfiles_SetSuggestionFeatureConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + */ + // const conversationProfile = 'abc123' + /** + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + */ + // const participantRole = {} + /** + * Required. The suggestion feature config to add or update. + */ + // const suggestionFeatureConfig = {} + + // Imports the Dialogflow library + const {ConversationProfilesClient} = require('@google-cloud/dialogflow').v2beta1; + + // Instantiates a client + const dialogflowClient = new ConversationProfilesClient(); + + async function callSetSuggestionFeatureConfig() { + // Construct request + const request = { + conversationProfile, + participantRole, + suggestionFeatureConfig, + }; + + // Run request + const [operation] = await dialogflowClient.setSuggestionFeatureConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSetSuggestionFeatureConfig(); + // [END dialogflow_v2beta1_generated_ConversationProfiles_SetSuggestionFeatureConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index 843295a0425..a141a2ba3b5 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -234,7 +234,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 66, "type": "FULL" } ], @@ -278,7 +278,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 67, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 67, "type": "FULL" } ], @@ -1011,6 +1011,102 @@ } } }, + { + "regionTag": "dialogflow_v2beta1_generated_ConversationProfiles_SetSuggestionFeatureConfig_async", + "title": "dialogflow setSuggestionFeatureConfig Sample", + "origin": "API_DEFINITION", + "description": " Adds or updates a suggestion feature in a conversation profile. If the conversation profile contains the type of suggestion feature for the participant role, it will update it. Otherwise it will insert the suggestion feature. This method is a [long-running operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The returned `Operation` type has the following method-specific fields: - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata] - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile] If a long running operation to add or update suggestion feature config for the same conversation profile, participant role and suggestion feature type exists, please cancel the existing long running operation before sending such request, otherwise the request will be rejected.", + "canonical": true, + "file": "conversation_profiles.set_suggestion_feature_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetSuggestionFeatureConfig", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles.SetSuggestionFeatureConfig", + "async": true, + "parameters": [ + { + "name": "conversation_profile", + "type": "TYPE_STRING" + }, + { + "name": "participant_role", + "type": ".google.cloud.dialogflow.v2beta1.Participant.Role" + }, + { + "name": "suggestion_feature_config", + "type": ".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConversationProfilesClient", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfilesClient" + }, + "method": { + "shortName": "SetSuggestionFeatureConfig", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles.SetSuggestionFeatureConfig", + "service": { + "shortName": "ConversationProfiles", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles" + } + } + } + }, + { + "regionTag": "dialogflow_v2beta1_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async", + "title": "dialogflow clearSuggestionFeatureConfig Sample", + "origin": "API_DEFINITION", + "description": " Clears a suggestion feature from a conversation profile for the given participant role. This method is a [long-running operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). The returned `Operation` type has the following method-specific fields: - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata] - `response`: [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]", + "canonical": true, + "file": "conversation_profiles.clear_suggestion_feature_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ClearSuggestionFeatureConfig", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles.ClearSuggestionFeatureConfig", + "async": true, + "parameters": [ + { + "name": "conversation_profile", + "type": "TYPE_STRING" + }, + { + "name": "participant_role", + "type": ".google.cloud.dialogflow.v2beta1.Participant.Role" + }, + { + "name": "suggestion_feature_type", + "type": ".google.cloud.dialogflow.v2beta1.SuggestionFeature.Type" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConversationProfilesClient", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfilesClient" + }, + "method": { + "shortName": "ClearSuggestionFeatureConfig", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles.ClearSuggestionFeatureConfig", + "service": { + "shortName": "ConversationProfiles", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationProfiles" + } + } + } + }, { "regionTag": "dialogflow_v2beta1_generated_Conversations_CreateConversation_async", "title": "dialogflow createConversation Sample", diff --git a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts index a0174b8714a..a1112e9033e 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/agents_client.ts @@ -1070,6 +1070,12 @@ export class AgentsClient { * URI to export the agent to. * The format of this URI must be `gs:///`. * If left unspecified, the serialized agent is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @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. @@ -1236,6 +1242,12 @@ export class AgentsClient { * @param {string} request.agentUri * The URI to a Google Cloud Storage file containing the agent to import. * Note: The URI must start with "gs://". + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {Buffer} request.agentContent * Zip compressed raw byte content for agent. * @param {object} [options] @@ -1400,6 +1412,12 @@ export class AgentsClient { * @param {string} request.agentUri * The URI to a Google Cloud Storage file containing the agent to restore. * Note: The URI must start with "gs://". + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {Buffer} request.agentContent * Zip compressed raw byte content for agent. * @param {object} [options] diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts index 6393fc324bb..162db21c48e 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + LROperation, PaginationCallback, GaxCall, } from 'google-gax'; @@ -37,7 +38,7 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './conversation_profiles_client_config.json'; - +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -63,6 +64,7 @@ export class ConversationProfilesClient { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; conversationProfilesStub?: Promise<{[name: string]: Function}>; /** @@ -302,6 +304,52 @@ export class ConversationProfilesClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const setSuggestionFeatureConfigResponse = protoFilesRoot.lookup( + '.google.cloud.dialogflow.v2beta1.ConversationProfile' + ) as gax.protobuf.Type; + const setSuggestionFeatureConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata' + ) as gax.protobuf.Type; + const clearSuggestionFeatureConfigResponse = protoFilesRoot.lookup( + '.google.cloud.dialogflow.v2beta1.ConversationProfile' + ) as gax.protobuf.Type; + const clearSuggestionFeatureConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + setSuggestionFeatureConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + setSuggestionFeatureConfigResponse.decode.bind( + setSuggestionFeatureConfigResponse + ), + setSuggestionFeatureConfigMetadata.decode.bind( + setSuggestionFeatureConfigMetadata + ) + ), + clearSuggestionFeatureConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + clearSuggestionFeatureConfigResponse.decode.bind( + clearSuggestionFeatureConfigResponse + ), + clearSuggestionFeatureConfigMetadata.decode.bind( + clearSuggestionFeatureConfigMetadata + ) + ), + }; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.dialogflow.v2beta1.ConversationProfiles', @@ -358,6 +406,8 @@ export class ConversationProfilesClient { 'createConversationProfile', 'updateConversationProfile', 'deleteConversationProfile', + 'setSuggestionFeatureConfig', + 'clearSuggestionFeatureConfig', ]; for (const methodName of conversationProfilesStubMethods) { const callPromise = this.conversationProfilesStub.then( @@ -374,7 +424,10 @@ export class ConversationProfilesClient { } ); - const descriptor = this.descriptors.page[methodName] || undefined; + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -865,6 +918,325 @@ export class ConversationProfilesClient { ); } + /** + * Adds or updates a suggestion feature in a conversation profile. + * If the conversation profile contains the type of suggestion feature for + * the participant role, it will update it. Otherwise it will insert the + * suggestion feature. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: {@link google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata|SetSuggestionFeatureConfigOperationMetadata} + * - `response`: {@link google.cloud.dialogflow.v2beta1.ConversationProfile|ConversationProfile} + * + * If a long running operation to add or update suggestion feature + * config for the same conversation profile, participant role and suggestion + * feature type exists, please cancel the existing long running operation + * before sending such request, otherwise the request will be rejected. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.conversationProfile + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @param {google.cloud.dialogflow.v2beta1.Participant.Role} request.participantRole + * Required. The participant role to add or update the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig} request.suggestionFeatureConfig + * Required. The suggestion feature config to add or update. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js + * region_tag:dialogflow_v2beta1_generated_ConversationProfiles_SetSuggestionFeatureConfig_async + */ + setSuggestionFeatureConfig( + request?: protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + setSuggestionFeatureConfig( + request: protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setSuggestionFeatureConfig( + request: protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setSuggestionFeatureConfig( + request?: protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + conversation_profile: request.conversationProfile || '', + }); + this.initialize(); + return this.innerApiCalls.setSuggestionFeatureConfig( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `setSuggestionFeatureConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js + * region_tag:dialogflow_v2beta1_generated_ConversationProfiles_SetSuggestionFeatureConfig_async + */ + async checkSetSuggestionFeatureConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dialogflow.v2beta1.ConversationProfile, + protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.setSuggestionFeatureConfig, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dialogflow.v2beta1.ConversationProfile, + protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigOperationMetadata + >; + } + /** + * Clears a suggestion feature from a conversation profile for the given + * participant role. + * + * This method is a [long-running + * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). + * The returned `Operation` type has the following method-specific fields: + * + * - `metadata`: {@link google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata|ClearSuggestionFeatureConfigOperationMetadata} + * - `response`: {@link google.cloud.dialogflow.v2beta1.ConversationProfile|ConversationProfile} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.conversationProfile + * Required. The Conversation Profile to add or update the suggestion feature + * config. Format: `projects//locations//conversationProfiles/`. + * @param {google.cloud.dialogflow.v2beta1.Participant.Role} request.participantRole + * Required. The participant role to remove the suggestion feature + * config. Only HUMAN_AGENT or END_USER can be used. + * @param {google.cloud.dialogflow.v2beta1.SuggestionFeature.Type} request.suggestionFeatureType + * Required. The type of the suggestion feature to remove. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js + * region_tag:dialogflow_v2beta1_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async + */ + clearSuggestionFeatureConfig( + request?: protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + clearSuggestionFeatureConfig( + request: protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + clearSuggestionFeatureConfig( + request: protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + clearSuggestionFeatureConfig( + request?: protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + conversation_profile: request.conversationProfile || '', + }); + this.initialize(); + return this.innerApiCalls.clearSuggestionFeatureConfig( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `clearSuggestionFeatureConfig()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js + * region_tag:dialogflow_v2beta1_generated_ConversationProfiles_ClearSuggestionFeatureConfig_async + */ + async checkClearSuggestionFeatureConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dialogflow.v2beta1.ConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.clearSuggestionFeatureConfig, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dialogflow.v2beta1.ConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigOperationMetadata + >; + } /** * Returns the list of all conversation profiles in the specified project. * @@ -3364,6 +3736,7 @@ export class ConversationProfilesClient { return this.conversationProfilesStub.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client_config.json b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client_config.json index 1a172fb9198..080a39ac373 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client_config.json +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversation_profiles_client_config.json @@ -47,6 +47,16 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "SetSuggestionFeatureConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" + }, + "ClearSuggestionFeatureConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json b/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json index 29a7df99f33..8b595436788 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json +++ b/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json @@ -264,6 +264,16 @@ "deleteConversationProfile" ] }, + "SetSuggestionFeatureConfig": { + "methods": [ + "setSuggestionFeatureConfig" + ] + }, + "ClearSuggestionFeatureConfig": { + "methods": [ + "clearSuggestionFeatureConfig" + ] + }, "ListConversationProfiles": { "methods": [ "listConversationProfiles", @@ -296,6 +306,16 @@ "deleteConversationProfile" ] }, + "SetSuggestionFeatureConfig": { + "methods": [ + "setSuggestionFeatureConfig" + ] + }, + "ClearSuggestionFeatureConfig": { + "methods": [ + "clearSuggestionFeatureConfig" + ] + }, "ListConversationProfiles": { "methods": [ "listConversationProfiles", diff --git a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts index 2f6468fc09e..1908a97a107 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversation_profiles_v2beta1.ts @@ -25,7 +25,7 @@ import * as conversationprofilesModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -51,6 +51,38 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + function stubPageStreamingCall( responses?: ResponseType[], error?: Error @@ -770,6 +802,414 @@ describe('v2beta1.ConversationProfilesClient', () => { }); }); + describe('setSuggestionFeatureConfig', () => { + it('invokes setSuggestionFeatureConfig without error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setSuggestionFeatureConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.setSuggestionFeatureConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes setSuggestionFeatureConfig without error using callback', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setSuggestionFeatureConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setSuggestionFeatureConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.ISetSuggestionFeatureConfigOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.setSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes setSuggestionFeatureConfig with call error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setSuggestionFeatureConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.setSuggestionFeatureConfig(request), + expectedError + ); + assert( + (client.innerApiCalls.setSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes setSuggestionFeatureConfig with LRO error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.SetSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.setSuggestionFeatureConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.setSuggestionFeatureConfig(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.setSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkSetSuggestionFeatureConfigProgress without error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkSetSuggestionFeatureConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSetSuggestionFeatureConfigProgress with error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkSetSuggestionFeatureConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('clearSuggestionFeatureConfig', () => { + it('invokes clearSuggestionFeatureConfig without error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.clearSuggestionFeatureConfig = + stubLongRunningCall(expectedResponse); + const [operation] = await client.clearSuggestionFeatureConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.clearSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes clearSuggestionFeatureConfig without error using callback', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.clearSuggestionFeatureConfig = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.clearSuggestionFeatureConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dialogflow.v2beta1.IConversationProfile, + protos.google.cloud.dialogflow.v2beta1.IClearSuggestionFeatureConfigOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.clearSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes clearSuggestionFeatureConfig with call error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.clearSuggestionFeatureConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.clearSuggestionFeatureConfig(request), + expectedError + ); + assert( + (client.innerApiCalls.clearSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes clearSuggestionFeatureConfig with LRO error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.ClearSuggestionFeatureConfigRequest() + ); + request.conversationProfile = ''; + const expectedHeaderRequestParams = 'conversation_profile='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.clearSuggestionFeatureConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.clearSuggestionFeatureConfig(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.clearSuggestionFeatureConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkClearSuggestionFeatureConfigProgress without error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkClearSuggestionFeatureConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkClearSuggestionFeatureConfigProgress with error', async () => { + const client = + new conversationprofilesModule.v2beta1.ConversationProfilesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkClearSuggestionFeatureConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listConversationProfiles', () => { it('invokes listConversationProfiles without error', async () => { const client =