From c82e46a74aa30862e999ae37f16508f241792493 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 10:14:15 +0000 Subject: [PATCH] fix: regenerated protos JS and TS definitions (#324) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .github/.OwlBot.lock.yaml | 3 +- protos/protos.d.ts | 2 +- protos/protos.js | 640 +++++++++++++++++++++++++++++++++----- 3 files changed, 561 insertions(+), 84 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 99bc6597..1b823dba 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 015487ad..1c5c0e44 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -3161,6 +3161,12 @@ if (object.agentUri != null) message.agentUri = String(object.agentUri); switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; case "DATA_FORMAT_UNSPECIFIED": case 0: message.dataFormat = 0; @@ -3199,7 +3205,7 @@ if (message.agentUri != null && message.hasOwnProperty("agentUri")) object.agentUri = message.agentUri; if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = message.environment; return object; @@ -3741,6 +3747,12 @@ else if (object.agentContent.length >= 0) message.agentContent = object.agentContent; switch (object.restoreOption) { + default: + if (typeof object.restoreOption === "number") { + message.restoreOption = object.restoreOption; + break; + } + break; case "RESTORE_OPTION_UNSPECIFIED": case 0: message.restoreOption = 0; @@ -3787,7 +3799,7 @@ object.agent = "agentContent"; } if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) - object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; + object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption[message.restoreOption] === undefined ? message.restoreOption : $root.google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; return object; }; @@ -5101,6 +5113,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.NluSettings(); switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; case "MODEL_TYPE_UNSPECIFIED": case 0: message.modelType = 0; @@ -5117,6 +5135,12 @@ if (object.classificationThreshold != null) message.classificationThreshold = Number(object.classificationThreshold); switch (object.modelTrainingMode) { + default: + if (typeof object.modelTrainingMode === "number") { + message.modelTrainingMode = object.modelTrainingMode; + break; + } + break; case "MODEL_TRAINING_MODE_UNSPECIFIED": case 0: message.modelTrainingMode = 0; @@ -5152,11 +5176,11 @@ object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] : message.modelType; + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelType[message.modelType] : message.modelType; if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; @@ -8292,6 +8316,12 @@ else if (object.flowContent.length >= 0) message.flowContent = object.flowContent; switch (object.importOption) { + default: + if (typeof object.importOption === "number") { + message.importOption = object.importOption; + break; + } + break; case "IMPORT_OPTION_UNSPECIFIED": case 0: message.importOption = 0; @@ -8338,7 +8368,7 @@ object.flow = "flowContent"; } if (message.importOption != null && message.hasOwnProperty("importOption")) - object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; + object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; return object; }; @@ -16877,6 +16907,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.ValidationMessage(); switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; case "RESOURCE_TYPE_UNSPECIFIED": case 0: message.resourceType = 0; @@ -16952,6 +16988,12 @@ } } switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; case "SEVERITY_UNSPECIFIED": case 0: message.severity = 0; @@ -16997,14 +17039,14 @@ object.detail = ""; } if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; + object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; if (message.resources && message.resources.length) { object.resources = []; for (var j = 0; j < message.resources.length; ++j) object.resources[j] = message.resources[j]; } if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] : message.severity; + object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3.ValidationMessage.Severity[message.severity] : message.severity; if (message.detail != null && message.hasOwnProperty("detail")) object.detail = message.detail; if (message.resourceNames && message.resourceNames.length) { @@ -17938,6 +17980,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.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; @@ -17985,6 +18033,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; @@ -18031,7 +18085,7 @@ object.enableWordInfo = false; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.AudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.phraseHints && message.phraseHints.length) { @@ -18044,7 +18098,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.cx.v3.SpeechModelVariant[message.modelVariant] : message.modelVariant; + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3.SpeechModelVariant[message.modelVariant] : message.modelVariant; if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) object.enableWordInfo = message.enableWordInfo; return object; @@ -18274,6 +18328,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; @@ -18314,7 +18374,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.cx.v3.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; @@ -18884,6 +18944,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.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; @@ -18938,7 +19004,7 @@ object.synthesizeSpeechConfig = null; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) @@ -20505,6 +20571,12 @@ if (object.flowVersion != null) message.flowVersion = String(object.flowVersion); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -20566,7 +20638,7 @@ if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) object.flowVersion = message.flowVersion; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Deployment.State[message.state] : message.state; if (message.result != null && message.hasOwnProperty("result")) object.result = $root.google.cloud.dialogflow.cx.v3.Deployment.Result.toObject(message.result, options); if (message.startTime != null && message.hasOwnProperty("startTime")) @@ -22079,6 +22151,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; @@ -22097,6 +22175,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; @@ -22163,9 +22247,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.cx.v3.EntityType.Kind[message.kind] : message.kind; + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3.EntityType.Kind[message.kind] : message.kind; if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -27678,6 +27762,12 @@ if (object.name != null) message.name = String(object.name); switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; case "AGGREGATED_TEST_RESULT_UNSPECIFIED": case 0: message.result = 0; @@ -27729,7 +27819,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; + object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; if (message.testCaseResults && message.testCaseResults.length) { object.testCaseResults = []; for (var j = 0; j < message.testCaseResults.length; ++j) @@ -30705,6 +30795,12 @@ } } switch (object.testResult) { + default: + if (typeof object.testResult === "number") { + message.testResult = object.testResult; + break; + } + break; case "TEST_RESULT_UNSPECIFIED": case 0: message.testResult = 0; @@ -30757,7 +30853,7 @@ object.conversationTurns[j] = $root.google.cloud.dialogflow.cx.v3.ConversationTurn.toObject(message.conversationTurns[j], options); } if (message.testResult != null && message.hasOwnProperty("testResult")) - object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] : message.testResult; + object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3.TestResult[message.testResult] : message.testResult; if (message.testTime != null && message.hasOwnProperty("testTime")) object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); return object; @@ -32166,6 +32262,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.TestRunDifference(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "DIFF_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -32210,7 +32312,7 @@ object.description = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType[message.type] : message.type; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; return object; @@ -34550,6 +34652,12 @@ if (object.agent != null) message.agent = String(object.agent); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "COVERAGE_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -34588,7 +34696,7 @@ object.agent = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.CalculateCoverageRequest.CoverageType[message.type] : message.type; if (message.agent != null && message.hasOwnProperty("agent")) object.agent = message.agent; return object; @@ -35178,6 +35286,12 @@ if (object.pageToken != null) message.pageToken = String(object.pageToken); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "TEST_CASE_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -35220,7 +35334,7 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3.ListTestCasesRequest.TestCaseView[message.view] : message.view; return object; }; @@ -39205,6 +39319,12 @@ if (object.gcsUri != null) message.gcsUri = String(object.gcsUri); switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; case "DATA_FORMAT_UNSPECIFIED": case 0: message.dataFormat = 0; @@ -39249,7 +39369,7 @@ object.destination = "gcsUri"; } if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; return object; @@ -42117,6 +42237,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; @@ -42166,7 +42292,7 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.cx.v3.IntentView[message.intentView] : message.intentView; return object; }; @@ -44130,6 +44256,12 @@ message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.fromObject(object.outputAudioConfig); } switch (object.responseType) { + default: + if (typeof object.responseType === "number") { + message.responseType = object.responseType; + break; + } + break; case "RESPONSE_TYPE_UNSPECIFIED": case 0: message.responseType = 0; @@ -44184,7 +44316,7 @@ if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; + object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) object.allowCancellation = message.allowCancellation; return object; @@ -45102,6 +45234,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.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; @@ -45168,7 +45306,7 @@ object.languageCode = ""; } if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; if (message.isFinal != null && message.hasOwnProperty("isFinal")) @@ -48164,6 +48302,12 @@ if (object.resolvedInput != null) message.resolvedInput = String(object.resolvedInput); switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; case "MATCH_TYPE_UNSPECIFIED": case 0: message.matchType = 0; @@ -48226,7 +48370,7 @@ if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) object.resolvedInput = message.resolvedInput; if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; + object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] === undefined ? message.matchType : $root.google.cloud.dialogflow.cx.v3.Match.MatchType[message.matchType] : message.matchType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.event != null && message.hasOwnProperty("event")) @@ -50117,6 +50261,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; @@ -50165,7 +50315,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.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $root.google.cloud.dialogflow.cx.v3.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -58198,6 +58348,12 @@ } } switch (object.mergeBehavior) { + default: + if (typeof object.mergeBehavior === "number") { + message.mergeBehavior = object.mergeBehavior; + break; + } + break; case "MERGE_BEHAVIOR_UNSPECIFIED": case 0: message.mergeBehavior = 0; @@ -58237,7 +58393,7 @@ object.messages[j] = $root.google.cloud.dialogflow.cx.v3.ResponseMessage.toObject(message.messages[j], options); } if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; + object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] === undefined ? message.mergeBehavior : $root.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; return object; }; @@ -58997,6 +59153,12 @@ if (object.required != null) message.required = Boolean(object.required); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PARAMETER_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -59049,7 +59211,7 @@ if (message.required != null && message.hasOwnProperty("required")) object.required = message.required; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.protobuf.Value.toObject(message.value, options); if (message.justCollected != null && message.hasOwnProperty("justCollected")) @@ -60089,6 +60251,12 @@ if (object.description != null) message.description = String(object.description); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -60208,7 +60376,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Experiment.State[message.state] : message.state; if (message.definition != null && message.hasOwnProperty("definition")) object.definition = $root.google.cloud.dialogflow.cx.v3.Experiment.Definition.toObject(message.definition, options); if (message.result != null && message.hasOwnProperty("result")) @@ -61358,6 +61526,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3.Experiment.Result.Metric(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "METRIC_UNSPECIFIED": case 0: message.type = 0; @@ -61384,6 +61558,12 @@ break; } switch (object.countType) { + default: + if (typeof object.countType === "number") { + message.countType = object.countType; + break; + } + break; case "COUNT_TYPE_UNSPECIFIED": case 0: message.countType = 0; @@ -61432,7 +61612,7 @@ object.countType = options.enums === String ? "COUNT_TYPE_UNSPECIFIED" : 0; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType[message.type] : message.type; if (message.ratio != null && message.hasOwnProperty("ratio")) { object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; if (options.oneofs) @@ -61446,7 +61626,7 @@ object.value = "count"; } if (message.countType != null && message.hasOwnProperty("countType")) - object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] : message.countType; + object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3.Experiment.Result.CountType[message.countType] : message.countType; return object; }; @@ -66989,6 +67169,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.redactionStrategy) { + default: + if (typeof object.redactionStrategy === "number") { + message.redactionStrategy = object.redactionStrategy; + break; + } + break; case "REDACTION_STRATEGY_UNSPECIFIED": case 0: message.redactionStrategy = 0; @@ -66999,6 +67185,12 @@ break; } switch (object.redactionScope) { + default: + if (typeof object.redactionScope === "number") { + message.redactionScope = object.redactionScope; + break; + } + break; case "REDACTION_SCOPE_UNSPECIFIED": case 0: message.redactionScope = 0; @@ -67021,6 +67213,10 @@ for (var i = 0; i < object.purgeDataTypes.length; ++i) switch (object.purgeDataTypes[i]) { default: + if (typeof object.purgeDataTypes[i] === "number") { + message.purgeDataTypes[i] = object.purgeDataTypes[i]; + break; + } case "PURGE_DATA_TYPE_UNSPECIFIED": case 0: message.purgeDataTypes[i] = 0; @@ -67074,9 +67270,9 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; + object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] === undefined ? message.redactionStrategy : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; + object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] === undefined ? message.redactionScope : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { object.retentionWindowDays = message.retentionWindowDays; if (options.oneofs) @@ -67085,7 +67281,7 @@ if (message.purgeDataTypes && message.purgeDataTypes.length) { object.purgeDataTypes = []; for (var j = 0; j < message.purgeDataTypes.length; ++j) - object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; + object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] === undefined ? message.purgeDataTypes[j] : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; } if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) object.inspectTemplate = message.inspectTemplate; @@ -67383,6 +67579,12 @@ if (object.enableAudioRedaction != null) message.enableAudioRedaction = Boolean(object.enableAudioRedaction); switch (object.audioFormat) { + default: + if (typeof object.audioFormat === "number") { + message.audioFormat = object.audioFormat; + break; + } + break; case "AUDIO_FORMAT_UNSPECIFIED": case 0: message.audioFormat = 0; @@ -67429,7 +67631,7 @@ if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) object.enableAudioRedaction = message.enableAudioRedaction; if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) - object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; + object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] === undefined ? message.audioFormat : $root.google.cloud.dialogflow.cx.v3.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; return object; }; @@ -68422,6 +68624,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -68474,7 +68682,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3.Version.State[message.state] : message.state; return object; }; @@ -73728,6 +73936,12 @@ if (object.agentUri != null) message.agentUri = String(object.agentUri); switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; case "DATA_FORMAT_UNSPECIFIED": case 0: message.dataFormat = 0; @@ -73766,7 +73980,7 @@ if (message.agentUri != null && message.hasOwnProperty("agentUri")) object.agentUri = message.agentUri; if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = message.environment; return object; @@ -74308,6 +74522,12 @@ else if (object.agentContent.length >= 0) message.agentContent = object.agentContent; switch (object.restoreOption) { + default: + if (typeof object.restoreOption === "number") { + message.restoreOption = object.restoreOption; + break; + } + break; case "RESTORE_OPTION_UNSPECIFIED": case 0: message.restoreOption = 0; @@ -74354,7 +74574,7 @@ object.agent = "agentContent"; } if (message.restoreOption != null && message.hasOwnProperty("restoreOption")) - object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; + object.restoreOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] === undefined ? message.restoreOption : $root.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption[message.restoreOption] : message.restoreOption; return object; }; @@ -75668,6 +75888,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.NluSettings(); switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; case "MODEL_TYPE_UNSPECIFIED": case 0: message.modelType = 0; @@ -75684,6 +75910,12 @@ if (object.classificationThreshold != null) message.classificationThreshold = Number(object.classificationThreshold); switch (object.modelTrainingMode) { + default: + if (typeof object.modelTrainingMode === "number") { + message.modelTrainingMode = object.modelTrainingMode; + break; + } + break; case "MODEL_TRAINING_MODE_UNSPECIFIED": case 0: message.modelTrainingMode = 0; @@ -75719,11 +75951,11 @@ object.modelTrainingMode = options.enums === String ? "MODEL_TRAINING_MODE_UNSPECIFIED" : 0; } if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; + object.modelType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType[message.modelType] : message.modelType; if (message.classificationThreshold != null && message.hasOwnProperty("classificationThreshold")) object.classificationThreshold = options.json && !isFinite(message.classificationThreshold) ? String(message.classificationThreshold) : message.classificationThreshold; if (message.modelTrainingMode != null && message.hasOwnProperty("modelTrainingMode")) - object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; + object.modelTrainingMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] === undefined ? message.modelTrainingMode : $root.google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode[message.modelTrainingMode] : message.modelTrainingMode; return object; }; @@ -78859,6 +79091,12 @@ else if (object.flowContent.length >= 0) message.flowContent = object.flowContent; switch (object.importOption) { + default: + if (typeof object.importOption === "number") { + message.importOption = object.importOption; + break; + } + break; case "IMPORT_OPTION_UNSPECIFIED": case 0: message.importOption = 0; @@ -78905,7 +79143,7 @@ object.flow = "flowContent"; } if (message.importOption != null && message.hasOwnProperty("importOption")) - object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; + object.importOption = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] === undefined ? message.importOption : $root.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption[message.importOption] : message.importOption; return object; }; @@ -87444,6 +87682,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage(); switch (object.resourceType) { + default: + if (typeof object.resourceType === "number") { + message.resourceType = object.resourceType; + break; + } + break; case "RESOURCE_TYPE_UNSPECIFIED": case 0: message.resourceType = 0; @@ -87519,6 +87763,12 @@ } } switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; case "SEVERITY_UNSPECIFIED": case 0: message.severity = 0; @@ -87564,14 +87814,14 @@ object.detail = ""; } if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; + object.resourceType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] === undefined ? message.resourceType : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.ResourceType[message.resourceType] : message.resourceType; if (message.resources && message.resources.length) { object.resources = []; for (var j = 0; j < message.resources.length; ++j) object.resources[j] = message.resources[j]; } if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] : message.severity; + object.severity = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.dialogflow.cx.v3beta1.ValidationMessage.Severity[message.severity] : message.severity; if (message.detail != null && message.hasOwnProperty("detail")) object.detail = message.detail; if (message.resourceNames && message.resourceNames.length) { @@ -88505,6 +88755,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; @@ -88552,6 +88808,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; @@ -88598,7 +88860,7 @@ object.enableWordInfo = false; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.phraseHints && message.phraseHints.length) { @@ -88611,7 +88873,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.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; + object.modelVariant = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] === undefined ? message.modelVariant : $root.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant[message.modelVariant] : message.modelVariant; if (message.enableWordInfo != null && message.hasOwnProperty("enableWordInfo")) object.enableWordInfo = message.enableWordInfo; return object; @@ -88841,6 +89103,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; @@ -88881,7 +89149,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.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; + object.ssmlGender = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] === undefined ? message.ssmlGender : $root.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender[message.ssmlGender] : message.ssmlGender; return object; }; @@ -89451,6 +89719,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; @@ -89505,7 +89779,7 @@ object.synthesizeSpeechConfig = null; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) - object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; + object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding[message.audioEncoding] : message.audioEncoding; if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; if (message.synthesizeSpeechConfig != null && message.hasOwnProperty("synthesizeSpeechConfig")) @@ -91072,6 +91346,12 @@ if (object.flowVersion != null) message.flowVersion = String(object.flowVersion); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -91133,7 +91413,7 @@ if (message.flowVersion != null && message.hasOwnProperty("flowVersion")) object.flowVersion = message.flowVersion; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Deployment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Deployment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.Deployment.State[message.state] : message.state; if (message.result != null && message.hasOwnProperty("result")) object.result = $root.google.cloud.dialogflow.cx.v3beta1.Deployment.Result.toObject(message.result, options); if (message.startTime != null && message.hasOwnProperty("startTime")) @@ -92646,6 +92926,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; @@ -92664,6 +92950,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; @@ -92730,9 +93022,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.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; + object.kind = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] === undefined ? message.kind : $root.google.cloud.dialogflow.cx.v3beta1.EntityType.Kind[message.kind] : message.kind; if (message.autoExpansionMode != null && message.hasOwnProperty("autoExpansionMode")) - object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; + object.autoExpansionMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] === undefined ? message.autoExpansionMode : $root.google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode[message.autoExpansionMode] : message.autoExpansionMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -98245,6 +98537,12 @@ if (object.name != null) message.name = String(object.name); switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; case "AGGREGATED_TEST_RESULT_UNSPECIFIED": case 0: message.result = 0; @@ -98296,7 +98594,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; + object.result = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult[message.result] === undefined ? message.result : $root.google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult[message.result] : message.result; if (message.testCaseResults && message.testCaseResults.length) { object.testCaseResults = []; for (var j = 0; j < message.testCaseResults.length; ++j) @@ -101272,6 +101570,12 @@ } } switch (object.testResult) { + default: + if (typeof object.testResult === "number") { + message.testResult = object.testResult; + break; + } + break; case "TEST_RESULT_UNSPECIFIED": case 0: message.testResult = 0; @@ -101324,7 +101628,7 @@ object.conversationTurns[j] = $root.google.cloud.dialogflow.cx.v3beta1.ConversationTurn.toObject(message.conversationTurns[j], options); } if (message.testResult != null && message.hasOwnProperty("testResult")) - object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] : message.testResult; + object.testResult = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] === undefined ? message.testResult : $root.google.cloud.dialogflow.cx.v3beta1.TestResult[message.testResult] : message.testResult; if (message.testTime != null && message.hasOwnProperty("testTime")) object.testTime = $root.google.protobuf.Timestamp.toObject(message.testTime, options); return object; @@ -102733,6 +103037,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "DIFF_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -102777,7 +103087,7 @@ object.description = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.TestRunDifference.DiffType[message.type] : message.type; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; return object; @@ -105117,6 +105427,12 @@ if (object.agent != null) message.agent = String(object.agent); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "COVERAGE_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -105155,7 +105471,7 @@ object.agent = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.CalculateCoverageRequest.CoverageType[message.type] : message.type; if (message.agent != null && message.hasOwnProperty("agent")) object.agent = message.agent; return object; @@ -105745,6 +106061,12 @@ if (object.pageToken != null) message.pageToken = String(object.pageToken); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "TEST_CASE_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -105787,7 +106109,7 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView[message.view] === undefined ? message.view : $root.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest.TestCaseView[message.view] : message.view; return object; }; @@ -109772,6 +110094,12 @@ if (object.gcsUri != null) message.gcsUri = String(object.gcsUri); switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; case "DATA_FORMAT_UNSPECIFIED": case 0: message.dataFormat = 0; @@ -109816,7 +110144,7 @@ object.destination = "gcsUri"; } if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; return object; @@ -112684,6 +113012,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; @@ -112733,7 +113067,7 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; if (message.intentView != null && message.hasOwnProperty("intentView")) - object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.IntentView[message.intentView] : message.intentView; + object.intentView = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.IntentView[message.intentView] === undefined ? message.intentView : $root.google.cloud.dialogflow.cx.v3beta1.IntentView[message.intentView] : message.intentView; return object; }; @@ -114697,6 +115031,12 @@ message.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); } switch (object.responseType) { + default: + if (typeof object.responseType === "number") { + message.responseType = object.responseType; + break; + } + break; case "RESPONSE_TYPE_UNSPECIFIED": case 0: message.responseType = 0; @@ -114751,7 +115091,7 @@ if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; + object.responseType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.ResponseType[message.responseType] : message.responseType; if (message.allowCancellation != null && message.hasOwnProperty("allowCancellation")) object.allowCancellation = message.allowCancellation; return object; @@ -115669,6 +116009,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.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; @@ -115735,7 +116081,7 @@ object.languageCode = ""; } if (message.messageType != null && message.hasOwnProperty("messageType")) - object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; + object.messageType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.MessageType[message.messageType] === undefined ? message.messageType : $root.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.MessageType[message.messageType] : message.messageType; if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; if (message.isFinal != null && message.hasOwnProperty("isFinal")) @@ -118731,6 +119077,12 @@ if (object.resolvedInput != null) message.resolvedInput = String(object.resolvedInput); switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; case "MATCH_TYPE_UNSPECIFIED": case 0: message.matchType = 0; @@ -118793,7 +119145,7 @@ if (message.resolvedInput != null && message.hasOwnProperty("resolvedInput")) object.resolvedInput = message.resolvedInput; if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Match.MatchType[message.matchType] : message.matchType; + object.matchType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Match.MatchType[message.matchType] === undefined ? message.matchType : $root.google.cloud.dialogflow.cx.v3beta1.Match.MatchType[message.matchType] : message.matchType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.event != null && message.hasOwnProperty("event")) @@ -120684,6 +121036,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; @@ -120732,7 +121090,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.cx.v3beta1.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; + object.entityOverrideMode = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] === undefined ? message.entityOverrideMode : $root.google.cloud.dialogflow.cx.v3beta1.SessionEntityType.EntityOverrideMode[message.entityOverrideMode] : message.entityOverrideMode; if (message.entities && message.entities.length) { object.entities = []; for (var j = 0; j < message.entities.length; ++j) @@ -128765,6 +129123,12 @@ } } switch (object.mergeBehavior) { + default: + if (typeof object.mergeBehavior === "number") { + message.mergeBehavior = object.mergeBehavior; + break; + } + break; case "MERGE_BEHAVIOR_UNSPECIFIED": case 0: message.mergeBehavior = 0; @@ -128804,7 +129168,7 @@ object.messages[j] = $root.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.toObject(message.messages[j], options); } if (message.mergeBehavior != null && message.hasOwnProperty("mergeBehavior")) - object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; + object.mergeBehavior = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] === undefined ? message.mergeBehavior : $root.google.cloud.dialogflow.cx.v3beta1.WebhookResponse.FulfillmentResponse.MergeBehavior[message.mergeBehavior] : message.mergeBehavior; return object; }; @@ -129564,6 +129928,12 @@ if (object.required != null) message.required = Boolean(object.required); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "PARAMETER_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -129616,7 +129986,7 @@ if (message.required != null && message.hasOwnProperty("required")) object.required = message.required; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.PageInfo.FormInfo.ParameterInfo.ParameterState[message.state] : message.state; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.protobuf.Value.toObject(message.value, options); if (message.justCollected != null && message.hasOwnProperty("justCollected")) @@ -130656,6 +131026,12 @@ if (object.description != null) message.description = String(object.description); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -130775,7 +131151,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.Experiment.State[message.state] : message.state; if (message.definition != null && message.hasOwnProperty("definition")) object.definition = $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.toObject(message.definition, options); if (message.result != null && message.hasOwnProperty("result")) @@ -131925,6 +132301,12 @@ return object; var message = new $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "METRIC_UNSPECIFIED": case 0: message.type = 0; @@ -131951,6 +132333,12 @@ break; } switch (object.countType) { + default: + if (typeof object.countType === "number") { + message.countType = object.countType; + break; + } + break; case "COUNT_TYPE_UNSPECIFIED": case 0: message.countType = 0; @@ -131999,7 +132387,7 @@ object.countType = options.enums === String ? "COUNT_TYPE_UNSPECIFIED" : 0; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType[message.type] : message.type; if (message.ratio != null && message.hasOwnProperty("ratio")) { object.ratio = options.json && !isFinite(message.ratio) ? String(message.ratio) : message.ratio; if (options.oneofs) @@ -132013,7 +132401,7 @@ object.value = "count"; } if (message.countType != null && message.hasOwnProperty("countType")) - object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType[message.countType] : message.countType; + object.countType = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType[message.countType] === undefined ? message.countType : $root.google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType[message.countType] : message.countType; return object; }; @@ -137556,6 +137944,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.redactionStrategy) { + default: + if (typeof object.redactionStrategy === "number") { + message.redactionStrategy = object.redactionStrategy; + break; + } + break; case "REDACTION_STRATEGY_UNSPECIFIED": case 0: message.redactionStrategy = 0; @@ -137566,6 +137960,12 @@ break; } switch (object.redactionScope) { + default: + if (typeof object.redactionScope === "number") { + message.redactionScope = object.redactionScope; + break; + } + break; case "REDACTION_SCOPE_UNSPECIFIED": case 0: message.redactionScope = 0; @@ -137588,6 +137988,10 @@ for (var i = 0; i < object.purgeDataTypes.length; ++i) switch (object.purgeDataTypes[i]) { default: + if (typeof object.purgeDataTypes[i] === "number") { + message.purgeDataTypes[i] = object.purgeDataTypes[i]; + break; + } case "PURGE_DATA_TYPE_UNSPECIFIED": case 0: message.purgeDataTypes[i] = 0; @@ -137641,9 +138045,9 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.redactionStrategy != null && message.hasOwnProperty("redactionStrategy")) - object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; + object.redactionStrategy = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy[message.redactionStrategy] === undefined ? message.redactionStrategy : $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionStrategy[message.redactionStrategy] : message.redactionStrategy; if (message.redactionScope != null && message.hasOwnProperty("redactionScope")) - object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; + object.redactionScope = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope[message.redactionScope] === undefined ? message.redactionScope : $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.RedactionScope[message.redactionScope] : message.redactionScope; if (message.retentionWindowDays != null && message.hasOwnProperty("retentionWindowDays")) { object.retentionWindowDays = message.retentionWindowDays; if (options.oneofs) @@ -137652,7 +138056,7 @@ if (message.purgeDataTypes && message.purgeDataTypes.length) { object.purgeDataTypes = []; for (var j = 0; j < message.purgeDataTypes.length; ++j) - object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; + object.purgeDataTypes[j] = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] === undefined ? message.purgeDataTypes[j] : $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.PurgeDataType[message.purgeDataTypes[j]] : message.purgeDataTypes[j]; } if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) object.inspectTemplate = message.inspectTemplate; @@ -137950,6 +138354,12 @@ if (object.enableAudioRedaction != null) message.enableAudioRedaction = Boolean(object.enableAudioRedaction); switch (object.audioFormat) { + default: + if (typeof object.audioFormat === "number") { + message.audioFormat = object.audioFormat; + break; + } + break; case "AUDIO_FORMAT_UNSPECIFIED": case 0: message.audioFormat = 0; @@ -137996,7 +138406,7 @@ if (message.enableAudioRedaction != null && message.hasOwnProperty("enableAudioRedaction")) object.enableAudioRedaction = message.enableAudioRedaction; if (message.audioFormat != null && message.hasOwnProperty("audioFormat")) - object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; + object.audioFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] === undefined ? message.audioFormat : $root.google.cloud.dialogflow.cx.v3beta1.SecuritySettings.AudioExportSettings.AudioFormat[message.audioFormat] : message.audioFormat; return object; }; @@ -138989,6 +139399,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -139041,7 +139457,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Version.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.Version.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.cx.v3beta1.Version.State[message.state] : message.state; return object; }; @@ -142511,6 +142927,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; @@ -142535,6 +142957,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; @@ -142582,7 +143008,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")) @@ -142590,7 +143016,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; }; @@ -145401,6 +145827,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; @@ -145415,6 +145847,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; @@ -145541,9 +145979,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")) @@ -147890,6 +148328,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; @@ -147998,7 +148442,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")) @@ -148800,6 +149244,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; @@ -148816,6 +149266,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; @@ -148854,6 +149310,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; @@ -148924,7 +149384,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")) @@ -148932,7 +149392,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")) @@ -148945,7 +149405,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); @@ -150322,6 +150782,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; @@ -150391,7 +150857,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) @@ -152146,6 +152612,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; @@ -152195,7 +152667,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; }; @@ -152779,6 +153251,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; @@ -152817,7 +153295,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"; }