From 471c6a30cb7d5dc00a96f5e84aefc8afe4d8ada3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 00:15:23 -0800 Subject: [PATCH] fix: update proto definitions (#1010) fix: update proto definitions Source-Link: https://github.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 3 +- protos/protos.d.ts | 2 +- protos/protos.js | 1006 ++++++++++++++++++++++++++++++++----- protos/protos.json | 20 + 4 files changed, 900 insertions(+), 131 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 4d586c42..0c6d0002 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e -# created: 2022-08-26T22:34:55.905845397Z + digest: sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 93c80d1e..d8bcf9df 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/protos/protos.js b/protos/protos.js index 16c8da64..aee34af8 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -795,6 +795,12 @@ if (object.enableLogging != null) message.enableLogging = Boolean(object.enableLogging); switch (object.matchMode) { + default: + if (typeof object.matchMode === "number") { + message.matchMode = object.matchMode; + break; + } + break; case "MATCH_MODE_UNSPECIFIED": case 0: message.matchMode = 0; @@ -811,6 +817,12 @@ if (object.classificationThreshold != null) message.classificationThreshold = Number(object.classificationThreshold); switch (object.apiVersion) { + default: + if (typeof object.apiVersion === "number") { + message.apiVersion = object.apiVersion; + break; + } + break; case "API_VERSION_UNSPECIFIED": case 0: message.apiVersion = 0; @@ -829,6 +841,12 @@ break; } switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; case "TIER_UNSPECIFIED": case 0: message.tier = 0; @@ -897,13 +915,13 @@ if (message.enableLogging != null && message.hasOwnProperty("enableLogging")) object.enableLogging = message.enableLogging; if (message.matchMode != null && message.hasOwnProperty("matchMode")) - object.matchMode = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.MatchMode[message.matchMode] : message.matchMode; + object.matchMode = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.MatchMode[message.matchMode] === undefined ? message.matchMode : $root.google.cloud.dialogflow.v2.Agent.MatchMode[message.matchMode] : message.matchMode; if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.ApiVersion[message.apiVersion] : message.apiVersion; + object.apiVersion = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.ApiVersion[message.apiVersion] === undefined ? message.apiVersion : $root.google.cloud.dialogflow.v2.Agent.ApiVersion[message.apiVersion] : message.apiVersion; if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.Tier[message.tier] : message.tier; + object.tier = options.enums === String ? $root.google.cloud.dialogflow.v2.Agent.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.dialogflow.v2.Agent.Tier[message.tier] : message.tier; return object; }; @@ -3795,6 +3813,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.ValidationError(); switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; case "SEVERITY_UNSPECIFIED": case 0: message.severity = 0; @@ -3848,7 +3872,7 @@ object.errorMessage = ""; } if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.v2.ValidationError.Severity[message.severity] : message.severity; + object.severity = options.enums === String ? $root.google.cloud.dialogflow.v2.ValidationError.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.v2.ValidationError.Severity[message.severity] : message.severity; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) @@ -5542,6 +5566,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.AnswerFeedback(); switch (object.correctnessLevel) { + default: + if (typeof object.correctnessLevel === "number") { + message.correctnessLevel = object.correctnessLevel; + break; + } + break; case "CORRECTNESS_LEVEL_UNSPECIFIED": case 0: message.correctnessLevel = 0; @@ -5602,7 +5632,7 @@ object.displayTime = null; } if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) - object.correctnessLevel = options.enums === String ? $root.google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; + object.correctnessLevel = options.enums === String ? $root.google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] === undefined ? message.correctnessLevel : $root.google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; if (message.agentAssistantDetailFeedback != null && message.hasOwnProperty("agentAssistantDetailFeedback")) { object.agentAssistantDetailFeedback = $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.toObject(message.agentAssistantDetailFeedback, options); if (options.oneofs) @@ -5870,6 +5900,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.AgentAssistantFeedback(); switch (object.answerRelevance) { + default: + if (typeof object.answerRelevance === "number") { + message.answerRelevance = object.answerRelevance; + break; + } + break; case "ANSWER_RELEVANCE_UNSPECIFIED": case 0: message.answerRelevance = 0; @@ -5884,6 +5920,12 @@ break; } switch (object.documentCorrectness) { + default: + if (typeof object.documentCorrectness === "number") { + message.documentCorrectness = object.documentCorrectness; + break; + } + break; case "DOCUMENT_CORRECTNESS_UNSPECIFIED": case 0: message.documentCorrectness = 0; @@ -5898,6 +5940,12 @@ break; } switch (object.documentEfficiency) { + default: + if (typeof object.documentEfficiency === "number") { + message.documentEfficiency = object.documentEfficiency; + break; + } + break; case "DOCUMENT_EFFICIENCY_UNSPECIFIED": case 0: message.documentEfficiency = 0; @@ -5933,11 +5981,11 @@ object.documentEfficiency = options.enums === String ? "DOCUMENT_EFFICIENCY_UNSPECIFIED" : 0; } if (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) - object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] : message.answerRelevance; + object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] === undefined ? message.answerRelevance : $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] : message.answerRelevance; if (message.documentCorrectness != null && message.hasOwnProperty("documentCorrectness")) - object.documentCorrectness = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] : message.documentCorrectness; + object.documentCorrectness = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] === undefined ? message.documentCorrectness : $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] : message.documentCorrectness; if (message.documentEfficiency != null && message.hasOwnProperty("documentEfficiency")) - object.documentEfficiency = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] : message.documentEfficiency; + object.documentEfficiency = options.enums === String ? $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] === undefined ? message.documentEfficiency : $root.google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] : message.documentEfficiency; return object; }; @@ -6818,6 +6866,12 @@ if (object.name != null) message.name = String(object.name); switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.role = 0; @@ -6870,7 +6924,7 @@ 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.v2.Participant.Role[message.role] : message.role; + object.role = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.role] === undefined ? message.role : $root.google.cloud.dialogflow.v2.Participant.Role[message.role] : message.role; if (message.sipRecordingMediaLabel != null && message.hasOwnProperty("sipRecordingMediaLabel")) object.sipRecordingMediaLabel = message.sipRecordingMediaLabel; var keys2; @@ -7246,6 +7300,12 @@ if (object.participant != null) message.participant = String(object.participant); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -7319,7 +7379,7 @@ 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.v2.Participant.Role[message.participantRole] : message.participantRole; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.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")) @@ -11651,6 +11711,12 @@ message.detectIntentResponse = $root.google.cloud.dialogflow.v2.DetectIntentResponse.fromObject(object.detectIntentResponse); } switch (object.automatedAgentReplyType) { + default: + if (typeof object.automatedAgentReplyType === "number") { + message.automatedAgentReplyType = object.automatedAgentReplyType; + break; + } + break; case "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": case 0: message.automatedAgentReplyType = 0; @@ -11690,7 +11756,7 @@ if (message.detectIntentResponse != null && message.hasOwnProperty("detectIntentResponse")) object.detectIntentResponse = $root.google.cloud.dialogflow.v2.DetectIntentResponse.toObject(message.detectIntentResponse, options); if (message.automatedAgentReplyType != null && message.hasOwnProperty("automatedAgentReplyType")) - object.automatedAgentReplyType = options.enums === String ? $root.google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] : message.automatedAgentReplyType; + object.automatedAgentReplyType = options.enums === String ? $root.google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] === undefined ? message.automatedAgentReplyType : $root.google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] : message.automatedAgentReplyType; if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) object.allowCancellation = message.allowCancellation; return object; @@ -14709,6 +14775,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.InputAudioConfig(); switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; case "AUDIO_ENCODING_UNSPECIFIED": case 0: message.audioEncoding = 0; @@ -14768,6 +14840,12 @@ if (object.model != null) message.model = String(object.model); switch (object.modelVariant) { + default: + if (typeof object.modelVariant === "number") { + message.modelVariant = object.modelVariant; + break; + } + break; case "SPEECH_MODEL_VARIANT_UNSPECIFIED": case 0: message.modelVariant = 0; @@ -14820,7 +14898,7 @@ object.disableNoSpeechRecognizedEvent = false; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.AudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.v2.AudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.languageCode != null && message.hasOwnProperty("languageCode")) @@ -14835,7 +14913,7 @@ 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.v2.SpeechModelVariant[message.modelVariant] : message.modelVariant; + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.v2.SpeechModelVariant[message.modelVariant] : message.modelVariant; if (message.speechContexts && message.speechContexts.length) { object.speechContexts = []; for (var j = 0; j < message.speechContexts.length; ++j) @@ -15072,6 +15150,12 @@ if (object.name != null) message.name = String(object.name); switch (object.ssmlGender) { + default: + if (typeof object.ssmlGender === "number") { + message.ssmlGender = object.ssmlGender; + break; + } + break; case "SSML_VOICE_GENDER_UNSPECIFIED": case 0: message.ssmlGender = 0; @@ -15112,7 +15196,7 @@ 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.v2.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.v2.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.v2.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; @@ -15682,6 +15766,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.OutputAudioConfig(); switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": case 0: message.audioEncoding = 0; @@ -15736,7 +15826,7 @@ object.synthesizeSpeechConfig = null; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.v2.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) @@ -15930,6 +16020,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.SpeechToTextConfig(); switch (object.speechModelVariant) { + default: + if (typeof object.speechModelVariant === "number") { + message.speechModelVariant = object.speechModelVariant; + break; + } + break; case "SPEECH_MODEL_VARIANT_UNSPECIFIED": case 0: message.speechModelVariant = 0; @@ -15966,7 +16062,7 @@ 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.v2.SpeechModelVariant[message.speechModelVariant] : message.speechModelVariant; + object.speechModelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2.SpeechModelVariant[message.speechModelVariant] === undefined ? message.speechModelVariant : $root.google.cloud.dialogflow.v2.SpeechModelVariant[message.speechModelVariant] : message.speechModelVariant; return object; }; @@ -19138,6 +19234,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.StreamingRecognitionResult(); switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; case "MESSAGE_TYPE_UNSPECIFIED": case 0: message.messageType = 0; @@ -19201,7 +19303,7 @@ object.languageCode = ""; } if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $root.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; if (message.isFinal != null && message.hasOwnProperty("isFinal")) @@ -23312,6 +23414,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.webhookState) { + default: + if (typeof object.webhookState === "number") { + message.webhookState = object.webhookState; + break; + } + break; case "WEBHOOK_STATE_UNSPECIFIED": case 0: message.webhookState = 0; @@ -23400,6 +23508,10 @@ for (var i = 0; i < object.defaultResponsePlatforms.length; ++i) switch (object.defaultResponsePlatforms[i]) { default: + if (typeof object.defaultResponsePlatforms[i] === "number") { + message.defaultResponsePlatforms[i] = object.defaultResponsePlatforms[i]; + break; + } case "PLATFORM_UNSPECIFIED": case 0: message.defaultResponsePlatforms[i] = 0; @@ -23505,7 +23617,7 @@ if (message.isFallback != null && message.hasOwnProperty("isFallback")) object.isFallback = message.isFallback; if (message.webhookState != null && message.hasOwnProperty("webhookState")) - object.webhookState = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.WebhookState[message.webhookState] : message.webhookState; + object.webhookState = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.WebhookState[message.webhookState] === undefined ? message.webhookState : $root.google.cloud.dialogflow.v2.Intent.WebhookState[message.webhookState] : message.webhookState; if (message.inputContextNames && message.inputContextNames.length) { object.inputContextNames = []; for (var j = 0; j < message.inputContextNames.length; ++j) @@ -23543,7 +23655,7 @@ 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.v2.Intent.Message.Platform[message.defaultResponsePlatforms[j]] : message.defaultResponsePlatforms[j]; + object.defaultResponsePlatforms[j] = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.Platform[message.defaultResponsePlatforms[j]] === undefined ? message.defaultResponsePlatforms[j] : $root.google.cloud.dialogflow.v2.Intent.Message.Platform[message.defaultResponsePlatforms[j]] : message.defaultResponsePlatforms[j]; } if (message.rootFollowupIntentName != null && message.hasOwnProperty("rootFollowupIntentName")) object.rootFollowupIntentName = message.rootFollowupIntentName; @@ -23827,6 +23939,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -23878,7 +23996,7 @@ 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.v2.Intent.TrainingPhrase.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type[message.type] : message.type; if (message.parts && message.parts.length) { object.parts = []; for (var j = 0; j < message.parts.length; ++j) @@ -25185,6 +25303,12 @@ message.mediaContent = $root.google.cloud.dialogflow.v2.Intent.Message.MediaContent.fromObject(object.mediaContent); } switch (object.platform) { + default: + if (typeof object.platform === "number") { + message.platform = object.platform; + break; + } + break; case "PLATFORM_UNSPECIFIED": case 0: message.platform = 0; @@ -25270,7 +25394,7 @@ object.message = "payload"; } if (message.platform != null && message.hasOwnProperty("platform")) - object.platform = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.Platform[message.platform] : message.platform; + object.platform = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.Platform[message.platform] === undefined ? message.platform : $root.google.cloud.dialogflow.v2.Intent.Message.Platform[message.platform] : message.platform; if (message.simpleResponses != null && message.hasOwnProperty("simpleResponses")) { object.simpleResponses = $root.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.toObject(message.simpleResponses, options); if (options.oneofs) @@ -29960,6 +30084,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.Intent.Message.MediaContent(); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "RESPONSE_MEDIA_TYPE_UNSPECIFIED": case 0: message.mediaType = 0; @@ -30000,7 +30130,7 @@ 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.v2.Intent.Message.MediaContent.ResponseMediaType[message.mediaType] : message.mediaType; + object.mediaType = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType[message.mediaType] === undefined ? message.mediaType : $root.google.cloud.dialogflow.v2.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) @@ -30581,6 +30711,12 @@ } } switch (object.imageDisplayOptions) { + default: + if (typeof object.imageDisplayOptions === "number") { + message.imageDisplayOptions = object.imageDisplayOptions; + break; + } + break; case "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED": case 0: message.imageDisplayOptions = 0; @@ -30628,7 +30764,7 @@ object.items[j] = $root.google.cloud.dialogflow.v2.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.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] : message.imageDisplayOptions; + object.imageDisplayOptions = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] === undefined ? message.imageDisplayOptions : $root.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] : message.imageDisplayOptions; return object; }; @@ -31137,6 +31273,12 @@ if (object.url != null) message.url = String(object.url); switch (object.urlTypeHint) { + default: + if (typeof object.urlTypeHint === "number") { + message.urlTypeHint = object.urlTypeHint; + break; + } + break; case "URL_TYPE_HINT_UNSPECIFIED": case 0: message.urlTypeHint = 0; @@ -31173,7 +31315,7 @@ 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.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] : message.urlTypeHint; + object.urlTypeHint = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] === undefined ? message.urlTypeHint : $root.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] : message.urlTypeHint; return object; }; @@ -31814,6 +31956,12 @@ if (object.header != null) message.header = String(object.header); switch (object.horizontalAlignment) { + default: + if (typeof object.horizontalAlignment === "number") { + message.horizontalAlignment = object.horizontalAlignment; + break; + } + break; case "HORIZONTAL_ALIGNMENT_UNSPECIFIED": case 0: message.horizontalAlignment = 0; @@ -31854,7 +32002,7 @@ 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.v2.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; + object.horizontalAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] === undefined ? message.horizontalAlignment : $root.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; return object; }; @@ -32820,6 +32968,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -32861,7 +33015,7 @@ 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.v2.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2.IntentView[message.intentView] : message.intentView; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -33341,6 +33495,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -33376,7 +33536,7 @@ 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.v2.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2.IntentView[message.intentView] : message.intentView; return object; }; @@ -33629,6 +33789,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -33667,7 +33833,7 @@ 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.v2.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2.IntentView[message.intentView] : message.intentView; return object; }; @@ -33925,6 +34091,12 @@ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -33963,7 +34135,7 @@ 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.v2.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2.IntentView[message.intentView] : message.intentView; return object; }; @@ -34486,6 +34658,12 @@ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -34534,7 +34712,7 @@ 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.v2.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2.IntentView[message.intentView] : message.intentView; return object; }; @@ -35681,6 +35859,12 @@ if (object.name != null) message.name = String(object.name); switch (object.entityOverrideMode) { + default: + if (typeof object.entityOverrideMode === "number") { + message.entityOverrideMode = object.entityOverrideMode; + break; + } + break; case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": case 0: message.entityOverrideMode = 0; @@ -35729,7 +35913,7 @@ 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.v2.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $root.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -37787,6 +37971,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; case "KIND_UNSPECIFIED": case 0: message.kind = 0; @@ -37805,6 +37995,12 @@ break; } switch (object.autoExpansionMode) { + default: + if (typeof object.autoExpansionMode === "number") { + message.autoExpansionMode = object.autoExpansionMode; + break; + } + break; case "AUTO_EXPANSION_MODE_UNSPECIFIED": case 0: message.autoExpansionMode = 0; @@ -37856,9 +38052,9 @@ 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.v2.EntityType.Kind[message.kind] : message.kind; + object.kind = options.enums === String ? $root.google.cloud.dialogflow.v2.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.v2.EntityType.Kind[message.kind] : message.kind; if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -41979,6 +42175,12 @@ if (object.name != null) message.name = String(object.name); switch (object.lifecycleState) { + default: + if (typeof object.lifecycleState === "number") { + message.lifecycleState = object.lifecycleState; + break; + } + break; case "LIFECYCLE_STATE_UNSPECIFIED": case 0: message.lifecycleState = 0; @@ -42010,6 +42212,12 @@ message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } switch (object.conversationStage) { + default: + if (typeof object.conversationStage === "number") { + message.conversationStage = object.conversationStage; + break; + } + break; case "CONVERSATION_STAGE_UNSPECIFIED": case 0: message.conversationStage = 0; @@ -42051,7 +42259,7 @@ 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.v2.Conversation.LifecycleState[message.lifecycleState] : message.lifecycleState; + object.lifecycleState = options.enums === String ? $root.google.cloud.dialogflow.v2.Conversation.LifecycleState[message.lifecycleState] === undefined ? message.lifecycleState : $root.google.cloud.dialogflow.v2.Conversation.LifecycleState[message.lifecycleState] : message.lifecycleState; if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) object.conversationProfile = message.conversationProfile; if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) @@ -42061,7 +42269,7 @@ 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.v2.Conversation.ConversationStage[message.conversationStage] : message.conversationStage; + object.conversationStage = options.enums === String ? $root.google.cloud.dialogflow.v2.Conversation.ConversationStage[message.conversationStage] === undefined ? message.conversationStage : $root.google.cloud.dialogflow.v2.Conversation.ConversationStage[message.conversationStage] : message.conversationStage; return object; }; @@ -47942,6 +48150,12 @@ if (object.conversation != null) message.conversation = String(object.conversation); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -48001,7 +48215,7 @@ 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.v2.ConversationEvent.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.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")) { @@ -48741,6 +48955,12 @@ } } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -48827,7 +49047,7 @@ object.datasets[j] = $root.google.cloud.dialogflow.v2.InputDataset.toObject(message.datasets[j], options); } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] : message.state; if (message.articleSuggestionModelMetadata != null && message.hasOwnProperty("articleSuggestionModelMetadata")) { object.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.toObject(message.articleSuggestionModelMetadata, options); if (options.oneofs) @@ -50367,6 +50587,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata(); switch (object.trainingModelType) { + default: + if (typeof object.trainingModelType === "number") { + message.trainingModelType = object.trainingModelType; + break; + } + break; case "MODEL_TYPE_UNSPECIFIED": case 0: message.trainingModelType = 0; @@ -50399,7 +50625,7 @@ if (options.defaults) object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; + object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; return object; }; @@ -50588,6 +50814,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata(); switch (object.trainingModelType) { + default: + if (typeof object.trainingModelType === "number") { + message.trainingModelType = object.trainingModelType; + break; + } + break; case "MODEL_TYPE_UNSPECIFIED": case 0: message.trainingModelType = 0; @@ -50620,7 +50852,7 @@ if (options.defaults) object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; + object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; return object; }; @@ -53841,6 +54073,12 @@ if (object.conversationModel != null) message.conversationModel = String(object.conversationModel); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -53899,7 +54137,7 @@ if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) object.conversationModel = message.conversationModel; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; @@ -54873,6 +55111,12 @@ if (object.conversationModel != null) message.conversationModel = String(object.conversationModel); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -54928,7 +55172,7 @@ if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) object.conversationModelEvaluation = message.conversationModelEvaluation; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) @@ -61300,6 +61544,12 @@ if (object.topic != null) message.topic = String(object.topic); switch (object.messageFormat) { + default: + if (typeof object.messageFormat === "number") { + message.messageFormat = object.messageFormat; + break; + } + break; case "MESSAGE_FORMAT_UNSPECIFIED": case 0: message.messageFormat = 0; @@ -61336,7 +61586,7 @@ 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.v2.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; + object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] === undefined ? message.messageFormat : $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; return object; }; @@ -61745,6 +61995,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.SuggestionFeature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -61781,7 +62037,7 @@ 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.v2.SuggestionFeature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] : message.type; return object; }; @@ -62029,6 +62285,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -62075,7 +62337,7 @@ 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.v2.Participant.Role[message.participantRole] : message.participantRole; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) object.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.suggestionFeatureConfig, options); return object; @@ -62312,6 +62574,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -62330,6 +62598,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -62371,9 +62645,9 @@ 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.v2.Participant.Role[message.participantRole] : message.participantRole; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; return object; }; @@ -62628,6 +62902,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -62646,6 +62926,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -62693,9 +62979,9 @@ 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.v2.Participant.Role[message.participantRole] : message.participantRole; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.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; @@ -62952,6 +63238,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -62970,6 +63262,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -63017,9 +63315,9 @@ 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.v2.Participant.Role[message.participantRole] : message.participantRole; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.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; @@ -63759,6 +64057,10 @@ for (var i = 0; i < object.knowledgeTypes.length; ++i) switch (object.knowledgeTypes[i]) { default: + if (typeof object.knowledgeTypes[i] === "number") { + message.knowledgeTypes[i] = object.knowledgeTypes[i]; + break; + } case "KNOWLEDGE_TYPE_UNSPECIFIED": case 0: message.knowledgeTypes[i] = 0; @@ -63803,6 +64105,12 @@ message.metadata[keys[i]] = String(object.metadata[keys[i]]); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -63865,7 +64173,7 @@ 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.v2.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2.Document.KnowledgeType[message.knowledgeTypes[j]] === undefined ? message.knowledgeTypes[j] : $root.google.cloud.dialogflow.v2.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; } if (message.contentUri != null && message.hasOwnProperty("contentUri")) { object.contentUri = message.contentUri; @@ -63888,7 +64196,7 @@ if (message.latestReloadStatus != null && message.hasOwnProperty("latestReloadStatus")) object.latestReloadStatus = $root.google.cloud.dialogflow.v2.Document.ReloadStatus.toObject(message.latestReloadStatus, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.Document.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.Document.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.Document.State[message.state] : message.state; return object; }; @@ -65703,6 +66011,10 @@ for (var i = 0; i < object.knowledgeTypes.length; ++i) switch (object.knowledgeTypes[i]) { default: + if (typeof object.knowledgeTypes[i] === "number") { + message.knowledgeTypes[i] = object.knowledgeTypes[i]; + break; + } case "KNOWLEDGE_TYPE_UNSPECIFIED": case 0: message.knowledgeTypes[i] = 0; @@ -65759,7 +66071,7 @@ 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.v2.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2.Document.KnowledgeType[message.knowledgeTypes[j]] === undefined ? message.knowledgeTypes[j] : $root.google.cloud.dialogflow.v2.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; } var keys2; if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { @@ -67474,6 +67786,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.KnowledgeOperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -67519,7 +67837,7 @@ object.knowledgeBase = ""; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State[message.state] : message.state; if (message.knowledgeBase != null && message.hasOwnProperty("knowledgeBase")) object.knowledgeBase = message.knowledgeBase; if (message.exportOperationMetadata != null && message.hasOwnProperty("exportOperationMetadata")) { @@ -68087,6 +68405,12 @@ if (object.agentVersion != null) message.agentVersion = String(object.agentVersion); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -68151,7 +68475,7 @@ 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.v2.Environment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.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")) @@ -68453,6 +68777,12 @@ if (object.enableTextToSpeech != null) message.enableTextToSpeech = Boolean(object.enableTextToSpeech); switch (object.outputAudioEncoding) { + default: + if (typeof object.outputAudioEncoding === "number") { + message.outputAudioEncoding = object.outputAudioEncoding; + break; + } + break; case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": case 0: message.outputAudioEncoding = 0; @@ -68516,7 +68846,7 @@ 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.v2.OutputAudioEncoding[message.outputAudioEncoding] : message.outputAudioEncoding; + object.outputAudioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.OutputAudioEncoding[message.outputAudioEncoding] === undefined ? message.outputAudioEncoding : $root.google.cloud.dialogflow.v2.OutputAudioEncoding[message.outputAudioEncoding] : message.outputAudioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; var keys2; @@ -71681,6 +72011,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2.Fulfillment.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -71709,7 +72045,7 @@ 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.v2.Fulfillment.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.Fulfillment.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.Fulfillment.Feature.Type[message.type] : message.type; return object; }; @@ -74783,6 +75119,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "VERSION_STATUS_UNSPECIFIED": case 0: message.status = 0; @@ -74832,7 +75174,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.cloud.dialogflow.v2.Version.VersionStatus[message.status] : message.status; + object.status = options.enums === String ? $root.google.cloud.dialogflow.v2.Version.VersionStatus[message.status] === undefined ? message.status : $root.google.cloud.dialogflow.v2.Version.VersionStatus[message.status] : message.status; return object; }; @@ -77952,6 +78294,12 @@ if (object.enableLogging != null) message.enableLogging = Boolean(object.enableLogging); switch (object.matchMode) { + default: + if (typeof object.matchMode === "number") { + message.matchMode = object.matchMode; + break; + } + break; case "MATCH_MODE_UNSPECIFIED": case 0: message.matchMode = 0; @@ -77968,6 +78316,12 @@ if (object.classificationThreshold != null) message.classificationThreshold = Number(object.classificationThreshold); switch (object.apiVersion) { + default: + if (typeof object.apiVersion === "number") { + message.apiVersion = object.apiVersion; + break; + } + break; case "API_VERSION_UNSPECIFIED": case 0: message.apiVersion = 0; @@ -77986,6 +78340,12 @@ break; } switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; case "TIER_UNSPECIFIED": case 0: message.tier = 0; @@ -78054,13 +78414,13 @@ if (message.enableLogging != null && message.hasOwnProperty("enableLogging")) object.enableLogging = message.enableLogging; if (message.matchMode != null && message.hasOwnProperty("matchMode")) - object.matchMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.MatchMode[message.matchMode] : message.matchMode; + object.matchMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.MatchMode[message.matchMode] === undefined ? message.matchMode : $root.google.cloud.dialogflow.v2beta1.Agent.MatchMode[message.matchMode] : message.matchMode; if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.ApiVersion[message.apiVersion] : message.apiVersion; + object.apiVersion = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.ApiVersion[message.apiVersion] === undefined ? message.apiVersion : $root.google.cloud.dialogflow.v2beta1.Agent.ApiVersion[message.apiVersion] : message.apiVersion; if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.Tier[message.tier] : message.tier; + object.tier = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Agent.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.dialogflow.v2beta1.Agent.Tier[message.tier] : message.tier; return object; }; @@ -81179,6 +81539,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.ValidationError(); switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; case "SEVERITY_UNSPECIFIED": case 0: message.severity = 0; @@ -81232,7 +81598,7 @@ 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; + object.severity = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ValidationError.Severity[message.severity] === undefined ? message.severity : $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) @@ -82463,6 +82829,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.AnswerFeedback(); switch (object.correctnessLevel) { + default: + if (typeof object.correctnessLevel === "number") { + message.correctnessLevel = object.correctnessLevel; + break; + } + break; case "CORRECTNESS_LEVEL_UNSPECIFIED": case 0: message.correctnessLevel = 0; @@ -82523,7 +82895,7 @@ 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; + object.correctnessLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] === undefined ? message.correctnessLevel : $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) @@ -82811,6 +83183,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback(); switch (object.answerRelevance) { + default: + if (typeof object.answerRelevance === "number") { + message.answerRelevance = object.answerRelevance; + break; + } + break; case "ANSWER_RELEVANCE_UNSPECIFIED": case 0: message.answerRelevance = 0; @@ -82825,6 +83203,12 @@ break; } switch (object.documentCorrectness) { + default: + if (typeof object.documentCorrectness === "number") { + message.documentCorrectness = object.documentCorrectness; + break; + } + break; case "DOCUMENT_CORRECTNESS_UNSPECIFIED": case 0: message.documentCorrectness = 0; @@ -82839,6 +83223,12 @@ break; } switch (object.documentEfficiency) { + default: + if (typeof object.documentEfficiency === "number") { + message.documentEfficiency = object.documentEfficiency; + break; + } + break; case "DOCUMENT_EFFICIENCY_UNSPECIFIED": case 0: message.documentEfficiency = 0; @@ -82880,11 +83270,11 @@ object.summarizationFeedback = null; } if (message.answerRelevance != null && message.hasOwnProperty("answerRelevance")) - object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] : message.answerRelevance; + object.answerRelevance = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.AnswerRelevance[message.answerRelevance] === undefined ? message.answerRelevance : $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; + object.documentCorrectness = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentCorrectness[message.documentCorrectness] === undefined ? message.documentCorrectness : $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; + object.documentEfficiency = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AgentAssistantFeedback.DocumentEfficiency[message.documentEfficiency] === undefined ? message.documentEfficiency : $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; @@ -84825,6 +85215,12 @@ if (object.name != null) message.name = String(object.name); switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.role = 0; @@ -84877,7 +85273,7 @@ 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; + object.role = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.role] === undefined ? message.role : $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.role] : message.role; if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; var keys2; @@ -85253,6 +85649,12 @@ if (object.participant != null) message.participant = String(object.participant); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -85326,7 +85728,7 @@ 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; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] === undefined ? message.participantRole : $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")) @@ -87401,6 +87803,12 @@ message.cxSessionParameters = $root.google.protobuf.Struct.fromObject(object.cxSessionParameters); } switch (object.automatedAgentReplyType) { + default: + if (typeof object.automatedAgentReplyType === "number") { + message.automatedAgentReplyType = object.automatedAgentReplyType; + break; + } + break; case "AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED": case 0: message.automatedAgentReplyType = 0; @@ -87464,7 +87872,7 @@ 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; + object.automatedAgentReplyType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AutomatedAgentReply.AutomatedAgentReplyType[message.automatedAgentReplyType] === undefined ? message.automatedAgentReplyType : $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")) @@ -87677,6 +88085,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.SuggestionFeature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -87717,7 +88131,7 @@ 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; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.type] : message.type; return object; }; @@ -98499,6 +98913,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.InputAudioConfig(); switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; case "AUDIO_ENCODING_UNSPECIFIED": case 0: message.audioEncoding = 0; @@ -98558,6 +98978,12 @@ if (object.model != null) message.model = String(object.model); switch (object.modelVariant) { + default: + if (typeof object.modelVariant === "number") { + message.modelVariant = object.modelVariant; + break; + } + break; case "SPEECH_MODEL_VARIANT_UNSPECIFIED": case 0: message.modelVariant = 0; @@ -98610,7 +99036,7 @@ 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; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $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")) @@ -98625,7 +99051,7 @@ 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; + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $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) @@ -98862,6 +99288,12 @@ if (object.name != null) message.name = String(object.name); switch (object.ssmlGender) { + default: + if (typeof object.ssmlGender === "number") { + message.ssmlGender = object.ssmlGender; + break; + } + break; case "SSML_VOICE_GENDER_UNSPECIFIED": case 0: message.ssmlGender = 0; @@ -98902,7 +99334,7 @@ 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; + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.v2beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; @@ -99472,6 +99904,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig(); switch (object.audioEncoding) { + default: + if (typeof object.audioEncoding === "number") { + message.audioEncoding = object.audioEncoding; + break; + } + break; case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": case 0: message.audioEncoding = 0; @@ -99526,7 +99964,7 @@ 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; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $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")) @@ -99799,6 +100237,10 @@ for (var i = 0; i < object.dtmfEvents.length; ++i) switch (object.dtmfEvents[i]) { default: + if (typeof object.dtmfEvents[i] === "number") { + message.dtmfEvents[i] = object.dtmfEvents[i]; + break; + } case "TELEPHONY_DTMF_UNSPECIFIED": case 0: message.dtmfEvents[i] = 0; @@ -99890,7 +100332,7 @@ 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]; + object.dtmfEvents[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.TelephonyDtmf[message.dtmfEvents[j]] === undefined ? message.dtmfEvents[j] : $root.google.cloud.dialogflow.v2beta1.TelephonyDtmf[message.dtmfEvents[j]] : message.dtmfEvents[j]; } return object; }; @@ -100081,6 +100523,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.SpeechToTextConfig(); switch (object.speechModelVariant) { + default: + if (typeof object.speechModelVariant === "number") { + message.speechModelVariant = object.speechModelVariant; + break; + } + break; case "SPEECH_MODEL_VARIANT_UNSPECIFIED": case 0: message.speechModelVariant = 0; @@ -100117,7 +100565,7 @@ 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.speechModelVariant = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SpeechModelVariant[message.speechModelVariant] === undefined ? message.speechModelVariant : $root.google.cloud.dialogflow.v2beta1.SpeechModelVariant[message.speechModelVariant] : message.speechModelVariant; return object; }; @@ -102941,6 +103389,12 @@ if (object.answer != null) message.answer = String(object.answer); switch (object.matchConfidenceLevel) { + default: + if (typeof object.matchConfidenceLevel === "number") { + message.matchConfidenceLevel = object.matchConfidenceLevel; + break; + } + break; case "MATCH_CONFIDENCE_LEVEL_UNSPECIFIED": case 0: message.matchConfidenceLevel = 0; @@ -102990,7 +103444,7 @@ 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; + object.matchConfidenceLevel = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel[message.matchConfidenceLevel] === undefined ? message.matchConfidenceLevel : $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; @@ -104126,6 +104580,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult(); switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; case "MESSAGE_TYPE_UNSPECIFIED": case 0: message.messageType = 0; @@ -104206,7 +104666,7 @@ 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; + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $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")) @@ -108344,6 +108804,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.webhookState) { + default: + if (typeof object.webhookState === "number") { + message.webhookState = object.webhookState; + break; + } + break; case "WEBHOOK_STATE_UNSPECIFIED": case 0: message.webhookState = 0; @@ -108434,6 +108900,10 @@ for (var i = 0; i < object.defaultResponsePlatforms.length; ++i) switch (object.defaultResponsePlatforms[i]) { default: + if (typeof object.defaultResponsePlatforms[i] === "number") { + message.defaultResponsePlatforms[i] = object.defaultResponsePlatforms[i]; + break; + } case "PLATFORM_UNSPECIFIED": case 0: message.defaultResponsePlatforms[i] = 0; @@ -108546,7 +109016,7 @@ 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; + object.webhookState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.WebhookState[message.webhookState] === undefined ? message.webhookState : $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) @@ -108584,7 +109054,7 @@ 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]; + object.defaultResponsePlatforms[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.defaultResponsePlatforms[j]] === undefined ? message.defaultResponsePlatforms[j] : $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; @@ -108868,6 +109338,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -108919,7 +109395,7 @@ 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; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type[message.type] === undefined ? message.type : $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) @@ -110407,6 +110883,12 @@ message.mediaContent = $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.fromObject(object.mediaContent); } switch (object.platform) { + default: + if (typeof object.platform === "number") { + message.platform = object.platform; + break; + } + break; case "PLATFORM_UNSPECIFIED": case 0: message.platform = 0; @@ -110496,7 +110978,7 @@ 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; + object.platform = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.Platform[message.platform] === undefined ? message.platform : $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) @@ -116123,6 +116605,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard(); switch (object.cardWidth) { + default: + if (typeof object.cardWidth === "number") { + message.cardWidth = object.cardWidth; + break; + } + break; case "CARD_WIDTH_UNSPECIFIED": case 0: message.cardWidth = 0; @@ -116167,7 +116655,7 @@ 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; + object.cardWidth = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth[message.cardWidth] === undefined ? message.cardWidth : $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) @@ -116421,6 +116909,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard(); switch (object.cardOrientation) { + default: + if (typeof object.cardOrientation === "number") { + message.cardOrientation = object.cardOrientation; + break; + } + break; case "CARD_ORIENTATION_UNSPECIFIED": case 0: message.cardOrientation = 0; @@ -116435,6 +116929,12 @@ break; } switch (object.thumbnailImageAlignment) { + default: + if (typeof object.thumbnailImageAlignment === "number") { + message.thumbnailImageAlignment = object.thumbnailImageAlignment; + break; + } + break; case "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED": case 0: message.thumbnailImageAlignment = 0; @@ -116475,9 +116975,9 @@ 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; + object.cardOrientation = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation[message.cardOrientation] === undefined ? message.cardOrientation : $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; + object.thumbnailImageAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment[message.thumbnailImageAlignment] === undefined ? message.thumbnailImageAlignment : $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; @@ -117038,6 +117538,12 @@ if (object.thumbnailUri != null) message.thumbnailUri = String(object.thumbnailUri); switch (object.height) { + default: + if (typeof object.height === "number") { + message.height = object.height; + break; + } + break; case "HEIGHT_UNSPECIFIED": case 0: message.height = 0; @@ -117081,7 +117587,7 @@ 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; + object.height = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height[message.height] === undefined ? message.height : $root.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height[message.height] : message.height; return object; }; @@ -118733,6 +119239,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent(); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "RESPONSE_MEDIA_TYPE_UNSPECIFIED": case 0: message.mediaType = 0; @@ -118773,7 +119285,7 @@ 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; + object.mediaType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType[message.mediaType] === undefined ? message.mediaType : $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) @@ -119354,6 +119866,12 @@ } } switch (object.imageDisplayOptions) { + default: + if (typeof object.imageDisplayOptions === "number") { + message.imageDisplayOptions = object.imageDisplayOptions; + break; + } + break; case "IMAGE_DISPLAY_OPTIONS_UNSPECIFIED": case 0: message.imageDisplayOptions = 0; @@ -119401,7 +119919,7 @@ 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; + object.imageDisplayOptions = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] === undefined ? message.imageDisplayOptions : $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions[message.imageDisplayOptions] : message.imageDisplayOptions; return object; }; @@ -119910,6 +120428,12 @@ if (object.url != null) message.url = String(object.url); switch (object.urlTypeHint) { + default: + if (typeof object.urlTypeHint === "number") { + message.urlTypeHint = object.urlTypeHint; + break; + } + break; case "URL_TYPE_HINT_UNSPECIFIED": case 0: message.urlTypeHint = 0; @@ -119946,7 +120470,7 @@ 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; + object.urlTypeHint = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] === undefined ? message.urlTypeHint : $root.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint[message.urlTypeHint] : message.urlTypeHint; return object; }; @@ -120587,6 +121111,12 @@ if (object.header != null) message.header = String(object.header); switch (object.horizontalAlignment) { + default: + if (typeof object.horizontalAlignment === "number") { + message.horizontalAlignment = object.horizontalAlignment; + break; + } + break; case "HORIZONTAL_ALIGNMENT_UNSPECIFIED": case 0: message.horizontalAlignment = 0; @@ -120627,7 +121157,7 @@ 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; + object.horizontalAlignment = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] === undefined ? message.horizontalAlignment : $root.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment[message.horizontalAlignment] : message.horizontalAlignment; return object; }; @@ -121593,6 +122123,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -121634,7 +122170,7 @@ 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; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] === undefined ? message.intentView : $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")) @@ -122114,6 +122650,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -122149,7 +122691,7 @@ 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; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; @@ -122402,6 +122944,12 @@ if (object.languageCode != null) message.languageCode = String(object.languageCode); switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -122440,7 +122988,7 @@ 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; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; @@ -122698,6 +123246,12 @@ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -122736,7 +123290,7 @@ 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; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; @@ -123259,6 +123813,12 @@ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } switch (object.intentView) { + default: + if (typeof object.intentView === "number") { + message.intentView = object.intentView; + break; + } + break; case "INTENT_VIEW_UNSPECIFIED": case 0: message.intentView = 0; @@ -123307,7 +123867,7 @@ 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; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.v2beta1.IntentView[message.intentView] : message.intentView; return object; }; @@ -124454,6 +125014,12 @@ if (object.name != null) message.name = String(object.name); switch (object.entityOverrideMode) { + default: + if (typeof object.entityOverrideMode === "number") { + message.entityOverrideMode = object.entityOverrideMode; + break; + } + break; case "ENTITY_OVERRIDE_MODE_UNSPECIFIED": case 0: message.entityOverrideMode = 0; @@ -124502,7 +125068,7 @@ 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; + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $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) @@ -126560,6 +127126,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; case "KIND_UNSPECIFIED": case 0: message.kind = 0; @@ -126578,6 +127150,12 @@ break; } switch (object.autoExpansionMode) { + default: + if (typeof object.autoExpansionMode === "number") { + message.autoExpansionMode = object.autoExpansionMode; + break; + } + break; case "AUTO_EXPANSION_MODE_UNSPECIFIED": case 0: message.autoExpansionMode = 0; @@ -126629,9 +127207,9 @@ 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; + object.kind = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.EntityType.Kind[message.kind] === undefined ? message.kind : $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; + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $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) @@ -130818,6 +131396,12 @@ if (object.name != null) message.name = String(object.name); switch (object.lifecycleState) { + default: + if (typeof object.lifecycleState === "number") { + message.lifecycleState = object.lifecycleState; + break; + } + break; case "LIFECYCLE_STATE_UNSPECIFIED": case 0: message.lifecycleState = 0; @@ -130839,6 +131423,12 @@ message.phoneNumber = $root.google.cloud.dialogflow.v2beta1.ConversationPhoneNumber.fromObject(object.phoneNumber); } switch (object.conversationStage) { + default: + if (typeof object.conversationStage === "number") { + message.conversationStage = object.conversationStage; + break; + } + break; case "CONVERSATION_STAGE_UNSPECIFIED": case 0: message.conversationStage = 0; @@ -130890,7 +131480,7 @@ 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; + object.lifecycleState = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.LifecycleState[message.lifecycleState] === undefined ? message.lifecycleState : $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")) @@ -130900,7 +131490,7 @@ 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; + object.conversationStage = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Conversation.ConversationStage[message.conversationStage] === undefined ? message.conversationStage : $root.google.cloud.dialogflow.v2beta1.Conversation.ConversationStage[message.conversationStage] : message.conversationStage; return object; }; @@ -134603,6 +135193,12 @@ if (object.conversation != null) message.conversation = String(object.conversation); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -134662,7 +135258,7 @@ 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; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] === undefined ? message.type : $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")) { @@ -139664,6 +140260,12 @@ if (object.topic != null) message.topic = String(object.topic); switch (object.messageFormat) { + default: + if (typeof object.messageFormat === "number") { + message.messageFormat = object.messageFormat; + break; + } + break; case "MESSAGE_FORMAT_UNSPECIFIED": case 0: message.messageFormat = 0; @@ -139700,7 +140302,7 @@ 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; + object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat[message.messageFormat] === undefined ? message.messageFormat : $root.google.cloud.dialogflow.v2beta1.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; return object; }; @@ -141522,6 +142124,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -141568,7 +142176,7 @@ 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; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] === undefined ? message.participantRole : $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; @@ -141806,6 +142414,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -141824,6 +142438,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -141869,9 +142489,9 @@ 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; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] === undefined ? message.participantRole : $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; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; return object; }; @@ -142127,6 +142747,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -142145,6 +142771,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -142196,9 +142828,9 @@ 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; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] === undefined ? message.participantRole : $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; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $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; @@ -142456,6 +143088,12 @@ if (object.conversationProfile != null) message.conversationProfile = String(object.conversationProfile); switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; case "ROLE_UNSPECIFIED": case 0: message.participantRole = 0; @@ -142474,6 +143112,12 @@ break; } switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.suggestionFeatureType = 0; @@ -142525,9 +143169,9 @@ 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; + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Participant.Role[message.participantRole] === undefined ? message.participantRole : $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; + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $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; @@ -143257,6 +143901,10 @@ for (var i = 0; i < object.knowledgeTypes.length; ++i) switch (object.knowledgeTypes[i]) { default: + if (typeof object.knowledgeTypes[i] === "number") { + message.knowledgeTypes[i] = object.knowledgeTypes[i]; + break; + } case "KNOWLEDGE_TYPE_UNSPECIFIED": case 0: message.knowledgeTypes[i] = 0; @@ -143307,6 +143955,12 @@ message.metadata[keys[i]] = String(object.metadata[keys[i]]); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -143369,7 +144023,7 @@ 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]; + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] === undefined ? message.knowledgeTypes[j] : $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; } if (message.contentUri != null && message.hasOwnProperty("contentUri")) { object.contentUri = message.contentUri; @@ -143397,7 +144051,7 @@ 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; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2beta1.Document.State[message.state] : message.state; return object; }; @@ -145238,6 +145892,10 @@ for (var i = 0; i < object.knowledgeTypes.length; ++i) switch (object.knowledgeTypes[i]) { default: + if (typeof object.knowledgeTypes[i] === "number") { + message.knowledgeTypes[i] = object.knowledgeTypes[i]; + break; + } case "KNOWLEDGE_TYPE_UNSPECIFIED": case 0: message.knowledgeTypes[i] = 0; @@ -145298,7 +145956,7 @@ 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]; + object.knowledgeTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] === undefined ? message.knowledgeTypes[j] : $root.google.cloud.dialogflow.v2beta1.Document.KnowledgeType[message.knowledgeTypes[j]] : message.knowledgeTypes[j]; } var keys2; if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { @@ -146423,6 +147081,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -146468,7 +147132,7 @@ 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; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State[message.state] === undefined ? message.state : $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")) { @@ -147936,6 +148600,12 @@ if (object.agentVersion != null) message.agentVersion = String(object.agentVersion); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -148000,7 +148670,7 @@ 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; + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Environment.State[message.state] === undefined ? message.state : $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")) @@ -148302,6 +148972,12 @@ if (object.enableTextToSpeech != null) message.enableTextToSpeech = Boolean(object.enableTextToSpeech); switch (object.outputAudioEncoding) { + default: + if (typeof object.outputAudioEncoding === "number") { + message.outputAudioEncoding = object.outputAudioEncoding; + break; + } + break; case "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": case 0: message.outputAudioEncoding = 0; @@ -148365,7 +149041,7 @@ 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; + object.outputAudioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.OutputAudioEncoding[message.outputAudioEncoding] === undefined ? message.outputAudioEncoding : $root.google.cloud.dialogflow.v2beta1.OutputAudioEncoding[message.outputAudioEncoding] : message.outputAudioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; var keys2; @@ -151530,6 +152206,12 @@ return object; var message = new $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -151558,7 +152240,7 @@ 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; + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2beta1.Fulfillment.Feature.Type[message.type] : message.type; return object; }; @@ -154632,6 +155314,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "VERSION_STATUS_UNSPECIFIED": case 0: message.status = 0; @@ -154681,7 +155369,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Version.VersionStatus[message.status] : message.status; + object.status = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.Version.VersionStatus[message.status] === undefined ? message.status : $root.google.cloud.dialogflow.v2beta1.Version.VersionStatus[message.status] : message.status; return object; }; @@ -158462,6 +159150,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -158486,6 +159180,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -158533,7 +159231,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -158541,7 +159239,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -161352,6 +162050,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -161366,6 +162070,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -161492,9 +162202,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -163841,6 +164551,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -163949,7 +164665,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -164751,6 +165467,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -164767,6 +165489,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -164805,6 +165533,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -164875,7 +165607,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -164883,7 +165615,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -164896,7 +165628,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -166273,6 +167005,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -166342,7 +167080,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -168097,6 +168835,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -168146,7 +168890,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -169601,6 +170345,12 @@ return object; var message = new $root.google.protobuf.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -169639,7 +170389,7 @@ options = {}; var object = {}; if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; } diff --git a/protos/protos.json b/protos/protos.json index 59b165d7..a776eca3 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -376,6 +376,11 @@ } }, "Tier": { + "valuesOptions": { + "TIER_ENTERPRISE_PLUS": { + "deprecated": true + } + }, "values": { "TIER_UNSPECIFIED": 0, "TIER_STANDARD": 1, @@ -3091,6 +3096,11 @@ }, "nested": { "Type": { + "valuesOptions": { + "TEMPLATE": { + "deprecated": true + } + }, "values": { "TYPE_UNSPECIFIED": 0, "EXAMPLE": 1, @@ -9766,6 +9776,11 @@ } }, "Tier": { + "valuesOptions": { + "TIER_ENTERPRISE_PLUS": { + "deprecated": true + } + }, "values": { "TIER_UNSPECIFIED": 0, "TIER_STANDARD": 1, @@ -13147,6 +13162,11 @@ }, "nested": { "Type": { + "valuesOptions": { + "TEMPLATE": { + "deprecated": true + } + }, "values": { "TYPE_UNSPECIFIED": 0, "EXAMPLE": 1,