From acab8ed59d2972d4e86f673191e6629b86f035fe Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 15 Jun 2026 17:01:56 +0000 Subject: [PATCH 1/2] feat: migrate google-cloud-speech to librarian (keep helpers) --- librarian.yaml | 5 +- packages/google-cloud-speech/.OwlBot.yaml | 22 - .../google-cloud-speech/.repo-metadata.json | 31 +- .../google-cloud-speech/prettier.config.js | 4 - packages/google-cloud-speech/protos/protos.js | 9088 +++++++++++------ packages/google-cloud-speech/src/helpers.ts | 2 +- .../fixtures/streamingRecognize/input.wav | Bin 113604 -> 0 bytes .../system-test/speech_system_test.js | 111 - .../system-test/speech_system_test_v1.js | 111 - .../speech_system_test_v1p1beta1.js | 111 - .../speech_typescript_system_test.ts | 124 - .../speech_typescript_system_test_v1.ts | 124 - ...speech_typescript_system_test_v1p1beta1.ts | 124 - .../google-cloud-speech/test/helpers.test.ts | 2 +- 14 files changed, 5718 insertions(+), 4141 deletions(-) delete mode 100644 packages/google-cloud-speech/.OwlBot.yaml delete mode 100644 packages/google-cloud-speech/prettier.config.js delete mode 100644 packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav delete mode 100644 packages/google-cloud-speech/system-test/speech_system_test.js delete mode 100644 packages/google-cloud-speech/system-test/speech_system_test_v1.js delete mode 100644 packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js delete mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test.ts delete mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts delete mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts diff --git a/librarian.yaml b/librarian.yaml index 7765058b5626..c5f34c64e1c1 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1399,7 +1399,10 @@ libraries: - path: google/cloud/speech/v1 - path: google/cloud/speech/v1p1beta1 copyright_year: "2026" - skip_generate: true + keep: + - src/helpers.ts + - src/index.ts + - test/helpers.test.ts nodejs: default_version: v1 dependencies: diff --git a/packages/google-cloud-speech/.OwlBot.yaml b/packages/google-cloud-speech/.OwlBot.yaml deleted file mode 100644 index 935e8e8659e4..000000000000 --- a/packages/google-cloud-speech/.OwlBot.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/speech/google-cloud-speech-nodejs - dest: /owl-bot-staging/google-cloud-speech - -begin-after-commit-hash: f43939eac6a0bb5998c1fa0f79063194e699230e diff --git a/packages/google-cloud-speech/.repo-metadata.json b/packages/google-cloud-speech/.repo-metadata.json index 0f074bc04db8..8f3fffe654de 100644 --- a/packages/google-cloud-speech/.repo-metadata.json +++ b/packages/google-cloud-speech/.repo-metadata.json @@ -1,17 +1,16 @@ { - "name": "speech", - "name_pretty": "Cloud Speech", - "product_documentation": "https://cloud.google.com/speech-to-text/docs/", - "client_documentation": "https://googleapis.dev/nodejs/speech/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559758", - "release_level": "stable", - "language": "nodejs", - "repo": "googleapis/google-cloud-node", - "distribution_name": "@google-cloud/speech", - "api_id": "speech.googleapis.com", - "requires_billing": false, - "codeowner_team": "@googleapis/ml-apis", - "default_version": "v1", - "api_shortname": "speech", - "library_type": "GAPIC_COMBO" -} + "api_description": "Converts audio to text by applying powerful neural network models.", + "api_id": "speech.googleapis.com", + "api_shortname": "speech", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/speech/latest", + "default_version": "v1", + "distribution_name": "@google-cloud/speech", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559758", + "language": "nodejs", + "library_type": "GAPIC_AUTO", + "name": "speech", + "name_pretty": "Cloud Speech-to-Text", + "product_documentation": "https://cloud.google.com/speech-to-text/docs", + "release_level": "stable", + "repo": "googleapis/google-cloud-node" +} \ No newline at end of file diff --git a/packages/google-cloud-speech/prettier.config.js b/packages/google-cloud-speech/prettier.config.js deleted file mode 100644 index a425d3f76180..000000000000 --- a/packages/google-cloud-speech/prettier.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - singleQuote: true, - trailingComma: 'es5', -}; diff --git a/packages/google-cloud-speech/protos/protos.js b/packages/google-cloud-speech/protos/protos.js index 85a8976389f4..9f881ef56d95 100644 --- a/packages/google-cloud-speech/protos/protos.js +++ b/packages/google-cloud-speech/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_speech_protos || ($protobuf.roots._google_cloud_speech_protos = {}); + var $root = $protobuf.roots["_google_cloud_speech_protos"] || ($protobuf.roots["_google_cloud_speech_protos"] = {}); $root.google = (function() { @@ -118,7 +118,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return this.rpcCall(recognize, $root.google.cloud.speech.v1.RecognizeRequest, $root.google.cloud.speech.v1.RecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v1.RecognizeRequest, $root.google.cloud.speech.v1.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -151,7 +151,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.longRunningRecognize = function longRunningRecognize(request, callback) { - return this.rpcCall(longRunningRecognize, $root.google.cloud.speech.v1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, longRunningRecognize, $root.google.cloud.speech.v1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "LongRunningRecognize" }); /** @@ -184,7 +184,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v1.StreamingRecognizeRequest, $root.google.cloud.speech.v1.StreamingRecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v1.StreamingRecognizeRequest, $root.google.cloud.speech.v1.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -262,13 +262,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer) { + RecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -282,7 +286,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -356,12 +360,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { var error = $root.google.cloud.speech.v1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; @@ -380,18 +384,20 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.RecognizeRequest(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (typeof object.audio !== "object") + if (!$util.isObject(object.audio)) throw TypeError(".google.cloud.speech.v1.RecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1.RecognitionAudio.fromObject(object.audio, long + 1); } @@ -407,18 +413,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options) { + RecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options, q + 1); return object; }; @@ -522,15 +532,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeRequest.encode = function encode(message, writer) { + LongRunningRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -544,7 +558,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -622,17 +636,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { var error = $root.google.cloud.speech.v1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { var error = $root.google.cloud.speech.v1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -651,23 +665,25 @@ LongRunningRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.LongRunningRecognizeRequest(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (typeof object.audio !== "object") + if (!$util.isObject(object.audio)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1.RecognitionAudio.fromObject(object.audio, long + 1); } if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") + if (!$util.isObject(object.outputConfig)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -683,21 +699,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeRequest.toObject = function toObject(message, options) { + LongRunningRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; object.outputConfig = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options, q + 1); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); return object; }; @@ -797,9 +817,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptOutputConfig.encode = function encode(message, writer) { + TranscriptOutputConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); return writer; @@ -815,7 +839,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -886,7 +910,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { properties.outputType = 1; if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; @@ -905,6 +929,8 @@ TranscriptOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptOutputConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.TranscriptOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -924,11 +950,15 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptOutputConfig.toObject = function toObject(message, options) { + TranscriptOutputConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { object.gcsUri = message.gcsUri; if (options.oneofs) object.outputType = "gcsUri"; @@ -1041,11 +1071,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer) { + StreamingRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audioContent); return writer; @@ -1061,7 +1095,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1136,7 +1170,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v1.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -1144,7 +1178,7 @@ return "streamingConfig." + error; } } - if (message.audioContent != null && message.hasOwnProperty("audioContent")) { + if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -1165,13 +1199,15 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognizeRequest(); if (object.streamingConfig != null) { - if (typeof object.streamingConfig !== "object") + if (!$util.isObject(object.streamingConfig)) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -1192,16 +1228,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options) { + StreamingRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.toObject(message.streamingConfig, options); + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); if (options.oneofs) object.streamingRequest = "streamingConfig"; } - if (message.audioContent != null && message.hasOwnProperty("audioContent")) { + if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { object.audioContent = options.bytes === String ? $util.base64.encode(message.audioContent, 0, message.audioContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.audioContent) : message.audioContent; if (options.oneofs) object.streamingRequest = "audioContent"; @@ -1327,11 +1367,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer) { + StreamingRecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) @@ -1339,7 +1383,7 @@ if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -1353,7 +1397,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1439,21 +1483,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) if (typeof message.singleUtterance !== "boolean") return "singleUtterance: boolean expected"; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { var error = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; @@ -1472,13 +1516,15 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } @@ -1489,7 +1535,7 @@ if (object.enableVoiceActivityEvents != null) message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); if (object.voiceActivityTimeout != null) { - if (typeof object.voiceActivityTimeout !== "object") + if (!$util.isObject(object.voiceActivityTimeout)) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -1505,9 +1551,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options) { + StreamingRecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; @@ -1516,16 +1566,16 @@ object.enableVoiceActivityEvents = false; object.voiceActivityTimeout = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) object.singleUtterance = message.singleUtterance; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) object.interimResults = message.interimResults; - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); return object; }; @@ -1617,13 +1667,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer) { + VoiceActivityTimeout.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -1637,7 +1691,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -1711,12 +1765,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -1735,18 +1789,20 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (typeof object.speechStartTimeout !== "object") + if (!$util.isObject(object.speechStartTimeout)) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (typeof object.speechEndTimeout !== "object") + if (!$util.isObject(object.speechEndTimeout)) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -1762,18 +1818,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options) { + VoiceActivityTimeout.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); return object; }; @@ -2035,9 +2095,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer) { + RecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -2050,13 +2114,13 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.profanityFilter); if (message.speechContexts != null && message.speechContexts.length) for (var i = 0; i < message.speechContexts.length; ++i) - $root.google.cloud.speech.v1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.audioChannelCount); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableWordTimeOffsets); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutomaticPunctuation); if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) @@ -2071,15 +2135,15 @@ for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) writer.uint32(/* id 18, wireType 2 =*/146).string(message.alternativeLanguageCodes[i]); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + $root.google.cloud.speech.v1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); return writer; }; @@ -2093,7 +2157,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2243,7 +2307,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -2259,42 +2323,42 @@ case 9: break; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; - if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) if (typeof message.enableSeparateRecognitionPerChannel !== "boolean") return "enableSeparateRecognitionPerChannel: boolean expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; - if (message.alternativeLanguageCodes != null && message.hasOwnProperty("alternativeLanguageCodes")) { + if (message.alternativeLanguageCodes != null && Object.hasOwnProperty.call(message, "alternativeLanguageCodes")) { if (!Array.isArray(message.alternativeLanguageCodes)) return "alternativeLanguageCodes: array expected"; for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) if (!$util.isString(message.alternativeLanguageCodes[i])) return "alternativeLanguageCodes: string[] expected"; } - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.adaptation != null && message.hasOwnProperty("adaptation")) { + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { var error = $root.google.cloud.speech.v1.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { var error = $root.google.cloud.speech.v1.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.speechContexts != null && message.hasOwnProperty("speechContexts")) { + if (message.speechContexts != null && Object.hasOwnProperty.call(message, "speechContexts")) { if (!Array.isArray(message.speechContexts)) return "speechContexts: array expected"; for (var i = 0; i < message.speechContexts.length; ++i) { @@ -2303,39 +2367,39 @@ return "speechContexts." + error; } } - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) { + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenPunctuation, long + 1); if (error) return "enableSpokenPunctuation." + error; } - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) { + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenEmojis, long + 1); if (error) return "enableSpokenEmojis." + error; } - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { var error = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v1.RecognitionMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) + if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) if (typeof message.useEnhanced !== "boolean") return "useEnhanced: boolean expected"; return null; @@ -2352,6 +2416,8 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2425,12 +2491,12 @@ if (object.profanityFilter != null) message.profanityFilter = Boolean(object.profanityFilter); if (object.adaptation != null) { - if (typeof object.adaptation !== "object") + if (!$util.isObject(object.adaptation)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (typeof object.transcriptNormalization !== "object") + if (!$util.isObject(object.transcriptNormalization)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } @@ -2439,7 +2505,7 @@ throw TypeError(".google.cloud.speech.v1.RecognitionConfig.speechContexts: array expected"); message.speechContexts = []; for (var i = 0; i < object.speechContexts.length; ++i) { - if (typeof object.speechContexts[i] !== "object") + if (!$util.isObject(object.speechContexts[i])) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.speechContexts: object expected"); message.speechContexts[i] = $root.google.cloud.speech.v1.SpeechContext.fromObject(object.speechContexts[i], long + 1); } @@ -2451,22 +2517,22 @@ if (object.enableAutomaticPunctuation != null) message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); if (object.enableSpokenPunctuation != null) { - if (typeof object.enableSpokenPunctuation !== "object") + if (!$util.isObject(object.enableSpokenPunctuation)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.enableSpokenPunctuation: object expected"); message.enableSpokenPunctuation = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenPunctuation, long + 1); } if (object.enableSpokenEmojis != null) { - if (typeof object.enableSpokenEmojis !== "object") + if (!$util.isObject(object.enableSpokenEmojis)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.enableSpokenEmojis: object expected"); message.enableSpokenEmojis = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenEmojis, long + 1); } if (object.diarizationConfig != null) { - if (typeof object.diarizationConfig !== "object") + if (!$util.isObject(object.diarizationConfig)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v1.RecognitionConfig.metadata: object expected"); message.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.fromObject(object.metadata, long + 1); } @@ -2486,9 +2552,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options) { + RecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.speechContexts = []; @@ -2514,52 +2584,52 @@ object.enableSpokenEmojis = null; object.transcriptNormalization = null; } - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v1.RecognitionConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v1.RecognitionConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) object.profanityFilter = message.profanityFilter; if (message.speechContexts && message.speechContexts.length) { object.speechContexts = []; for (var j = 0; j < message.speechContexts.length; ++j) - object.speechContexts[j] = $root.google.cloud.speech.v1.SpeechContext.toObject(message.speechContexts[j], options); + object.speechContexts[j] = $root.google.cloud.speech.v1.SpeechContext.toObject(message.speechContexts[j], options, q + 1); } - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) object.audioChannelCount = message.audioChannelCount; - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.toObject(message.metadata, options); - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.toObject(message.metadata, options, q + 1); + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) object.enableSeparateRecognitionPerChannel = message.enableSeparateRecognitionPerChannel; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; - if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) + if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) object.useEnhanced = message.useEnhanced; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; if (message.alternativeLanguageCodes && message.alternativeLanguageCodes.length) { object.alternativeLanguageCodes = []; for (var j = 0; j < message.alternativeLanguageCodes.length; ++j) object.alternativeLanguageCodes[j] = message.alternativeLanguageCodes[j]; } - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); - if (message.adaptation != null && message.hasOwnProperty("adaptation")) - object.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.toObject(message.adaptation, options); - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) - object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options); - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) - object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options); - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.toObject(message.transcriptNormalization, options); + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) + object.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.toObject(message.adaptation, options, q + 1); + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) + object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options, q + 1); + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) + object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options, q + 1); + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); return object; }; @@ -2702,9 +2772,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer) { + SpeakerDiarizationConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeakerDiarization); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) @@ -2726,7 +2800,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -2808,16 +2882,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; return null; @@ -2834,6 +2908,8 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeakerDiarizationConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2859,9 +2935,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options) { + SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableSpeakerDiarization = false; @@ -2869,13 +2949,13 @@ object.maxSpeakerCount = 0; object.speakerTag = 0; } - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) object.speakerTag = message.speakerTag; return object; }; @@ -3025,9 +3105,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionMetadata.encode = function encode(message, writer) { + RecognitionMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.interactionType); if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) @@ -3057,7 +3141,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3155,7 +3239,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.interactionType != null && message.hasOwnProperty("interactionType")) + if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) switch (message.interactionType) { default: return "interactionType: enum value expected"; @@ -3170,10 +3254,10 @@ case 8: break; } - if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) if (!$util.isInteger(message.industryNaicsCodeOfAudio)) return "industryNaicsCodeOfAudio: integer expected"; - if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) + if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) switch (message.microphoneDistance) { default: return "microphoneDistance: enum value expected"; @@ -3183,7 +3267,7 @@ case 3: break; } - if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) + if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) switch (message.originalMediaType) { default: return "originalMediaType: enum value expected"; @@ -3192,7 +3276,7 @@ case 2: break; } - if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) + if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) switch (message.recordingDeviceType) { default: return "recordingDeviceType: enum value expected"; @@ -3205,13 +3289,13 @@ case 6: break; } - if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) + if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) if (!$util.isString(message.recordingDeviceName)) return "recordingDeviceName: string expected"; - if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) + if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) if (!$util.isString(message.originalMimeType)) return "originalMimeType: string expected"; - if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) + if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) if (!$util.isString(message.audioTopic)) return "audioTopic: string expected"; return null; @@ -3228,6 +3312,8 @@ RecognitionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.RecognitionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3377,9 +3463,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionMetadata.toObject = function toObject(message, options) { + RecognitionMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interactionType = options.enums === String ? "INTERACTION_TYPE_UNSPECIFIED" : 0; @@ -3391,21 +3481,21 @@ object.originalMimeType = ""; object.audioTopic = ""; } - if (message.interactionType != null && message.hasOwnProperty("interactionType")) + if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) object.interactionType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.InteractionType[message.interactionType] === undefined ? message.interactionType : $root.google.cloud.speech.v1.RecognitionMetadata.InteractionType[message.interactionType] : message.interactionType; - if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) object.industryNaicsCodeOfAudio = message.industryNaicsCodeOfAudio; - if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) + if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) object.microphoneDistance = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] === undefined ? message.microphoneDistance : $root.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] : message.microphoneDistance; - if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) + if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) object.originalMediaType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] === undefined ? message.originalMediaType : $root.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] : message.originalMediaType; - if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) + if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) object.recordingDeviceType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] === undefined ? message.recordingDeviceType : $root.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] : message.recordingDeviceType; - if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) + if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) object.recordingDeviceName = message.recordingDeviceName; - if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) + if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) object.originalMimeType = message.originalMimeType; - if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) + if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) object.audioTopic = message.audioTopic; return object; }; @@ -3588,9 +3678,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechContext.encode = function encode(message, writer) { + SpeechContext.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); @@ -3609,7 +3703,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3685,14 +3779,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) if (!$util.isString(message.phrases[i])) return "phrases: string[] expected"; } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -3709,6 +3803,8 @@ SpeechContext.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechContext) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechContext: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3735,9 +3831,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechContext.toObject = function toObject(message, options) { + SpeechContext.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -3748,7 +3848,7 @@ for (var j = 0; j < message.phrases.length; ++j) object.phrases[j] = message.phrases[j]; } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -3858,9 +3958,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionAudio.encode = function encode(message, writer) { + RecognitionAudio.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) @@ -3878,7 +3982,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -3953,12 +4057,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -3979,6 +4083,8 @@ RecognitionAudio.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionAudio) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.RecognitionAudio: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4003,16 +4109,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionAudio.toObject = function toObject(message, options) { + RecognitionAudio.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; @@ -4130,16 +4240,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer) { + RecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.requestId); return writer; @@ -4155,7 +4269,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4239,7 +4353,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -4248,17 +4362,17 @@ return "results." + error; } } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -4275,6 +4389,8 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4285,24 +4401,24 @@ throw TypeError(".google.cloud.speech.v1.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1.RecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1.RecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -4321,9 +4437,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options) { + RecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -4332,21 +4452,23 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options); - } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + } + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -4481,20 +4603,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeResponse.encode = function encode(message, writer) { + LongRunningRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.requestId); return writer; @@ -4510,7 +4636,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4602,7 +4728,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -4611,27 +4737,27 @@ return "results." + error; } } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { var error = $root.google.cloud.speech.v1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; } - if (message.outputError != null && message.hasOwnProperty("outputError")) { + if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) { var error = $root.google.rpc.Status.verify(message.outputError, long + 1); if (error) return "outputError." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -4648,6 +4774,8 @@ LongRunningRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4658,34 +4786,34 @@ throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") + if (!$util.isObject(object.outputConfig)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } if (object.outputError != null) { - if (typeof object.outputError !== "object") + if (!$util.isObject(object.outputError)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.outputError: object expected"); message.outputError = $root.google.rpc.Status.fromObject(object.outputError, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -4704,9 +4832,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeResponse.toObject = function toObject(message, options) { + LongRunningRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -4717,25 +4849,27 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options); - } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options); - if (message.outputError != null && message.hasOwnProperty("outputError")) - object.outputError = $root.google.rpc.Status.toObject(message.outputError, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + } + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); + if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) + object.outputError = $root.google.rpc.Status.toObject(message.outputError, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -4851,15 +4985,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeMetadata.encode = function encode(message, writer) { + LongRunningRecognizeMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); return writer; @@ -4875,7 +5013,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -4957,20 +5095,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime, long + 1); if (error) return "lastUpdateTime." + error; } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -4987,6 +5125,8 @@ LongRunningRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4995,12 +5135,12 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") + if (!$util.isObject(object.lastUpdateTime)) throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime, long + 1); } @@ -5018,9 +5158,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeMetadata.toObject = function toObject(message, options) { + LongRunningRecognizeMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; @@ -5028,13 +5172,13 @@ object.lastUpdateTime = null; object.uri = ""; } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) object.progressPercent = message.progressPercent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options, q + 1); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; return object; }; @@ -5176,22 +5320,26 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer) { + StreamingRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 10, wireType 0 =*/80).int64(message.requestId); return writer; @@ -5207,7 +5355,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5303,12 +5451,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -5317,7 +5465,7 @@ return "results." + error; } } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -5328,22 +5476,22 @@ case 4: break; } - if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) { var error = $root.google.protobuf.Duration.verify(message.speechEventTime, long + 1); if (error) return "speechEventTime." + error; } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -5360,13 +5508,15 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognizeResponse(); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -5375,7 +5525,7 @@ throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -5409,23 +5559,23 @@ break; } if (object.speechEventTime != null) { - if (typeof object.speechEventTime !== "object") + if (!$util.isObject(object.speechEventTime)) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.speechEventTime: object expected"); message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime, long + 1); } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -5444,9 +5594,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options) { + StreamingRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -5458,27 +5612,29 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.StreamingRecognitionResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.speech.v1.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) - object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -5633,18 +5789,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -5662,7 +5822,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -5754,7 +5914,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -5763,21 +5923,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -5794,6 +5954,8 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -5804,7 +5966,7 @@ throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -5814,7 +5976,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndTime != null) { - if (typeof object.resultEndTime !== "object") + if (!$util.isObject(object.resultEndTime)) throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -5834,9 +5996,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -5850,17 +6016,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -5975,16 +6141,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer) { + SpeechRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -6000,7 +6170,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6084,7 +6254,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -6093,15 +6263,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -6118,6 +6288,8 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6128,7 +6300,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -6136,7 +6308,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndTime != null) { - if (typeof object.resultEndTime !== "object") + if (!$util.isObject(object.resultEndTime)) throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -6154,9 +6326,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options) { + SpeechRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -6168,13 +6344,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -6280,16 +6456,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer) { + SpeechRecognitionAlternative.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -6303,7 +6483,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6383,13 +6563,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && message.hasOwnProperty("words")) { + if (message.words != null && Object.hasOwnProperty.call(message, "words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -6412,6 +6592,8 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechRecognitionAlternative) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6426,7 +6608,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (typeof object.words[i] !== "object") + if (!$util.isObject(object.words[i])) throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v1.WordInfo.fromObject(object.words[i], long + 1); } @@ -6443,9 +6625,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options) { + SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -6453,14 +6639,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) object.transcript = message.transcript; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v1.WordInfo.toObject(message.words[j], options); + object.words[j] = $root.google.cloud.speech.v1.WordInfo.toObject(message.words[j], options, q + 1); } return object; }; @@ -6592,13 +6778,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer) { + WordInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -6620,7 +6810,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6710,26 +6900,26 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Duration.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Duration.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.word != null && message.hasOwnProperty("word")) + if (message.word != null && Object.hasOwnProperty.call(message, "word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -6746,18 +6936,20 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.WordInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.WordInfo(); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.cloud.speech.v1.WordInfo.startTime: object expected"); message.startTime = $root.google.protobuf.Duration.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.cloud.speech.v1.WordInfo.endTime: object expected"); message.endTime = $root.google.protobuf.Duration.fromObject(object.endTime, long + 1); } @@ -6781,9 +6973,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options) { + WordInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startTime = null; @@ -6793,17 +6989,17 @@ object.speakerTag = 0; object.speakerLabel = ""; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options); - if (message.word != null && message.hasOwnProperty("word")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options, q + 1); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) object.speakerTag = message.speakerTag; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -6899,9 +7095,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptationInfo.encode = function encode(message, writer) { + SpeechAdaptationInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.adaptationTimeout); if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) @@ -6919,7 +7119,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -6993,10 +7193,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) + if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) if (typeof message.adaptationTimeout !== "boolean") return "adaptationTimeout: boolean expected"; - if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) + if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) if (!$util.isString(message.timeoutMessage)) return "timeoutMessage: string expected"; return null; @@ -7013,6 +7213,8 @@ SpeechAdaptationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechAdaptationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7034,17 +7236,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptationInfo.toObject = function toObject(message, options) { + SpeechAdaptationInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.adaptationTimeout = false; object.timeoutMessage = ""; } - if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) + if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) object.adaptationTimeout = message.adaptationTimeout; - if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) + if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) object.timeoutMessage = message.timeoutMessage; return object; }; @@ -7150,16 +7356,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer) { + CustomClass.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -7173,7 +7383,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7253,13 +7463,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.items != null && message.hasOwnProperty("items")) { + if (message.items != null && Object.hasOwnProperty.call(message, "items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -7282,6 +7492,8 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CustomClass) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7296,7 +7508,7 @@ throw TypeError(".google.cloud.speech.v1.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") + if (!$util.isObject(object.items[i])) throw TypeError(".google.cloud.speech.v1.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v1.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -7313,9 +7525,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options) { + CustomClass.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -7323,14 +7539,14 @@ object.name = ""; object.customClassId = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) object.customClassId = message.customClassId; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v1.CustomClass.ClassItem.toObject(message.items[j], options); + object.items[j] = $root.google.cloud.speech.v1.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); } return object; }; @@ -7414,9 +7630,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer) { + ClassItem.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -7432,7 +7652,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7502,7 +7722,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -7519,6 +7739,8 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CustomClass.ClassItem) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7538,13 +7760,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options) { + ClassItem.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -7653,14 +7879,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer) { + PhraseSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); return writer; @@ -7676,7 +7906,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -7756,10 +7986,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -7768,7 +7998,7 @@ return "phrases." + error; } } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -7785,6 +8015,8 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.PhraseSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7797,7 +8029,7 @@ throw TypeError(".google.cloud.speech.v1.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (typeof object.phrases[i] !== "object") + if (!$util.isObject(object.phrases[i])) throw TypeError(".google.cloud.speech.v1.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v1.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -7816,9 +8048,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options) { + PhraseSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -7826,14 +8062,14 @@ object.name = ""; object.boost = 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v1.PhraseSet.Phrase.toObject(message.phrases[j], options); + object.phrases[j] = $root.google.cloud.speech.v1.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -7926,9 +8162,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer) { + Phrase.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -7946,7 +8186,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8020,10 +8260,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -8040,6 +8280,8 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.PhraseSet.Phrase) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8061,17 +8303,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options) { + Phrase.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -8191,20 +8437,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer) { + SpeechAdaptation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.phraseSetReferences != null && message.phraseSetReferences.length) for (var i = 0; i < message.phraseSetReferences.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetReferences[i]); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -8218,7 +8468,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8306,7 +8556,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -8315,14 +8565,14 @@ return "phraseSets." + error; } } - if (message.phraseSetReferences != null && message.hasOwnProperty("phraseSetReferences")) { + if (message.phraseSetReferences != null && Object.hasOwnProperty.call(message, "phraseSetReferences")) { if (!Array.isArray(message.phraseSetReferences)) return "phraseSetReferences: array expected"; for (var i = 0; i < message.phraseSetReferences.length; ++i) if (!$util.isString(message.phraseSetReferences[i])) return "phraseSetReferences: string[] expected"; } - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -8331,7 +8581,7 @@ return "customClasses." + error; } } - if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) { + if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) { var error = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.verify(message.abnfGrammar, long + 1); if (error) return "abnfGrammar." + error; @@ -8350,6 +8600,8 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8360,7 +8612,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -8377,13 +8629,13 @@ throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClasses[i], long + 1); } } if (object.abnfGrammar != null) { - if (typeof object.abnfGrammar !== "object") + if (!$util.isObject(object.abnfGrammar)) throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.abnfGrammar: object expected"); message.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.fromObject(object.abnfGrammar, long + 1); } @@ -8399,9 +8651,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options) { + SpeechAdaptation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -8413,7 +8669,7 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); } if (message.phraseSetReferences && message.phraseSetReferences.length) { object.phraseSetReferences = []; @@ -8423,10 +8679,10 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options, q + 1); } - if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) - object.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options); + if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) + object.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options, q + 1); return object; }; @@ -8510,9 +8766,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ABNFGrammar.encode = function encode(message, writer) { + ABNFGrammar.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.abnfStrings != null && message.abnfStrings.length) for (var i = 0; i < message.abnfStrings.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.abnfStrings[i]); @@ -8529,7 +8789,7 @@ * @returns {$protobuf.Writer} Writer */ ABNFGrammar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8601,7 +8861,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.abnfStrings != null && message.hasOwnProperty("abnfStrings")) { + if (message.abnfStrings != null && Object.hasOwnProperty.call(message, "abnfStrings")) { if (!Array.isArray(message.abnfStrings)) return "abnfStrings: array expected"; for (var i = 0; i < message.abnfStrings.length; ++i) @@ -8622,6 +8882,8 @@ ABNFGrammar.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8646,9 +8908,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ABNFGrammar.toObject = function toObject(message, options) { + ABNFGrammar.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.abnfStrings = []; @@ -8746,12 +9012,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer) { + TranscriptNormalization.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -8765,7 +9035,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -8837,7 +9107,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && message.hasOwnProperty("entries")) { + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -8860,6 +9130,8 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptNormalization) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8870,7 +9142,7 @@ throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") + if (!$util.isObject(object.entries[i])) throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -8887,16 +9159,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options) { + TranscriptNormalization.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); } return object; }; @@ -8998,9 +9274,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -9020,7 +9300,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9098,13 +9378,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -9121,6 +9401,8 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptNormalization.Entry) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9144,20 +9426,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) object.search = message.search; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) object.replace = message.replace; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -9246,7 +9532,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v1.CreatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v1.CreatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -9279,7 +9565,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v1.GetPhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v1.GetPhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -9312,7 +9598,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listPhraseSet = function listPhraseSet(request, callback) { - return this.rpcCall(listPhraseSet, $root.google.cloud.speech.v1.ListPhraseSetRequest, $root.google.cloud.speech.v1.ListPhraseSetResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSet, $root.google.cloud.speech.v1.ListPhraseSetRequest, $root.google.cloud.speech.v1.ListPhraseSetResponse, request, callback); }, "name", { value: "ListPhraseSet" }); /** @@ -9345,7 +9631,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -9378,7 +9664,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -9411,7 +9697,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createCustomClass = function createCustomClass(request, callback) { - return this.rpcCall(createCustomClass, $root.google.cloud.speech.v1.CreateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v1.CreateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -9444,7 +9730,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getCustomClass = function getCustomClass(request, callback) { - return this.rpcCall(getCustomClass, $root.google.cloud.speech.v1.GetCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v1.GetCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -9477,7 +9763,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v1.ListCustomClassesRequest, $root.google.cloud.speech.v1.ListCustomClassesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v1.ListCustomClassesRequest, $root.google.cloud.speech.v1.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -9510,7 +9796,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v1.UpdateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v1.UpdateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -9543,7 +9829,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -9630,15 +9916,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer) { + CreatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetId); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -9652,7 +9942,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9730,13 +10020,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; @@ -9755,6 +10045,8 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CreatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9765,7 +10057,7 @@ if (object.phraseSetId != null) message.phraseSetId = String(object.phraseSetId); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v1.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -9781,21 +10073,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options) { + CreatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.phraseSetId = ""; object.phraseSet = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options); + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options, q + 1); return object; }; @@ -9890,13 +10186,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer) { + UpdatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -9910,7 +10210,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -9984,12 +10284,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -10008,18 +10308,20 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.UpdatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -10035,18 +10337,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options) { + UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; } - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -10132,9 +10438,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer) { + GetPhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -10150,7 +10460,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10220,7 +10530,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -10237,6 +10547,8 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.GetPhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10256,13 +10568,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options) { + GetPhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -10367,9 +10683,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetRequest.encode = function encode(message, writer) { + ListPhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -10389,7 +10709,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10467,13 +10787,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -10490,6 +10810,8 @@ ListPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListPhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.ListPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10513,20 +10835,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetRequest.toObject = function toObject(message, options) { + ListPhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -10623,12 +10949,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetResponse.encode = function encode(message, writer) { + ListPhraseSetResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -10644,7 +10974,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10720,7 +11050,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -10729,7 +11059,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -10746,6 +11076,8 @@ ListPhraseSetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListPhraseSetResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10756,7 +11088,7 @@ throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -10775,9 +11107,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetResponse.toObject = function toObject(message, options) { + ListPhraseSetResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -10786,9 +11122,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -10875,9 +11211,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer) { + DeletePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -10893,7 +11233,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -10963,7 +11303,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -10980,6 +11320,8 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.DeletePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10999,13 +11341,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options) { + DeletePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -11110,15 +11456,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer) { + CreateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -11132,7 +11482,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11210,13 +11560,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; @@ -11235,6 +11585,8 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CreateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11245,7 +11597,7 @@ if (object.customClassId != null) message.customClassId = String(object.customClassId); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v1.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClass, long + 1); } @@ -11261,21 +11613,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options) { + CreateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.customClassId = ""; object.customClass = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) object.customClassId = message.customClassId; - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options); + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options, q + 1); return object; }; @@ -11370,13 +11726,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer) { + UpdateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -11390,7 +11750,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11464,12 +11824,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -11488,18 +11848,20 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.UpdateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.UpdateCustomClassRequest(); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -11515,18 +11877,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options) { + UpdateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; } - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -11612,9 +11978,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer) { + GetCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -11630,7 +12000,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11700,7 +12070,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -11717,6 +12087,8 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.GetCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11736,13 +12108,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options) { + GetCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -11847,9 +12223,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer) { + ListCustomClassesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -11869,7 +12249,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -11947,13 +12327,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -11970,6 +12350,8 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListCustomClassesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11993,20 +12375,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options) { + ListCustomClassesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -12103,12 +12489,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer) { + ListCustomClassesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -12124,7 +12514,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12200,7 +12590,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -12209,7 +12599,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -12226,6 +12616,8 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListCustomClassesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12236,7 +12628,7 @@ throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -12255,9 +12647,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options) { + ListCustomClassesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -12266,9 +12662,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -12355,9 +12751,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer) { + DeleteCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -12373,7 +12773,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12443,7 +12843,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -12460,6 +12860,8 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.DeleteCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12479,13 +12881,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options) { + DeleteCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -12583,7 +12989,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return this.rpcCall(recognize, $root.google.cloud.speech.v1p1beta1.RecognizeRequest, $root.google.cloud.speech.v1p1beta1.RecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v1p1beta1.RecognizeRequest, $root.google.cloud.speech.v1p1beta1.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -12616,7 +13022,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.longRunningRecognize = function longRunningRecognize(request, callback) { - return this.rpcCall(longRunningRecognize, $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, longRunningRecognize, $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "LongRunningRecognize" }); /** @@ -12649,7 +13055,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -12727,13 +13133,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer) { + RecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -12747,7 +13157,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -12821,12 +13231,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; @@ -12845,18 +13255,20 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.RecognizeRequest(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (typeof object.audio !== "object") + if (!$util.isObject(object.audio)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.fromObject(object.audio, long + 1); } @@ -12872,18 +13284,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options) { + RecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options, q + 1); return object; }; @@ -12987,15 +13403,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeRequest.encode = function encode(message, writer) { + LongRunningRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -13009,7 +13429,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13087,17 +13507,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -13116,23 +13536,25 @@ LongRunningRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (typeof object.audio !== "object") + if (!$util.isObject(object.audio)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.fromObject(object.audio, long + 1); } if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") + if (!$util.isObject(object.outputConfig)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -13148,21 +13570,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeRequest.toObject = function toObject(message, options) { + LongRunningRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; object.outputConfig = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); - if (message.audio != null && message.hasOwnProperty("audio")) - object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) + object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options, q + 1); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); return object; }; @@ -13262,9 +13688,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptOutputConfig.encode = function encode(message, writer) { + TranscriptOutputConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); return writer; @@ -13280,7 +13710,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13351,7 +13781,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { properties.outputType = 1; if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; @@ -13370,6 +13800,8 @@ TranscriptOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13389,11 +13821,15 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptOutputConfig.toObject = function toObject(message, options) { + TranscriptOutputConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { object.gcsUri = message.gcsUri; if (options.oneofs) object.outputType = "gcsUri"; @@ -13506,11 +13942,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer) { + StreamingRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audioContent); return writer; @@ -13526,7 +13966,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13601,7 +14041,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -13609,7 +14049,7 @@ return "streamingConfig." + error; } } - if (message.audioContent != null && message.hasOwnProperty("audioContent")) { + if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -13630,13 +14070,15 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest(); if (object.streamingConfig != null) { - if (typeof object.streamingConfig !== "object") + if (!$util.isObject(object.streamingConfig)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -13657,16 +14099,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options) { + StreamingRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.toObject(message.streamingConfig, options); + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); if (options.oneofs) object.streamingRequest = "streamingConfig"; } - if (message.audioContent != null && message.hasOwnProperty("audioContent")) { + if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { object.audioContent = options.bytes === String ? $util.base64.encode(message.audioContent, 0, message.audioContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.audioContent) : message.audioContent; if (options.oneofs) object.streamingRequest = "audioContent"; @@ -13792,11 +14238,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer) { + StreamingRecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) @@ -13804,7 +14254,7 @@ if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -13818,7 +14268,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -13904,21 +14354,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) if (typeof message.singleUtterance !== "boolean") return "singleUtterance: boolean expected"; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { var error = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; @@ -13937,13 +14387,15 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } @@ -13954,7 +14406,7 @@ if (object.enableVoiceActivityEvents != null) message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); if (object.voiceActivityTimeout != null) { - if (typeof object.voiceActivityTimeout !== "object") + if (!$util.isObject(object.voiceActivityTimeout)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -13970,9 +14422,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options) { + StreamingRecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; @@ -13981,16 +14437,16 @@ object.enableVoiceActivityEvents = false; object.voiceActivityTimeout = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); - if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) object.singleUtterance = message.singleUtterance; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) object.interimResults = message.interimResults; - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); return object; }; @@ -14082,13 +14538,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer) { + VoiceActivityTimeout.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -14102,7 +14562,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14176,12 +14636,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -14200,18 +14660,20 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (typeof object.speechStartTimeout !== "object") + if (!$util.isObject(object.speechStartTimeout)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (typeof object.speechEndTimeout !== "object") + if (!$util.isObject(object.speechEndTimeout)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -14227,18 +14689,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options) { + VoiceActivityTimeout.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); return object; }; @@ -14518,9 +14984,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer) { + RecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -14533,13 +15003,13 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.profanityFilter); if (message.speechContexts != null && message.speechContexts.length) for (var i = 0; i < message.speechContexts.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.audioChannelCount); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableWordTimeOffsets); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutomaticPunctuation); if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) @@ -14558,15 +15028,15 @@ for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) writer.uint32(/* id 18, wireType 2 =*/146).string(message.alternativeLanguageCodes[i]); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); return writer; }; @@ -14580,7 +15050,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -14738,7 +15208,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -14755,42 +15225,42 @@ case 10: break; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; - if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) if (typeof message.enableSeparateRecognitionPerChannel !== "boolean") return "enableSeparateRecognitionPerChannel: boolean expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; - if (message.alternativeLanguageCodes != null && message.hasOwnProperty("alternativeLanguageCodes")) { + if (message.alternativeLanguageCodes != null && Object.hasOwnProperty.call(message, "alternativeLanguageCodes")) { if (!Array.isArray(message.alternativeLanguageCodes)) return "alternativeLanguageCodes: array expected"; for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) if (!$util.isString(message.alternativeLanguageCodes[i])) return "alternativeLanguageCodes: string[] expected"; } - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.adaptation != null && message.hasOwnProperty("adaptation")) { + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.speechContexts != null && message.hasOwnProperty("speechContexts")) { + if (message.speechContexts != null && Object.hasOwnProperty.call(message, "speechContexts")) { if (!Array.isArray(message.speechContexts)) return "speechContexts: array expected"; for (var i = 0; i < message.speechContexts.length; ++i) { @@ -14799,45 +15269,45 @@ return "speechContexts." + error; } } - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) { + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenPunctuation, long + 1); if (error) return "enableSpokenPunctuation." + error; } - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) { + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenEmojis, long + 1); if (error) return "enableSpokenEmojis." + error; } - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.diarizationSpeakerCount != null && message.hasOwnProperty("diarizationSpeakerCount")) + if (message.diarizationSpeakerCount != null && Object.hasOwnProperty.call(message, "diarizationSpeakerCount")) if (!$util.isInteger(message.diarizationSpeakerCount)) return "diarizationSpeakerCount: integer expected"; - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { var error = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) + if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) if (typeof message.useEnhanced !== "boolean") return "useEnhanced: boolean expected"; return null; @@ -14854,6 +15324,8 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -14931,12 +15403,12 @@ if (object.profanityFilter != null) message.profanityFilter = Boolean(object.profanityFilter); if (object.adaptation != null) { - if (typeof object.adaptation !== "object") + if (!$util.isObject(object.adaptation)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (typeof object.transcriptNormalization !== "object") + if (!$util.isObject(object.transcriptNormalization)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } @@ -14945,7 +15417,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.speechContexts: array expected"); message.speechContexts = []; for (var i = 0; i < object.speechContexts.length; ++i) { - if (typeof object.speechContexts[i] !== "object") + if (!$util.isObject(object.speechContexts[i])) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.speechContexts: object expected"); message.speechContexts[i] = $root.google.cloud.speech.v1p1beta1.SpeechContext.fromObject(object.speechContexts[i], long + 1); } @@ -14957,12 +15429,12 @@ if (object.enableAutomaticPunctuation != null) message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); if (object.enableSpokenPunctuation != null) { - if (typeof object.enableSpokenPunctuation !== "object") + if (!$util.isObject(object.enableSpokenPunctuation)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.enableSpokenPunctuation: object expected"); message.enableSpokenPunctuation = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenPunctuation, long + 1); } if (object.enableSpokenEmojis != null) { - if (typeof object.enableSpokenEmojis !== "object") + if (!$util.isObject(object.enableSpokenEmojis)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.enableSpokenEmojis: object expected"); message.enableSpokenEmojis = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenEmojis, long + 1); } @@ -14971,12 +15443,12 @@ if (object.diarizationSpeakerCount != null) message.diarizationSpeakerCount = object.diarizationSpeakerCount | 0; if (object.diarizationConfig != null) { - if (typeof object.diarizationConfig !== "object") + if (!$util.isObject(object.diarizationConfig)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.metadata: object expected"); message.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.fromObject(object.metadata, long + 1); } @@ -14996,9 +15468,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options) { + RecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.speechContexts = []; @@ -15026,56 +15502,56 @@ object.enableSpokenEmojis = null; object.transcriptNormalization = null; } - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) object.profanityFilter = message.profanityFilter; if (message.speechContexts && message.speechContexts.length) { object.speechContexts = []; for (var j = 0; j < message.speechContexts.length; ++j) - object.speechContexts[j] = $root.google.cloud.speech.v1p1beta1.SpeechContext.toObject(message.speechContexts[j], options); + object.speechContexts[j] = $root.google.cloud.speech.v1p1beta1.SpeechContext.toObject(message.speechContexts[j], options, q + 1); } - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) object.audioChannelCount = message.audioChannelCount; - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.toObject(message.metadata, options); - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.toObject(message.metadata, options, q + 1); + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) object.enableSeparateRecognitionPerChannel = message.enableSeparateRecognitionPerChannel; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; - if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) + if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) object.useEnhanced = message.useEnhanced; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.diarizationSpeakerCount != null && message.hasOwnProperty("diarizationSpeakerCount")) + if (message.diarizationSpeakerCount != null && Object.hasOwnProperty.call(message, "diarizationSpeakerCount")) object.diarizationSpeakerCount = message.diarizationSpeakerCount; if (message.alternativeLanguageCodes && message.alternativeLanguageCodes.length) { object.alternativeLanguageCodes = []; for (var j = 0; j < message.alternativeLanguageCodes.length; ++j) object.alternativeLanguageCodes[j] = message.alternativeLanguageCodes[j]; } - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); - if (message.adaptation != null && message.hasOwnProperty("adaptation")) - object.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.toObject(message.adaptation, options); - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) - object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options); - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) - object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options); - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.toObject(message.transcriptNormalization, options); + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) + object.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.toObject(message.adaptation, options, q + 1); + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) + object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options, q + 1); + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) + object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options, q + 1); + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); return object; }; @@ -15220,9 +15696,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer) { + SpeakerDiarizationConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeakerDiarization); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) @@ -15244,7 +15724,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15326,16 +15806,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; return null; @@ -15352,6 +15832,8 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15377,9 +15859,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options) { + SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableSpeakerDiarization = false; @@ -15387,13 +15873,13 @@ object.maxSpeakerCount = 0; object.speakerTag = 0; } - if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) object.speakerTag = message.speakerTag; return object; }; @@ -15552,9 +16038,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionMetadata.encode = function encode(message, writer) { + RecognitionMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.interactionType); if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) @@ -15586,7 +16076,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -15688,7 +16178,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.interactionType != null && message.hasOwnProperty("interactionType")) + if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) switch (message.interactionType) { default: return "interactionType: enum value expected"; @@ -15703,10 +16193,10 @@ case 8: break; } - if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) if (!$util.isInteger(message.industryNaicsCodeOfAudio)) return "industryNaicsCodeOfAudio: integer expected"; - if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) + if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) switch (message.microphoneDistance) { default: return "microphoneDistance: enum value expected"; @@ -15716,7 +16206,7 @@ case 3: break; } - if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) + if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) switch (message.originalMediaType) { default: return "originalMediaType: enum value expected"; @@ -15725,7 +16215,7 @@ case 2: break; } - if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) + if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) switch (message.recordingDeviceType) { default: return "recordingDeviceType: enum value expected"; @@ -15738,16 +16228,16 @@ case 6: break; } - if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) + if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) if (!$util.isString(message.recordingDeviceName)) return "recordingDeviceName: string expected"; - if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) + if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) if (!$util.isString(message.originalMimeType)) return "originalMimeType: string expected"; - if (message.obfuscatedId != null && message.hasOwnProperty("obfuscatedId")) + if (message.obfuscatedId != null && Object.hasOwnProperty.call(message, "obfuscatedId")) if (!$util.isInteger(message.obfuscatedId) && !(message.obfuscatedId && $util.isInteger(message.obfuscatedId.low) && $util.isInteger(message.obfuscatedId.high))) return "obfuscatedId: integer|Long expected"; - if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) + if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) if (!$util.isString(message.audioTopic)) return "audioTopic: string expected"; return null; @@ -15764,6 +16254,8 @@ RecognitionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15901,7 +16393,7 @@ message.originalMimeType = String(object.originalMimeType); if (object.obfuscatedId != null) if ($util.Long) - (message.obfuscatedId = $util.Long.fromValue(object.obfuscatedId)).unsigned = false; + message.obfuscatedId = $util.Long.fromValue(object.obfuscatedId, false); else if (typeof object.obfuscatedId === "string") message.obfuscatedId = parseInt(object.obfuscatedId, 10); else if (typeof object.obfuscatedId === "number") @@ -15922,9 +16414,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionMetadata.toObject = function toObject(message, options) { + RecognitionMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interactionType = options.enums === String ? "INTERACTION_TYPE_UNSPECIFIED" : 0; @@ -15936,31 +16432,33 @@ object.originalMimeType = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.obfuscatedId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.obfuscatedId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.obfuscatedId = options.longs === String ? "0" : 0; + object.obfuscatedId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.audioTopic = ""; } - if (message.interactionType != null && message.hasOwnProperty("interactionType")) + if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) object.interactionType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType[message.interactionType] === undefined ? message.interactionType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType[message.interactionType] : message.interactionType; - if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) object.industryNaicsCodeOfAudio = message.industryNaicsCodeOfAudio; - if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) + if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) object.microphoneDistance = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] === undefined ? message.microphoneDistance : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] : message.microphoneDistance; - if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) + if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) object.originalMediaType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] === undefined ? message.originalMediaType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] : message.originalMediaType; - if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) + if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) object.recordingDeviceType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] === undefined ? message.recordingDeviceType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] : message.recordingDeviceType; - if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) + if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) object.recordingDeviceName = message.recordingDeviceName; - if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) + if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) object.originalMimeType = message.originalMimeType; - if (message.obfuscatedId != null && message.hasOwnProperty("obfuscatedId")) - if (typeof message.obfuscatedId === "number") + if (message.obfuscatedId != null && Object.hasOwnProperty.call(message, "obfuscatedId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.obfuscatedId = typeof message.obfuscatedId === "number" ? BigInt(message.obfuscatedId) : $util.Long.fromBits(message.obfuscatedId.low >>> 0, message.obfuscatedId.high >>> 0, false).toBigInt(); + else if (typeof message.obfuscatedId === "number") object.obfuscatedId = options.longs === String ? String(message.obfuscatedId) : message.obfuscatedId; else object.obfuscatedId = options.longs === String ? $util.Long.prototype.toString.call(message.obfuscatedId) : options.longs === Number ? new $util.LongBits(message.obfuscatedId.low >>> 0, message.obfuscatedId.high >>> 0).toNumber() : message.obfuscatedId; - if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) + if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) object.audioTopic = message.audioTopic; return object; }; @@ -16143,9 +16641,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechContext.encode = function encode(message, writer) { + SpeechContext.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); @@ -16164,7 +16666,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16240,14 +16742,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) if (!$util.isString(message.phrases[i])) return "phrases: string[] expected"; } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -16264,6 +16766,8 @@ SpeechContext.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechContext) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechContext: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16290,9 +16794,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechContext.toObject = function toObject(message, options) { + SpeechContext.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -16303,7 +16811,7 @@ for (var j = 0; j < message.phrases.length; ++j) object.phrases[j] = message.phrases[j]; } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -16413,9 +16921,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionAudio.encode = function encode(message, writer) { + RecognitionAudio.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) @@ -16433,7 +16945,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16508,12 +17020,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -16534,6 +17046,8 @@ RecognitionAudio.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionAudio) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionAudio: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16558,16 +17072,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionAudio.toObject = function toObject(message, options) { + RecognitionAudio.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; @@ -16694,16 +17212,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer) { + RecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.requestId); if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) @@ -16721,7 +17243,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -16809,7 +17331,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -16818,20 +17340,20 @@ return "results." + error; } } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; - if (message.usingLegacyModels != null && message.hasOwnProperty("usingLegacyModels")) + if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) if (typeof message.usingLegacyModels !== "boolean") return "usingLegacyModels: boolean expected"; return null; @@ -16848,6 +17370,8 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16858,24 +17382,24 @@ throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -16896,9 +17420,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options) { + RecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -16907,26 +17435,28 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.usingLegacyModels = false; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options); - } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + } + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; - if (message.usingLegacyModels != null && message.hasOwnProperty("usingLegacyModels")) + if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) object.usingLegacyModels = message.usingLegacyModels; return object; }; @@ -17059,20 +17589,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeResponse.encode = function encode(message, writer) { + LongRunningRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.requestId); return writer; @@ -17088,7 +17622,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17180,7 +17714,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -17189,27 +17723,27 @@ return "results." + error; } } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; } - if (message.outputError != null && message.hasOwnProperty("outputError")) { + if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) { var error = $root.google.rpc.Status.verify(message.outputError, long + 1); if (error) return "outputError." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -17226,6 +17760,8 @@ LongRunningRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17236,34 +17772,34 @@ throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") + if (!$util.isObject(object.outputConfig)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } if (object.outputError != null) { - if (typeof object.outputError !== "object") + if (!$util.isObject(object.outputError)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.outputError: object expected"); message.outputError = $root.google.rpc.Status.fromObject(object.outputError, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -17282,9 +17818,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeResponse.toObject = function toObject(message, options) { + LongRunningRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -17295,25 +17835,27 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options); - } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); - if (message.outputError != null && message.hasOwnProperty("outputError")) - object.outputError = $root.google.rpc.Status.toObject(message.outputError, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + } + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); + if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) + object.outputError = $root.google.rpc.Status.toObject(message.outputError, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -17438,19 +17980,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeMetadata.encode = function encode(message, writer) { + LongRunningRecognizeMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -17464,7 +18010,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17550,23 +18096,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime, long + 1); if (error) return "lastUpdateTime." + error; } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -17585,6 +18131,8 @@ LongRunningRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17593,19 +18141,19 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") + if (!$util.isObject(object.lastUpdateTime)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime, long + 1); } if (object.uri != null) message.uri = String(object.uri); if (object.outputConfig != null) { - if (typeof object.outputConfig !== "object") + if (!$util.isObject(object.outputConfig)) throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -17621,9 +18169,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeMetadata.toObject = function toObject(message, options) { + LongRunningRecognizeMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; @@ -17632,16 +18184,16 @@ object.uri = ""; object.outputConfig = null; } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) object.progressPercent = message.progressPercent; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options, q + 1); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; - if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); return object; }; @@ -17782,22 +18334,26 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer) { + StreamingRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 10, wireType 0 =*/80).int64(message.requestId); return writer; @@ -17813,7 +18369,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -17909,12 +18465,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -17923,7 +18479,7 @@ return "results." + error; } } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -17934,22 +18490,22 @@ case 4: break; } - if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) { var error = $root.google.protobuf.Duration.verify(message.speechEventTime, long + 1); if (error) return "speechEventTime." + error; } - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -17966,13 +18522,15 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse(); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -17981,7 +18539,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -18015,23 +18573,23 @@ break; } if (object.speechEventTime != null) { - if (typeof object.speechEventTime !== "object") + if (!$util.isObject(object.speechEventTime)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.speechEventTime: object expected"); message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime, long + 1); } if (object.totalBilledTime != null) { - if (typeof object.totalBilledTime !== "object") + if (!$util.isObject(object.totalBilledTime)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (typeof object.speechAdaptationInfo !== "object") + if (!$util.isObject(object.speechAdaptationInfo)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; + message.requestId = $util.Long.fromValue(object.requestId, false); else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -18050,9 +18608,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options) { + StreamingRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -18064,27 +18626,29 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.requestId = options.longs === String ? "0" : 0; + object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; } - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); - if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) - object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); - if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (typeof message.requestId === "number") + if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); + if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options, q + 1); + if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); + else if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -18239,18 +18803,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -18268,7 +18836,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -18360,7 +18928,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -18369,21 +18937,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -18400,6 +18968,8 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18410,7 +18980,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -18420,7 +18990,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndTime != null) { - if (typeof object.resultEndTime !== "object") + if (!$util.isObject(object.resultEndTime)) throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -18440,9 +19010,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -18456,17 +19030,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -18581,16 +19155,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer) { + SpeechRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -18606,7 +19184,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -18690,7 +19268,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -18699,15 +19277,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -18724,6 +19302,8 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18734,7 +19314,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -18742,7 +19322,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndTime != null) { - if (typeof object.resultEndTime !== "object") + if (!$util.isObject(object.resultEndTime)) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -18760,9 +19340,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options) { + SpeechRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -18774,13 +19358,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -18886,16 +19470,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer) { + SpeechRecognitionAlternative.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v1p1beta1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -18909,7 +19497,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -18989,13 +19577,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && message.hasOwnProperty("words")) { + if (message.words != null && Object.hasOwnProperty.call(message, "words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -19018,6 +19606,8 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19032,7 +19622,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (typeof object.words[i] !== "object") + if (!$util.isObject(object.words[i])) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v1p1beta1.WordInfo.fromObject(object.words[i], long + 1); } @@ -19049,9 +19639,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options) { + SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -19059,14 +19653,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) object.transcript = message.transcript; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v1p1beta1.WordInfo.toObject(message.words[j], options); + object.words[j] = $root.google.cloud.speech.v1p1beta1.WordInfo.toObject(message.words[j], options, q + 1); } return object; }; @@ -19198,13 +19792,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer) { + WordInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -19226,7 +19824,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19316,26 +19914,26 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { var error = $root.google.protobuf.Duration.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { var error = $root.google.protobuf.Duration.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.word != null && message.hasOwnProperty("word")) + if (message.word != null && Object.hasOwnProperty.call(message, "word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -19352,18 +19950,20 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.WordInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.WordInfo(); if (object.startTime != null) { - if (typeof object.startTime !== "object") + if (!$util.isObject(object.startTime)) throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo.startTime: object expected"); message.startTime = $root.google.protobuf.Duration.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (typeof object.endTime !== "object") + if (!$util.isObject(object.endTime)) throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo.endTime: object expected"); message.endTime = $root.google.protobuf.Duration.fromObject(object.endTime, long + 1); } @@ -19387,9 +19987,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options) { + WordInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startTime = null; @@ -19399,17 +20003,17 @@ object.speakerTag = 0; object.speakerLabel = ""; } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options); - if (message.word != null && message.hasOwnProperty("word")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options, q + 1); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options, q + 1); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) + if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) object.speakerTag = message.speakerTag; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -19505,9 +20109,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptationInfo.encode = function encode(message, writer) { + SpeechAdaptationInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.adaptationTimeout); if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) @@ -19525,7 +20133,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -19599,10 +20207,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) + if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) if (typeof message.adaptationTimeout !== "boolean") return "adaptationTimeout: boolean expected"; - if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) + if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) if (!$util.isString(message.timeoutMessage)) return "timeoutMessage: string expected"; return null; @@ -19619,6 +20227,8 @@ SpeechAdaptationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19640,17 +20250,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptationInfo.toObject = function toObject(message, options) { + SpeechAdaptationInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.adaptationTimeout = false; object.timeoutMessage = ""; } - if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) + if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) object.adaptationTimeout = message.adaptationTimeout; - if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) + if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) object.timeoutMessage = message.timeoutMessage; return object; }; @@ -19847,16 +20461,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer) { + CustomClass.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) @@ -19868,9 +20486,9 @@ if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -19891,7 +20509,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20032,13 +20650,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.items != null && message.hasOwnProperty("items")) { + if (message.items != null && Object.hasOwnProperty.call(message, "items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -20047,19 +20665,19 @@ return "items." + error; } } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -20068,17 +20686,17 @@ case 4: break; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -20086,10 +20704,10 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; return null; @@ -20106,6 +20724,8 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CustomClass) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20120,7 +20740,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") + if (!$util.isObject(object.items[i])) throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -20154,17 +20774,17 @@ break; } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (typeof object.annotations !== "object") + if (!$util.isObject(object.annotations)) throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -20189,9 +20809,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options) { + CustomClass.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -20210,29 +20834,29 @@ object.etag = ""; object.reconciling = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) object.customClassId = message.customClassId; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.toObject(message.items[j], options); + object.items[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.cloud.speech.v1p1beta1.CustomClass.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v1p1beta1.CustomClass.State[message.state] : message.state; - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -20242,9 +20866,9 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) object.reconciling = message.reconciling; return object; }; @@ -20328,9 +20952,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer) { + ClassItem.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -20346,7 +20974,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20416,7 +21044,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -20433,6 +21061,8 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20452,13 +21082,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options) { + ClassItem.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -20674,14 +21308,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer) { + PhraseSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) @@ -20695,9 +21333,9 @@ if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.state); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -20718,7 +21356,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -20859,10 +21497,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -20871,22 +21509,22 @@ return "phrases." + error; } } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -20895,17 +21533,17 @@ case 4: break; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -20913,10 +21551,10 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; return null; @@ -20933,6 +21571,8 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.PhraseSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20945,7 +21585,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (typeof object.phrases[i] !== "object") + if (!$util.isObject(object.phrases[i])) throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -20981,17 +21621,17 @@ break; } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (typeof object.annotations !== "object") + if (!$util.isObject(object.annotations)) throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -21016,9 +21656,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options) { + PhraseSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -21037,29 +21681,29 @@ object.etag = ""; object.reconciling = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.toObject(message.phrases[j], options); + object.phrases[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.cloud.speech.v1p1beta1.PhraseSet.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v1p1beta1.PhraseSet.State[message.state] : message.state; - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -21069,9 +21713,9 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) object.reconciling = message.reconciling; return object; }; @@ -21164,9 +21808,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer) { + Phrase.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -21184,7 +21832,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21258,10 +21906,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -21278,6 +21926,8 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21299,17 +21949,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options) { + Phrase.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -21445,20 +22099,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer) { + SpeechAdaptation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.phraseSetReferences != null && message.phraseSetReferences.length) for (var i = 0; i < message.phraseSetReferences.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetReferences[i]); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -21472,7 +22130,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21560,7 +22218,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -21569,14 +22227,14 @@ return "phraseSets." + error; } } - if (message.phraseSetReferences != null && message.hasOwnProperty("phraseSetReferences")) { + if (message.phraseSetReferences != null && Object.hasOwnProperty.call(message, "phraseSetReferences")) { if (!Array.isArray(message.phraseSetReferences)) return "phraseSetReferences: array expected"; for (var i = 0; i < message.phraseSetReferences.length; ++i) if (!$util.isString(message.phraseSetReferences[i])) return "phraseSetReferences: string[] expected"; } - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -21585,7 +22243,7 @@ return "customClasses." + error; } } - if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) { + if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.verify(message.abnfGrammar, long + 1); if (error) return "abnfGrammar." + error; @@ -21604,6 +22262,8 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21614,7 +22274,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -21631,13 +22291,13 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClasses[i], long + 1); } } if (object.abnfGrammar != null) { - if (typeof object.abnfGrammar !== "object") + if (!$util.isObject(object.abnfGrammar)) throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.abnfGrammar: object expected"); message.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.fromObject(object.abnfGrammar, long + 1); } @@ -21653,9 +22313,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options) { + SpeechAdaptation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -21667,7 +22331,7 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); } if (message.phraseSetReferences && message.phraseSetReferences.length) { object.phraseSetReferences = []; @@ -21677,10 +22341,10 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options, q + 1); } - if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) - object.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options); + if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) + object.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options, q + 1); return object; }; @@ -21764,9 +22428,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ABNFGrammar.encode = function encode(message, writer) { + ABNFGrammar.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.abnfStrings != null && message.abnfStrings.length) for (var i = 0; i < message.abnfStrings.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.abnfStrings[i]); @@ -21783,7 +22451,7 @@ * @returns {$protobuf.Writer} Writer */ ABNFGrammar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -21855,7 +22523,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.abnfStrings != null && message.hasOwnProperty("abnfStrings")) { + if (message.abnfStrings != null && Object.hasOwnProperty.call(message, "abnfStrings")) { if (!Array.isArray(message.abnfStrings)) return "abnfStrings: array expected"; for (var i = 0; i < message.abnfStrings.length; ++i) @@ -21876,6 +22544,8 @@ ABNFGrammar.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21900,9 +22570,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ABNFGrammar.toObject = function toObject(message, options) { + ABNFGrammar.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.abnfStrings = []; @@ -22000,12 +22674,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer) { + TranscriptNormalization.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -22019,7 +22697,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22091,7 +22769,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && message.hasOwnProperty("entries")) { + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -22114,6 +22792,8 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptNormalization) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22124,7 +22804,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") + if (!$util.isObject(object.entries[i])) throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -22141,16 +22821,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options) { + TranscriptNormalization.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); } return object; }; @@ -22252,9 +22936,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -22274,7 +22962,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22352,13 +23040,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -22375,6 +23063,8 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22398,20 +23088,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) object.search = message.search; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) object.replace = message.replace; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -22500,7 +23194,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -22533,7 +23227,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -22566,7 +23260,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listPhraseSet = function listPhraseSet(request, callback) { - return this.rpcCall(listPhraseSet, $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSet, $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse, request, callback); }, "name", { value: "ListPhraseSet" }); /** @@ -22599,7 +23293,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -22632,7 +23326,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -22665,7 +23359,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createCustomClass = function createCustomClass(request, callback) { - return this.rpcCall(createCustomClass, $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -22698,7 +23392,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getCustomClass = function getCustomClass(request, callback) { - return this.rpcCall(getCustomClass, $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -22731,7 +23425,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest, $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest, $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -22764,7 +23458,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -22797,7 +23491,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -22884,15 +23578,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer) { + CreatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetId); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -22906,7 +23604,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -22984,13 +23682,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v1p1beta1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; @@ -23009,6 +23707,8 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23019,7 +23719,7 @@ if (object.phraseSetId != null) message.phraseSetId = String(object.phraseSetId); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v1p1beta1.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -23035,21 +23735,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options) { + CreatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.phraseSetId = ""; object.phraseSet = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options); + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options, q + 1); return object; }; @@ -23144,13 +23848,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer) { + UpdatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -23164,7 +23872,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23238,12 +23946,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v1p1beta1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -23262,18 +23970,20 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -23289,18 +23999,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options) { + UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; } - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -23386,9 +24100,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer) { + GetPhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -23404,7 +24122,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23474,7 +24192,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -23491,6 +24209,8 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23510,13 +24230,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options) { + GetPhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -23621,9 +24345,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetRequest.encode = function encode(message, writer) { + ListPhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -23643,7 +24371,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23721,13 +24449,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -23744,6 +24472,8 @@ ListPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23767,20 +24497,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetRequest.toObject = function toObject(message, options) { + ListPhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -23877,12 +24611,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetResponse.encode = function encode(message, writer) { + ListPhraseSetResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -23898,7 +24636,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -23974,7 +24712,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -23983,7 +24721,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -24000,6 +24738,8 @@ ListPhraseSetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24010,7 +24750,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -24029,9 +24769,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetResponse.toObject = function toObject(message, options) { + ListPhraseSetResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -24040,9 +24784,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -24129,9 +24873,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer) { + DeletePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -24147,7 +24895,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24217,7 +24965,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -24234,6 +24982,8 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24253,13 +25003,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options) { + DeletePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -24364,15 +25118,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer) { + CreateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -24386,7 +25144,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24464,13 +25222,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v1p1beta1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; @@ -24489,6 +25247,8 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24499,7 +25259,7 @@ if (object.customClassId != null) message.customClassId = String(object.customClassId); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v1p1beta1.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClass, long + 1); } @@ -24515,21 +25275,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options) { + CreateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.customClassId = ""; object.customClass = null; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) object.customClassId = message.customClassId; - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options); + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options, q + 1); return object; }; @@ -24624,13 +25388,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer) { + UpdateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -24644,7 +25412,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24718,12 +25486,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v1p1beta1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -24742,18 +25510,20 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest(); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -24769,18 +25539,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options) { + UpdateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; } - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -24866,9 +25640,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer) { + GetCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -24884,7 +25662,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -24954,7 +25732,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -24971,6 +25749,8 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24990,13 +25770,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options) { + GetCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -25101,9 +25885,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer) { + ListCustomClassesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -25123,7 +25911,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25201,13 +25989,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -25224,6 +26012,8 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25247,20 +26037,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options) { + ListCustomClassesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; return object; }; @@ -25357,12 +26151,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer) { + ListCustomClassesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -25378,7 +26176,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25454,7 +26252,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -25463,7 +26261,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -25480,6 +26278,8 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25490,7 +26290,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -25509,9 +26309,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options) { + ListCustomClassesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -25520,9 +26324,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -25609,9 +26413,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer) { + DeleteCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -25627,7 +26435,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -25697,7 +26505,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -25714,6 +26522,8 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v1p1beta1.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25733,13 +26543,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options) { + DeleteCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -25837,7 +26651,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createRecognizer = function createRecognizer(request, callback) { - return this.rpcCall(createRecognizer, $root.google.cloud.speech.v2.CreateRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createRecognizer, $root.google.cloud.speech.v2.CreateRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateRecognizer" }); /** @@ -25870,7 +26684,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listRecognizers = function listRecognizers(request, callback) { - return this.rpcCall(listRecognizers, $root.google.cloud.speech.v2.ListRecognizersRequest, $root.google.cloud.speech.v2.ListRecognizersResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listRecognizers, $root.google.cloud.speech.v2.ListRecognizersRequest, $root.google.cloud.speech.v2.ListRecognizersResponse, request, callback); }, "name", { value: "ListRecognizers" }); /** @@ -25903,7 +26717,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getRecognizer = function getRecognizer(request, callback) { - return this.rpcCall(getRecognizer, $root.google.cloud.speech.v2.GetRecognizerRequest, $root.google.cloud.speech.v2.Recognizer, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getRecognizer, $root.google.cloud.speech.v2.GetRecognizerRequest, $root.google.cloud.speech.v2.Recognizer, request, callback); }, "name", { value: "GetRecognizer" }); /** @@ -25936,7 +26750,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateRecognizer = function updateRecognizer(request, callback) { - return this.rpcCall(updateRecognizer, $root.google.cloud.speech.v2.UpdateRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateRecognizer, $root.google.cloud.speech.v2.UpdateRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateRecognizer" }); /** @@ -25969,7 +26783,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deleteRecognizer = function deleteRecognizer(request, callback) { - return this.rpcCall(deleteRecognizer, $root.google.cloud.speech.v2.DeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteRecognizer, $root.google.cloud.speech.v2.DeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteRecognizer" }); /** @@ -26002,7 +26816,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeleteRecognizer = function undeleteRecognizer(request, callback) { - return this.rpcCall(undeleteRecognizer, $root.google.cloud.speech.v2.UndeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteRecognizer, $root.google.cloud.speech.v2.UndeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeleteRecognizer" }); /** @@ -26035,7 +26849,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return this.rpcCall(recognize, $root.google.cloud.speech.v2.RecognizeRequest, $root.google.cloud.speech.v2.RecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v2.RecognizeRequest, $root.google.cloud.speech.v2.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -26068,7 +26882,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v2.StreamingRecognizeRequest, $root.google.cloud.speech.v2.StreamingRecognizeResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v2.StreamingRecognizeRequest, $root.google.cloud.speech.v2.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -26101,7 +26915,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.batchRecognize = function batchRecognize(request, callback) { - return this.rpcCall(batchRecognize, $root.google.cloud.speech.v2.BatchRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, batchRecognize, $root.google.cloud.speech.v2.BatchRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "BatchRecognize" }); /** @@ -26134,7 +26948,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getConfig = function getConfig(request, callback) { - return this.rpcCall(getConfig, $root.google.cloud.speech.v2.GetConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getConfig, $root.google.cloud.speech.v2.GetConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); }, "name", { value: "GetConfig" }); /** @@ -26167,7 +26981,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateConfig = function updateConfig(request, callback) { - return this.rpcCall(updateConfig, $root.google.cloud.speech.v2.UpdateConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateConfig, $root.google.cloud.speech.v2.UpdateConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); }, "name", { value: "UpdateConfig" }); /** @@ -26200,7 +27014,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createCustomClass = function createCustomClass(request, callback) { - return this.rpcCall(createCustomClass, $root.google.cloud.speech.v2.CreateCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v2.CreateCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -26233,7 +27047,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v2.ListCustomClassesRequest, $root.google.cloud.speech.v2.ListCustomClassesResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v2.ListCustomClassesRequest, $root.google.cloud.speech.v2.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -26266,7 +27080,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getCustomClass = function getCustomClass(request, callback) { - return this.rpcCall(getCustomClass, $root.google.cloud.speech.v2.GetCustomClassRequest, $root.google.cloud.speech.v2.CustomClass, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v2.GetCustomClassRequest, $root.google.cloud.speech.v2.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -26299,7 +27113,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v2.UpdateCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v2.UpdateCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -26332,7 +27146,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v2.DeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v2.DeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -26365,7 +27179,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeleteCustomClass = function undeleteCustomClass(request, callback) { - return this.rpcCall(undeleteCustomClass, $root.google.cloud.speech.v2.UndeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteCustomClass, $root.google.cloud.speech.v2.UndeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeleteCustomClass" }); /** @@ -26398,7 +27212,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v2.CreatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v2.CreatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -26431,7 +27245,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listPhraseSets = function listPhraseSets(request, callback) { - return this.rpcCall(listPhraseSets, $root.google.cloud.speech.v2.ListPhraseSetsRequest, $root.google.cloud.speech.v2.ListPhraseSetsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSets, $root.google.cloud.speech.v2.ListPhraseSetsRequest, $root.google.cloud.speech.v2.ListPhraseSetsResponse, request, callback); }, "name", { value: "ListPhraseSets" }); /** @@ -26464,7 +27278,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v2.GetPhraseSetRequest, $root.google.cloud.speech.v2.PhraseSet, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v2.GetPhraseSetRequest, $root.google.cloud.speech.v2.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -26497,7 +27311,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v2.UpdatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v2.UpdatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -26530,7 +27344,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v2.DeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v2.DeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -26563,7 +27377,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeletePhraseSet = function undeletePhraseSet(request, callback) { - return this.rpcCall(undeletePhraseSet, $root.google.cloud.speech.v2.UndeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeletePhraseSet, $root.google.cloud.speech.v2.UndeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeletePhraseSet" }); /** @@ -26659,11 +27473,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRecognizerRequest.encode = function encode(message, writer) { + CreateRecognizerRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) @@ -26683,7 +27501,7 @@ * @returns {$protobuf.Writer} Writer */ CreateRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -26765,18 +27583,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) { + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) { var error = $root.google.cloud.speech.v2.Recognizer.verify(message.recognizer, long + 1); if (error) return "recognizer." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.recognizerId != null && message.hasOwnProperty("recognizerId")) + if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) if (!$util.isString(message.recognizerId)) return "recognizerId: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -26793,13 +27611,15 @@ CreateRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreateRecognizerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CreateRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreateRecognizerRequest(); if (object.recognizer != null) { - if (typeof object.recognizer !== "object") + if (!$util.isObject(object.recognizer)) throw TypeError(".google.cloud.speech.v2.CreateRecognizerRequest.recognizer: object expected"); message.recognizer = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizer, long + 1); } @@ -26821,9 +27641,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateRecognizerRequest.toObject = function toObject(message, options) { + CreateRecognizerRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.recognizer = null; @@ -26831,13 +27655,13 @@ object.recognizerId = ""; object.parent = ""; } - if (message.recognizer != null && message.hasOwnProperty("recognizer")) - object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.recognizerId != null && message.hasOwnProperty("recognizerId")) + if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) object.recognizerId = message.recognizerId; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; return object; }; @@ -27138,13 +27962,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); if (message.method != null && Object.hasOwnProperty.call(message, "method")) @@ -27154,37 +27982,37 @@ if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.kmsKeyVersionName); if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) - $root.google.cloud.speech.v2.BatchRecognizeRequest.encode(message.batchRecognizeRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeRequest.encode(message.batchRecognizeRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) - $root.google.cloud.speech.v2.CreateRecognizerRequest.encode(message.createRecognizerRequest, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v2.CreateRecognizerRequest.encode(message.createRecognizerRequest, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) - $root.google.cloud.speech.v2.UpdateRecognizerRequest.encode(message.updateRecognizerRequest, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.cloud.speech.v2.UpdateRecognizerRequest.encode(message.updateRecognizerRequest, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) - $root.google.cloud.speech.v2.DeleteRecognizerRequest.encode(message.deleteRecognizerRequest, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.cloud.speech.v2.DeleteRecognizerRequest.encode(message.deleteRecognizerRequest, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) - $root.google.cloud.speech.v2.UndeleteRecognizerRequest.encode(message.undeleteRecognizerRequest, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.cloud.speech.v2.UndeleteRecognizerRequest.encode(message.undeleteRecognizerRequest, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) - $root.google.cloud.speech.v2.CreateCustomClassRequest.encode(message.createCustomClassRequest, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + $root.google.cloud.speech.v2.CreateCustomClassRequest.encode(message.createCustomClassRequest, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) - $root.google.cloud.speech.v2.UpdateCustomClassRequest.encode(message.updateCustomClassRequest, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.google.cloud.speech.v2.UpdateCustomClassRequest.encode(message.updateCustomClassRequest, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) - $root.google.cloud.speech.v2.DeleteCustomClassRequest.encode(message.deleteCustomClassRequest, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.google.cloud.speech.v2.DeleteCustomClassRequest.encode(message.deleteCustomClassRequest, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) - $root.google.cloud.speech.v2.UndeleteCustomClassRequest.encode(message.undeleteCustomClassRequest, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + $root.google.cloud.speech.v2.UndeleteCustomClassRequest.encode(message.undeleteCustomClassRequest, writer.uint32(/* id 16, wireType 2 =*/130).fork(), q + 1).ldelim(); if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) - $root.google.cloud.speech.v2.CreatePhraseSetRequest.encode(message.createPhraseSetRequest, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + $root.google.cloud.speech.v2.CreatePhraseSetRequest.encode(message.createPhraseSetRequest, writer.uint32(/* id 17, wireType 2 =*/138).fork(), q + 1).ldelim(); if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) - $root.google.cloud.speech.v2.UpdatePhraseSetRequest.encode(message.updatePhraseSetRequest, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + $root.google.cloud.speech.v2.UpdatePhraseSetRequest.encode(message.updatePhraseSetRequest, writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim(); if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) - $root.google.cloud.speech.v2.DeletePhraseSetRequest.encode(message.deletePhraseSetRequest, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + $root.google.cloud.speech.v2.DeletePhraseSetRequest.encode(message.deletePhraseSetRequest, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) - $root.google.cloud.speech.v2.UndeletePhraseSetRequest.encode(message.undeletePhraseSetRequest, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.google.cloud.speech.v2.UndeletePhraseSetRequest.encode(message.undeletePhraseSetRequest, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) - $root.google.cloud.speech.v2.UpdateConfigRequest.encode(message.updateConfigRequest, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.cloud.speech.v2.UpdateConfigRequest.encode(message.updateConfigRequest, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 22, wireType 0 =*/176).int32(message.progressPercent); if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) - $root.google.cloud.speech.v2.BatchRecognizeMetadata.encode(message.batchRecognizeMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeMetadata.encode(message.batchRecognizeMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); return writer; }; @@ -27198,7 +28026,7 @@ * @returns {$protobuf.Writer} Writer */ OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27353,29 +28181,29 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) if (!$util.isString(message.resource)) return "resource: string expected"; - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && Object.hasOwnProperty.call(message, "method")) if (!$util.isString(message.method)) return "method: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.batchRecognizeRequest != null && message.hasOwnProperty("batchRecognizeRequest")) { + if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) { properties.request = 1; { var error = $root.google.cloud.speech.v2.BatchRecognizeRequest.verify(message.batchRecognizeRequest, long + 1); @@ -27383,7 +28211,7 @@ return "batchRecognizeRequest." + error; } } - if (message.createRecognizerRequest != null && message.hasOwnProperty("createRecognizerRequest")) { + if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27393,7 +28221,7 @@ return "createRecognizerRequest." + error; } } - if (message.updateRecognizerRequest != null && message.hasOwnProperty("updateRecognizerRequest")) { + if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27403,7 +28231,7 @@ return "updateRecognizerRequest." + error; } } - if (message.deleteRecognizerRequest != null && message.hasOwnProperty("deleteRecognizerRequest")) { + if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27413,7 +28241,7 @@ return "deleteRecognizerRequest." + error; } } - if (message.undeleteRecognizerRequest != null && message.hasOwnProperty("undeleteRecognizerRequest")) { + if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27423,7 +28251,7 @@ return "undeleteRecognizerRequest." + error; } } - if (message.createCustomClassRequest != null && message.hasOwnProperty("createCustomClassRequest")) { + if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27433,7 +28261,7 @@ return "createCustomClassRequest." + error; } } - if (message.updateCustomClassRequest != null && message.hasOwnProperty("updateCustomClassRequest")) { + if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27443,7 +28271,7 @@ return "updateCustomClassRequest." + error; } } - if (message.deleteCustomClassRequest != null && message.hasOwnProperty("deleteCustomClassRequest")) { + if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27453,7 +28281,7 @@ return "deleteCustomClassRequest." + error; } } - if (message.undeleteCustomClassRequest != null && message.hasOwnProperty("undeleteCustomClassRequest")) { + if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27463,7 +28291,7 @@ return "undeleteCustomClassRequest." + error; } } - if (message.createPhraseSetRequest != null && message.hasOwnProperty("createPhraseSetRequest")) { + if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27473,7 +28301,7 @@ return "createPhraseSetRequest." + error; } } - if (message.updatePhraseSetRequest != null && message.hasOwnProperty("updatePhraseSetRequest")) { + if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27483,7 +28311,7 @@ return "updatePhraseSetRequest." + error; } } - if (message.deletePhraseSetRequest != null && message.hasOwnProperty("deletePhraseSetRequest")) { + if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27493,7 +28321,7 @@ return "deletePhraseSetRequest." + error; } } - if (message.undeletePhraseSetRequest != null && message.hasOwnProperty("undeletePhraseSetRequest")) { + if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27503,7 +28331,7 @@ return "undeletePhraseSetRequest." + error; } } - if (message.updateConfigRequest != null && message.hasOwnProperty("updateConfigRequest")) { + if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -27513,10 +28341,10 @@ return "updateConfigRequest." + error; } } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.batchRecognizeMetadata != null && message.hasOwnProperty("batchRecognizeMetadata")) { + if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) { properties.metadata = 1; { var error = $root.google.cloud.speech.v2.BatchRecognizeMetadata.verify(message.batchRecognizeMetadata, long + 1); @@ -27538,18 +28366,20 @@ OperationMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.OperationMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.OperationMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.OperationMetadata(); if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (typeof object.updateTime !== "object") + if (!$util.isObject(object.updateTime)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } @@ -27562,79 +28392,79 @@ if (object.kmsKeyVersionName != null) message.kmsKeyVersionName = String(object.kmsKeyVersionName); if (object.batchRecognizeRequest != null) { - if (typeof object.batchRecognizeRequest !== "object") + if (!$util.isObject(object.batchRecognizeRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.batchRecognizeRequest: object expected"); message.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.fromObject(object.batchRecognizeRequest, long + 1); } if (object.createRecognizerRequest != null) { - if (typeof object.createRecognizerRequest !== "object") + if (!$util.isObject(object.createRecognizerRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.createRecognizerRequest: object expected"); message.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.fromObject(object.createRecognizerRequest, long + 1); } if (object.updateRecognizerRequest != null) { - if (typeof object.updateRecognizerRequest !== "object") + if (!$util.isObject(object.updateRecognizerRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateRecognizerRequest: object expected"); message.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.fromObject(object.updateRecognizerRequest, long + 1); } if (object.deleteRecognizerRequest != null) { - if (typeof object.deleteRecognizerRequest !== "object") + if (!$util.isObject(object.deleteRecognizerRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.deleteRecognizerRequest: object expected"); message.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.fromObject(object.deleteRecognizerRequest, long + 1); } if (object.undeleteRecognizerRequest != null) { - if (typeof object.undeleteRecognizerRequest !== "object") + if (!$util.isObject(object.undeleteRecognizerRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeleteRecognizerRequest: object expected"); message.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.fromObject(object.undeleteRecognizerRequest, long + 1); } if (object.createCustomClassRequest != null) { - if (typeof object.createCustomClassRequest !== "object") + if (!$util.isObject(object.createCustomClassRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.createCustomClassRequest: object expected"); message.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.fromObject(object.createCustomClassRequest, long + 1); } if (object.updateCustomClassRequest != null) { - if (typeof object.updateCustomClassRequest !== "object") + if (!$util.isObject(object.updateCustomClassRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateCustomClassRequest: object expected"); message.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.fromObject(object.updateCustomClassRequest, long + 1); } if (object.deleteCustomClassRequest != null) { - if (typeof object.deleteCustomClassRequest !== "object") + if (!$util.isObject(object.deleteCustomClassRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.deleteCustomClassRequest: object expected"); message.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.fromObject(object.deleteCustomClassRequest, long + 1); } if (object.undeleteCustomClassRequest != null) { - if (typeof object.undeleteCustomClassRequest !== "object") + if (!$util.isObject(object.undeleteCustomClassRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeleteCustomClassRequest: object expected"); message.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.fromObject(object.undeleteCustomClassRequest, long + 1); } if (object.createPhraseSetRequest != null) { - if (typeof object.createPhraseSetRequest !== "object") + if (!$util.isObject(object.createPhraseSetRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.createPhraseSetRequest: object expected"); message.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.fromObject(object.createPhraseSetRequest, long + 1); } if (object.updatePhraseSetRequest != null) { - if (typeof object.updatePhraseSetRequest !== "object") + if (!$util.isObject(object.updatePhraseSetRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.updatePhraseSetRequest: object expected"); message.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.fromObject(object.updatePhraseSetRequest, long + 1); } if (object.deletePhraseSetRequest != null) { - if (typeof object.deletePhraseSetRequest !== "object") + if (!$util.isObject(object.deletePhraseSetRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.deletePhraseSetRequest: object expected"); message.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.fromObject(object.deletePhraseSetRequest, long + 1); } if (object.undeletePhraseSetRequest != null) { - if (typeof object.undeletePhraseSetRequest !== "object") + if (!$util.isObject(object.undeletePhraseSetRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeletePhraseSetRequest: object expected"); message.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.fromObject(object.undeletePhraseSetRequest, long + 1); } if (object.updateConfigRequest != null) { - if (typeof object.updateConfigRequest !== "object") + if (!$util.isObject(object.updateConfigRequest)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateConfigRequest: object expected"); message.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.fromObject(object.updateConfigRequest, long + 1); } if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.batchRecognizeMetadata != null) { - if (typeof object.batchRecognizeMetadata !== "object") + if (!$util.isObject(object.batchRecognizeMetadata)) throw TypeError(".google.cloud.speech.v2.OperationMetadata.batchRecognizeMetadata: object expected"); message.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.fromObject(object.batchRecognizeMetadata, long + 1); } @@ -27650,9 +28480,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.createTime = null; @@ -27663,92 +28497,92 @@ object.kmsKeyVersionName = ""; object.progressPercent = 0; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.resource != null && message.hasOwnProperty("resource")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) object.resource = message.resource; - if (message.method != null && message.hasOwnProperty("method")) + if (message.method != null && Object.hasOwnProperty.call(message, "method")) object.method = message.method; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.batchRecognizeRequest != null && message.hasOwnProperty("batchRecognizeRequest")) { - object.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.toObject(message.batchRecognizeRequest, options); + if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) { + object.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.toObject(message.batchRecognizeRequest, options, q + 1); if (options.oneofs) object.request = "batchRecognizeRequest"; } - if (message.createRecognizerRequest != null && message.hasOwnProperty("createRecognizerRequest")) { - object.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.toObject(message.createRecognizerRequest, options); + if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) { + object.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.toObject(message.createRecognizerRequest, options, q + 1); if (options.oneofs) object.request = "createRecognizerRequest"; } - if (message.updateRecognizerRequest != null && message.hasOwnProperty("updateRecognizerRequest")) { - object.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.toObject(message.updateRecognizerRequest, options); + if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) { + object.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.toObject(message.updateRecognizerRequest, options, q + 1); if (options.oneofs) object.request = "updateRecognizerRequest"; } - if (message.deleteRecognizerRequest != null && message.hasOwnProperty("deleteRecognizerRequest")) { - object.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.toObject(message.deleteRecognizerRequest, options); + if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) { + object.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.toObject(message.deleteRecognizerRequest, options, q + 1); if (options.oneofs) object.request = "deleteRecognizerRequest"; } - if (message.undeleteRecognizerRequest != null && message.hasOwnProperty("undeleteRecognizerRequest")) { - object.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.toObject(message.undeleteRecognizerRequest, options); + if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) { + object.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.toObject(message.undeleteRecognizerRequest, options, q + 1); if (options.oneofs) object.request = "undeleteRecognizerRequest"; } - if (message.createCustomClassRequest != null && message.hasOwnProperty("createCustomClassRequest")) { - object.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.toObject(message.createCustomClassRequest, options); + if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) { + object.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.toObject(message.createCustomClassRequest, options, q + 1); if (options.oneofs) object.request = "createCustomClassRequest"; } - if (message.updateCustomClassRequest != null && message.hasOwnProperty("updateCustomClassRequest")) { - object.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.toObject(message.updateCustomClassRequest, options); + if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) { + object.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.toObject(message.updateCustomClassRequest, options, q + 1); if (options.oneofs) object.request = "updateCustomClassRequest"; } - if (message.deleteCustomClassRequest != null && message.hasOwnProperty("deleteCustomClassRequest")) { - object.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.toObject(message.deleteCustomClassRequest, options); + if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) { + object.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.toObject(message.deleteCustomClassRequest, options, q + 1); if (options.oneofs) object.request = "deleteCustomClassRequest"; } - if (message.undeleteCustomClassRequest != null && message.hasOwnProperty("undeleteCustomClassRequest")) { - object.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.toObject(message.undeleteCustomClassRequest, options); + if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) { + object.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.toObject(message.undeleteCustomClassRequest, options, q + 1); if (options.oneofs) object.request = "undeleteCustomClassRequest"; } - if (message.createPhraseSetRequest != null && message.hasOwnProperty("createPhraseSetRequest")) { - object.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.toObject(message.createPhraseSetRequest, options); + if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) { + object.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.toObject(message.createPhraseSetRequest, options, q + 1); if (options.oneofs) object.request = "createPhraseSetRequest"; } - if (message.updatePhraseSetRequest != null && message.hasOwnProperty("updatePhraseSetRequest")) { - object.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.toObject(message.updatePhraseSetRequest, options); + if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) { + object.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.toObject(message.updatePhraseSetRequest, options, q + 1); if (options.oneofs) object.request = "updatePhraseSetRequest"; } - if (message.deletePhraseSetRequest != null && message.hasOwnProperty("deletePhraseSetRequest")) { - object.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.toObject(message.deletePhraseSetRequest, options); + if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) { + object.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.toObject(message.deletePhraseSetRequest, options, q + 1); if (options.oneofs) object.request = "deletePhraseSetRequest"; } - if (message.undeletePhraseSetRequest != null && message.hasOwnProperty("undeletePhraseSetRequest")) { - object.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.toObject(message.undeletePhraseSetRequest, options); + if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) { + object.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.toObject(message.undeletePhraseSetRequest, options, q + 1); if (options.oneofs) object.request = "undeletePhraseSetRequest"; } - if (message.updateConfigRequest != null && message.hasOwnProperty("updateConfigRequest")) { - object.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.toObject(message.updateConfigRequest, options); + if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) { + object.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.toObject(message.updateConfigRequest, options, q + 1); if (options.oneofs) object.request = "updateConfigRequest"; } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) object.progressPercent = message.progressPercent; - if (message.batchRecognizeMetadata != null && message.hasOwnProperty("batchRecognizeMetadata")) { - object.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.toObject(message.batchRecognizeMetadata, options); + if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) { + object.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.toObject(message.batchRecognizeMetadata, options, q + 1); if (options.oneofs) object.metadata = "batchRecognizeMetadata"; } @@ -27864,9 +28698,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRecognizersRequest.encode = function encode(message, writer) { + ListRecognizersRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -27888,7 +28726,7 @@ * @returns {$protobuf.Writer} Writer */ ListRecognizersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -27970,16 +28808,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -27996,6 +28834,8 @@ ListRecognizersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListRecognizersRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListRecognizersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28021,9 +28861,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRecognizersRequest.toObject = function toObject(message, options) { + ListRecognizersRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -28031,13 +28875,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -28134,12 +28978,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRecognizersResponse.encode = function encode(message, writer) { + ListRecognizersResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.recognizers != null && message.recognizers.length) for (var i = 0; i < message.recognizers.length; ++i) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -28155,7 +29003,7 @@ * @returns {$protobuf.Writer} Writer */ ListRecognizersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28231,7 +29079,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizers != null && message.hasOwnProperty("recognizers")) { + if (message.recognizers != null && Object.hasOwnProperty.call(message, "recognizers")) { if (!Array.isArray(message.recognizers)) return "recognizers: array expected"; for (var i = 0; i < message.recognizers.length; ++i) { @@ -28240,7 +29088,7 @@ return "recognizers." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -28257,6 +29105,8 @@ ListRecognizersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListRecognizersResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28267,7 +29117,7 @@ throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse.recognizers: array expected"); message.recognizers = []; for (var i = 0; i < object.recognizers.length; ++i) { - if (typeof object.recognizers[i] !== "object") + if (!$util.isObject(object.recognizers[i])) throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse.recognizers: object expected"); message.recognizers[i] = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizers[i], long + 1); } @@ -28286,9 +29136,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRecognizersResponse.toObject = function toObject(message, options) { + ListRecognizersResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.recognizers = []; @@ -28297,9 +29151,9 @@ if (message.recognizers && message.recognizers.length) { object.recognizers = []; for (var j = 0; j < message.recognizers.length; ++j) - object.recognizers[j] = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizers[j], options); + object.recognizers[j] = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizers[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -28386,9 +29240,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRecognizerRequest.encode = function encode(message, writer) { + GetRecognizerRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -28404,7 +29262,7 @@ * @returns {$protobuf.Writer} Writer */ GetRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28474,7 +29332,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -28491,6 +29349,8 @@ GetRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetRecognizerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.GetRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28510,13 +29370,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRecognizerRequest.toObject = function toObject(message, options) { + GetRecognizerRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -28621,13 +29485,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateRecognizerRequest.encode = function encode(message, writer) { + UpdateRecognizerRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -28643,7 +29511,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -28721,17 +29589,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) { + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) { var error = $root.google.cloud.speech.v2.Recognizer.verify(message.recognizer, long + 1); if (error) return "recognizer." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -28748,18 +29616,20 @@ UpdateRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateRecognizerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateRecognizerRequest(); if (object.recognizer != null) { - if (typeof object.recognizer !== "object") + if (!$util.isObject(object.recognizer)) throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest.recognizer: object expected"); message.recognizer = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizer, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -28777,20 +29647,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateRecognizerRequest.toObject = function toObject(message, options) { + UpdateRecognizerRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.recognizer = null; object.updateMask = null; object.validateOnly = false; } - if (message.recognizer != null && message.hasOwnProperty("recognizer")) - object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -28904,9 +29778,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteRecognizerRequest.encode = function encode(message, writer) { + DeleteRecognizerRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -28928,7 +29806,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29010,16 +29888,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -29036,6 +29914,8 @@ DeleteRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeleteRecognizerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.DeleteRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29061,9 +29941,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteRecognizerRequest.toObject = function toObject(message, options) { + DeleteRecognizerRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -29071,13 +29955,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -29182,9 +30066,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteRecognizerRequest.encode = function encode(message, writer) { + UndeleteRecognizerRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -29204,7 +30092,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29282,13 +30170,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -29305,6 +30193,8 @@ UndeleteRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeleteRecognizerRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UndeleteRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29328,20 +30218,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteRecognizerRequest.toObject = function toObject(message, options) { + UndeleteRecognizerRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -29565,9 +30459,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Recognizer.encode = function encode(message, writer) { + Recognizer.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) @@ -29577,24 +30475,24 @@ if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.model); if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.defaultRecognitionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.defaultRecognitionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.reconciling); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) @@ -29615,7 +30513,7 @@ * @returns {$protobuf.Writer} Writer */ Recognizer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -29768,31 +30666,31 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.languageCodes != null && message.hasOwnProperty("languageCodes")) { + if (message.languageCodes != null && Object.hasOwnProperty.call(message, "languageCodes")) { if (!Array.isArray(message.languageCodes)) return "languageCodes: array expected"; for (var i = 0; i < message.languageCodes.length; ++i) if (!$util.isString(message.languageCodes[i])) return "languageCodes: string[] expected"; } - if (message.defaultRecognitionConfig != null && message.hasOwnProperty("defaultRecognitionConfig")) { + if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.defaultRecognitionConfig, long + 1); if (error) return "defaultRecognitionConfig." + error; } - if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -29800,7 +30698,7 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -29809,36 +30707,36 @@ case 4: break; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -29855,6 +30753,8 @@ Recognizer.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.Recognizer) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.Recognizer: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29876,12 +30776,12 @@ message.languageCodes[i] = String(object.languageCodes[i]); } if (object.defaultRecognitionConfig != null) { - if (typeof object.defaultRecognitionConfig !== "object") + if (!$util.isObject(object.defaultRecognitionConfig)) throw TypeError(".google.cloud.speech.v2.Recognizer.defaultRecognitionConfig: object expected"); message.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.defaultRecognitionConfig, long + 1); } if (object.annotations) { - if (typeof object.annotations !== "object") + if (!$util.isObject(object.annotations)) throw TypeError(".google.cloud.speech.v2.Recognizer.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -29911,22 +30811,22 @@ break; } if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.cloud.speech.v2.Recognizer.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (typeof object.updateTime !== "object") + if (!$util.isObject(object.updateTime)) throw TypeError(".google.cloud.speech.v2.Recognizer.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.cloud.speech.v2.Recognizer.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.cloud.speech.v2.Recognizer.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } @@ -29950,9 +30850,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Recognizer.toObject = function toObject(message, options) { + Recognizer.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languageCodes = []; @@ -29974,16 +30878,16 @@ object.kmsKeyName = ""; object.kmsKeyVersionName = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; - if (message.defaultRecognitionConfig != null && message.hasOwnProperty("defaultRecognitionConfig")) - object.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.defaultRecognitionConfig, options); + if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) + object.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.defaultRecognitionConfig, options, q + 1); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -29993,23 +30897,23 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.Recognizer.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.Recognizer.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) object.reconciling = message.reconciling; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; if (message.languageCodes && message.languageCodes.length) { object.languageCodes = []; @@ -30108,9 +31012,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoDetectDecodingConfig.encode = function encode(message, writer) { + AutoDetectDecodingConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -30124,7 +31032,7 @@ * @returns {$protobuf.Writer} Writer */ AutoDetectDecodingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30204,10 +31112,6 @@ AutoDetectDecodingConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.AutoDetectDecodingConfig) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.AutoDetectDecodingConfig(); }; @@ -30324,9 +31228,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExplicitDecodingConfig.encode = function encode(message, writer) { + ExplicitDecodingConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -30346,7 +31254,7 @@ * @returns {$protobuf.Writer} Writer */ ExplicitDecodingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30424,7 +31332,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -30443,10 +31351,10 @@ case 12: break; } - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; return null; @@ -30463,6 +31371,8 @@ ExplicitDecodingConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ExplicitDecodingConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ExplicitDecodingConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30544,20 +31454,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExplicitDecodingConfig.toObject = function toObject(message, options) { + ExplicitDecodingConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.encoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; object.sampleRateHertz = 0; object.audioChannelCount = 0; } - if (message.encoding != null && message.hasOwnProperty("encoding")) + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) + if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) + if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) object.audioChannelCount = message.audioChannelCount; return object; }; @@ -30689,9 +31603,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer) { + SpeakerDiarizationConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minSpeakerCount); if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) @@ -30709,7 +31627,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -30783,10 +31701,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; return null; @@ -30803,6 +31721,8 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeakerDiarizationConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30824,17 +31744,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options) { + SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.minSpeakerCount = 0; object.maxSpeakerCount = 0; } - if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) + if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) + if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; return object; }; @@ -30921,9 +31845,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomPromptConfig.encode = function encode(message, writer) { + CustomPromptConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.customPrompt); return writer; @@ -30939,7 +31867,7 @@ * @returns {$protobuf.Writer} Writer */ CustomPromptConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31009,7 +31937,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customPrompt != null && message.hasOwnProperty("customPrompt")) + if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) if (!$util.isString(message.customPrompt)) return "customPrompt: string expected"; return null; @@ -31026,6 +31954,8 @@ CustomPromptConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomPromptConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CustomPromptConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31045,13 +31975,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomPromptConfig.toObject = function toObject(message, options) { + CustomPromptConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.customPrompt = ""; - if (message.customPrompt != null && message.hasOwnProperty("customPrompt")) + if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) object.customPrompt = message.customPrompt; return object; }; @@ -31219,9 +32153,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionFeatures.encode = function encode(message, writer) { + RecognitionFeatures.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.profanityFilter); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) @@ -31231,7 +32169,7 @@ if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableAutomaticPunctuation); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v2.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableSpokenPunctuation); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) @@ -31241,7 +32179,7 @@ if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) writer.uint32(/* id 17, wireType 0 =*/136).int32(message.multiChannelMode); if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) - $root.google.cloud.speech.v2.CustomPromptConfig.encode(message.customPromptConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomPromptConfig.encode(message.customPromptConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim(); return writer; }; @@ -31255,7 +32193,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31361,25 +32299,25 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) if (typeof message.enableSpokenPunctuation !== "boolean") return "enableSpokenPunctuation: boolean expected"; - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) if (typeof message.enableSpokenEmojis !== "boolean") return "enableSpokenEmojis: boolean expected"; - if (message.multiChannelMode != null && message.hasOwnProperty("multiChannelMode")) + if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) switch (message.multiChannelMode) { default: return "multiChannelMode: enum value expected"; @@ -31387,15 +32325,15 @@ case 1: break; } - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { var error = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.customPromptConfig != null && message.hasOwnProperty("customPromptConfig")) { + if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) { var error = $root.google.cloud.speech.v2.CustomPromptConfig.verify(message.customPromptConfig, long + 1); if (error) return "customPromptConfig." + error; @@ -31414,6 +32352,8 @@ RecognitionFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionFeatures) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognitionFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31448,14 +32388,14 @@ break; } if (object.diarizationConfig != null) { - if (typeof object.diarizationConfig !== "object") + if (!$util.isObject(object.diarizationConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionFeatures.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.maxAlternatives != null) message.maxAlternatives = object.maxAlternatives | 0; if (object.customPromptConfig != null) { - if (typeof object.customPromptConfig !== "object") + if (!$util.isObject(object.customPromptConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionFeatures.customPromptConfig: object expected"); message.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.fromObject(object.customPromptConfig, long + 1); } @@ -31471,9 +32411,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionFeatures.toObject = function toObject(message, options) { + RecognitionFeatures.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.profanityFilter = false; @@ -31487,26 +32431,26 @@ object.multiChannelMode = options.enums === String ? "MULTI_CHANNEL_MODE_UNSPECIFIED" : 0; object.customPromptConfig = null; } - if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) + if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) object.profanityFilter = message.profanityFilter; - if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) + if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; - if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); - if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) + if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); + if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) object.enableSpokenPunctuation = message.enableSpokenPunctuation; - if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) + if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) object.enableSpokenEmojis = message.enableSpokenEmojis; - if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) + if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.multiChannelMode != null && message.hasOwnProperty("multiChannelMode")) + if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) object.multiChannelMode = options.enums === String ? $root.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode[message.multiChannelMode] === undefined ? message.multiChannelMode : $root.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode[message.multiChannelMode] : message.multiChannelMode; - if (message.customPromptConfig != null && message.hasOwnProperty("customPromptConfig")) - object.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.toObject(message.customPromptConfig, options); + if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) + object.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.toObject(message.customPromptConfig, options, q + 1); return object; }; @@ -31607,12 +32551,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer) { + TranscriptNormalization.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v2.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -31626,7 +32574,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31698,7 +32646,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && message.hasOwnProperty("entries")) { + if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -31721,6 +32669,8 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranscriptNormalization) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31731,7 +32681,7 @@ throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") + if (!$util.isObject(object.entries[i])) throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -31748,16 +32698,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options) { + TranscriptNormalization.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.toObject(message.entries[j], options); + object.entries[j] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); } return object; }; @@ -31859,9 +32813,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Entry.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -31881,7 +32839,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -31959,13 +32917,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -31982,6 +32940,8 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranscriptNormalization.Entry) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32005,20 +32965,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Entry.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && message.hasOwnProperty("search")) + if (message.search != null && Object.hasOwnProperty.call(message, "search")) object.search = message.search; - if (message.replace != null && message.hasOwnProperty("replace")) + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) object.replace = message.replace; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -32108,9 +33072,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationConfig.encode = function encode(message, writer) { + TranslationConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetLanguage); return writer; @@ -32126,7 +33094,7 @@ * @returns {$protobuf.Writer} Writer */ TranslationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32196,7 +33164,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.targetLanguage != null && message.hasOwnProperty("targetLanguage")) + if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) if (!$util.isString(message.targetLanguage)) return "targetLanguage: string expected"; return null; @@ -32213,6 +33181,8 @@ TranslationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranslationConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.TranslationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32232,13 +33202,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationConfig.toObject = function toObject(message, options) { + TranslationConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.targetLanguage = ""; - if (message.targetLanguage != null && message.hasOwnProperty("targetLanguage")) + if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) object.targetLanguage = message.targetLanguage; return object; }; @@ -32336,15 +33310,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer) { + SpeechAdaptation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -32358,7 +33336,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32436,7 +33414,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -32445,7 +33423,7 @@ return "phraseSets." + error; } } - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -32468,6 +33446,8 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechAdaptation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32478,7 +33458,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -32488,7 +33468,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -32505,9 +33485,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options) { + SpeechAdaptation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -32516,12 +33500,12 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.toObject(message.phraseSets[j], options, q + 1); } if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options, q + 1); } return object; }; @@ -32628,13 +33612,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdaptationPhraseSet.encode = function encode(message, writer) { + AdaptationPhraseSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phraseSet); if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.inlinePhraseSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.inlinePhraseSet, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -32648,7 +33636,7 @@ * @returns {$protobuf.Writer} Writer */ AdaptationPhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32723,12 +33711,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { properties.value = 1; if (!$util.isString(message.phraseSet)) return "phraseSet: string expected"; } - if (message.inlinePhraseSet != null && message.hasOwnProperty("inlinePhraseSet")) { + if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; @@ -32752,6 +33740,8 @@ AdaptationPhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32760,7 +33750,7 @@ if (object.phraseSet != null) message.phraseSet = String(object.phraseSet); if (object.inlinePhraseSet != null) { - if (typeof object.inlinePhraseSet !== "object") + if (!$util.isObject(object.inlinePhraseSet)) throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.inlinePhraseSet: object expected"); message.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.inlinePhraseSet, long + 1); } @@ -32776,17 +33766,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdaptationPhraseSet.toObject = function toObject(message, options) { + AdaptationPhraseSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { object.phraseSet = message.phraseSet; if (options.oneofs) object.value = "phraseSet"; } - if (message.inlinePhraseSet != null && message.hasOwnProperty("inlinePhraseSet")) { - object.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.inlinePhraseSet, options); + if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) { + object.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.inlinePhraseSet, options, q + 1); if (options.oneofs) object.value = "inlinePhraseSet"; } @@ -32887,9 +33881,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DenoiserConfig.encode = function encode(message, writer) { + DenoiserConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.denoiseAudio); if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) @@ -32907,7 +33905,7 @@ * @returns {$protobuf.Writer} Writer */ DenoiserConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -32981,10 +33979,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.denoiseAudio != null && message.hasOwnProperty("denoiseAudio")) + if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) if (typeof message.denoiseAudio !== "boolean") return "denoiseAudio: boolean expected"; - if (message.snrThreshold != null && message.hasOwnProperty("snrThreshold")) + if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) if (typeof message.snrThreshold !== "number") return "snrThreshold: number expected"; return null; @@ -33001,6 +33999,8 @@ DenoiserConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DenoiserConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.DenoiserConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33022,17 +34022,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DenoiserConfig.toObject = function toObject(message, options) { + DenoiserConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.denoiseAudio = false; object.snrThreshold = 0; } - if (message.denoiseAudio != null && message.hasOwnProperty("denoiseAudio")) + if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) object.denoiseAudio = message.denoiseAudio; - if (message.snrThreshold != null && message.hasOwnProperty("snrThreshold")) + if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) object.snrThreshold = options.json && !isFinite(message.snrThreshold) ? String(message.snrThreshold) : message.snrThreshold; return object; }; @@ -33206,28 +34210,32 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer) { + RecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.cloud.speech.v2.RecognitionFeatures.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionFeatures.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v2.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) - $root.google.cloud.speech.v2.AutoDetectDecodingConfig.encode(message.autoDecodingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.cloud.speech.v2.AutoDetectDecodingConfig.encode(message.autoDecodingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) - $root.google.cloud.speech.v2.ExplicitDecodingConfig.encode(message.explicitDecodingConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.speech.v2.ExplicitDecodingConfig.encode(message.explicitDecodingConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.model); if (message.languageCodes != null && message.languageCodes.length) for (var i = 0; i < message.languageCodes.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCodes[i]); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v2.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.cloud.speech.v2.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) - $root.google.cloud.speech.v2.TranslationConfig.encode(message.translationConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.google.cloud.speech.v2.TranslationConfig.encode(message.translationConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) - $root.google.cloud.speech.v2.DenoiserConfig.encode(message.denoiserConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + $root.google.cloud.speech.v2.DenoiserConfig.encode(message.denoiserConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork(), q + 1).ldelim(); return writer; }; @@ -33241,7 +34249,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33346,7 +34354,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.autoDecodingConfig != null && message.hasOwnProperty("autoDecodingConfig")) { + if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) { properties.decodingConfig = 1; { var error = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.verify(message.autoDecodingConfig, long + 1); @@ -33354,7 +34362,7 @@ return "autoDecodingConfig." + error; } } - if (message.explicitDecodingConfig != null && message.hasOwnProperty("explicitDecodingConfig")) { + if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) { if (properties.decodingConfig === 1) return "decodingConfig: multiple values"; properties.decodingConfig = 1; @@ -33364,37 +34372,37 @@ return "explicitDecodingConfig." + error; } } - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.languageCodes != null && message.hasOwnProperty("languageCodes")) { + if (message.languageCodes != null && Object.hasOwnProperty.call(message, "languageCodes")) { if (!Array.isArray(message.languageCodes)) return "languageCodes: array expected"; for (var i = 0; i < message.languageCodes.length; ++i) if (!$util.isString(message.languageCodes[i])) return "languageCodes: string[] expected"; } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.cloud.speech.v2.RecognitionFeatures.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.adaptation != null && message.hasOwnProperty("adaptation")) { + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { var error = $root.google.cloud.speech.v2.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { var error = $root.google.cloud.speech.v2.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.translationConfig != null && message.hasOwnProperty("translationConfig")) { + if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) { var error = $root.google.cloud.speech.v2.TranslationConfig.verify(message.translationConfig, long + 1); if (error) return "translationConfig." + error; } - if (message.denoiserConfig != null && message.hasOwnProperty("denoiserConfig")) { + if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) { var error = $root.google.cloud.speech.v2.DenoiserConfig.verify(message.denoiserConfig, long + 1); if (error) return "denoiserConfig." + error; @@ -33413,18 +34421,20 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.RecognitionConfig(); if (object.autoDecodingConfig != null) { - if (typeof object.autoDecodingConfig !== "object") + if (!$util.isObject(object.autoDecodingConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.autoDecodingConfig: object expected"); message.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.fromObject(object.autoDecodingConfig, long + 1); } if (object.explicitDecodingConfig != null) { - if (typeof object.explicitDecodingConfig !== "object") + if (!$util.isObject(object.explicitDecodingConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.explicitDecodingConfig: object expected"); message.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.fromObject(object.explicitDecodingConfig, long + 1); } @@ -33438,27 +34448,27 @@ message.languageCodes[i] = String(object.languageCodes[i]); } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.features: object expected"); message.features = $root.google.cloud.speech.v2.RecognitionFeatures.fromObject(object.features, long + 1); } if (object.adaptation != null) { - if (typeof object.adaptation !== "object") + if (!$util.isObject(object.adaptation)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (typeof object.transcriptNormalization !== "object") + if (!$util.isObject(object.transcriptNormalization)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } if (object.translationConfig != null) { - if (typeof object.translationConfig !== "object") + if (!$util.isObject(object.translationConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.translationConfig: object expected"); message.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.fromObject(object.translationConfig, long + 1); } if (object.denoiserConfig != null) { - if (typeof object.denoiserConfig !== "object") + if (!$util.isObject(object.denoiserConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionConfig.denoiserConfig: object expected"); message.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.fromObject(object.denoiserConfig, long + 1); } @@ -33474,9 +34484,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options) { + RecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languageCodes = []; @@ -33488,33 +34502,33 @@ object.translationConfig = null; object.denoiserConfig = null; } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.cloud.speech.v2.RecognitionFeatures.toObject(message.features, options); - if (message.adaptation != null && message.hasOwnProperty("adaptation")) - object.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.toObject(message.adaptation, options); - if (message.autoDecodingConfig != null && message.hasOwnProperty("autoDecodingConfig")) { - object.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.toObject(message.autoDecodingConfig, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.cloud.speech.v2.RecognitionFeatures.toObject(message.features, options, q + 1); + if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) + object.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.toObject(message.adaptation, options, q + 1); + if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) { + object.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.toObject(message.autoDecodingConfig, options, q + 1); if (options.oneofs) object.decodingConfig = "autoDecodingConfig"; } - if (message.explicitDecodingConfig != null && message.hasOwnProperty("explicitDecodingConfig")) { - object.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.toObject(message.explicitDecodingConfig, options); + if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) { + object.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.toObject(message.explicitDecodingConfig, options, q + 1); if (options.oneofs) object.decodingConfig = "explicitDecodingConfig"; } - if (message.model != null && message.hasOwnProperty("model")) + if (message.model != null && Object.hasOwnProperty.call(message, "model")) object.model = message.model; if (message.languageCodes && message.languageCodes.length) { object.languageCodes = []; for (var j = 0; j < message.languageCodes.length; ++j) object.languageCodes[j] = message.languageCodes[j]; } - if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.toObject(message.transcriptNormalization, options); - if (message.translationConfig != null && message.hasOwnProperty("translationConfig")) - object.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.toObject(message.translationConfig, options); - if (message.denoiserConfig != null && message.hasOwnProperty("denoiserConfig")) - object.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.toObject(message.denoiserConfig, options); + if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); + if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) + object.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.toObject(message.translationConfig, options, q + 1); + if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) + object.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.toObject(message.denoiserConfig, options, q + 1); return object; }; @@ -33650,11 +34664,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer) { + RecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recognizer); if (message.content != null && Object.hasOwnProperty.call(message, "content")) @@ -33662,7 +34680,7 @@ if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); return writer; }; @@ -33676,7 +34694,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -33763,25 +34781,25 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && message.hasOwnProperty("configMask")) { + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -33802,6 +34820,8 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33810,12 +34830,12 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v2.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (typeof object.configMask !== "object") + if (!$util.isObject(object.configMask)) throw TypeError(".google.cloud.speech.v2.RecognizeRequest.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -33838,31 +34858,35 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options) { + RecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.recognizer = ""; object.configMask = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) object.recognizer = message.recognizer; - if (message.content != null && message.hasOwnProperty("content")) { + if (message.content != null && Object.hasOwnProperty.call(message, "content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; } - if (message.configMask != null && message.hasOwnProperty("configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); return object; }; @@ -33975,11 +34999,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionResponseMetadata.encode = function encode(message, writer) { + RecognitionResponseMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.requestId); if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) @@ -33997,7 +35025,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34076,15 +35104,15 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) { + if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledDuration, long + 1); if (error) return "totalBilledDuration." + error; } - if (message.prompt != null && message.hasOwnProperty("prompt")) { + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) { properties._prompt = 1; if (!$util.isString(message.prompt)) return "prompt: string expected"; @@ -34103,6 +35131,8 @@ RecognitionResponseMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionResponseMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognitionResponseMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34111,7 +35141,7 @@ if (object.requestId != null) message.requestId = String(object.requestId); if (object.totalBilledDuration != null) { - if (typeof object.totalBilledDuration !== "object") + if (!$util.isObject(object.totalBilledDuration)) throw TypeError(".google.cloud.speech.v2.RecognitionResponseMetadata.totalBilledDuration: object expected"); message.totalBilledDuration = $root.google.protobuf.Duration.fromObject(object.totalBilledDuration, long + 1); } @@ -34129,19 +35159,23 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionResponseMetadata.toObject = function toObject(message, options) { + RecognitionResponseMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.totalBilledDuration = null; object.requestId = ""; } - if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) - object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) + if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) + object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options, q + 1); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) object.requestId = message.requestId; - if (message.prompt != null && message.hasOwnProperty("prompt")) { + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) { object.prompt = message.prompt; if (options.oneofs) object._prompt = "prompt"; @@ -34250,16 +35284,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer) { + SpeechRecognitionAlternative.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v2.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -34273,7 +35311,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34353,13 +35391,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && message.hasOwnProperty("words")) { + if (message.words != null && Object.hasOwnProperty.call(message, "words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -34382,6 +35420,8 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechRecognitionAlternative) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34396,7 +35436,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (typeof object.words[i] !== "object") + if (!$util.isObject(object.words[i])) throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v2.WordInfo.fromObject(object.words[i], long + 1); } @@ -34413,9 +35453,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options) { + SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -34423,14 +35467,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && message.hasOwnProperty("transcript")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) object.transcript = message.transcript; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v2.WordInfo.toObject(message.words[j], options); + object.words[j] = $root.google.cloud.speech.v2.WordInfo.toObject(message.words[j], options, q + 1); } return object; }; @@ -34553,13 +35597,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer) { + WordInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -34579,7 +35627,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34665,23 +35713,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) { var error = $root.google.protobuf.Duration.verify(message.startOffset, long + 1); if (error) return "startOffset." + error; } - if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) { var error = $root.google.protobuf.Duration.verify(message.endOffset, long + 1); if (error) return "endOffset." + error; } - if (message.word != null && message.hasOwnProperty("word")) + if (message.word != null && Object.hasOwnProperty.call(message, "word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -34698,18 +35746,20 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.WordInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.WordInfo(); if (object.startOffset != null) { - if (typeof object.startOffset !== "object") + if (!$util.isObject(object.startOffset)) throw TypeError(".google.cloud.speech.v2.WordInfo.startOffset: object expected"); message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset, long + 1); } if (object.endOffset != null) { - if (typeof object.endOffset !== "object") + if (!$util.isObject(object.endOffset)) throw TypeError(".google.cloud.speech.v2.WordInfo.endOffset: object expected"); message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset, long + 1); } @@ -34731,9 +35781,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options) { + WordInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startOffset = null; @@ -34742,15 +35796,15 @@ object.confidence = 0; object.speakerLabel = ""; } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); - if (message.word != null && message.hasOwnProperty("word")) + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options, q + 1); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options, q + 1); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) object.word = message.word; - if (message.confidence != null && message.hasOwnProperty("confidence")) + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) + if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -34865,16 +35919,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer) { + SpeechRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -34890,7 +35948,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -34974,7 +36032,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -34983,15 +36041,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) { + if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) { var error = $root.google.protobuf.Duration.verify(message.resultEndOffset, long + 1); if (error) return "resultEndOffset." + error; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -35008,6 +36066,8 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35018,7 +36078,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -35026,7 +36086,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndOffset != null) { - if (typeof object.resultEndOffset !== "object") + if (!$util.isObject(object.resultEndOffset)) throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.resultEndOffset: object expected"); message.resultEndOffset = $root.google.protobuf.Duration.fromObject(object.resultEndOffset, long + 1); } @@ -35044,9 +36104,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options) { + SpeechRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -35058,13 +36122,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) - object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) + object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options, q + 1); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -35161,14 +36225,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer) { + RecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -35182,7 +36250,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35258,7 +36326,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -35267,7 +36335,7 @@ return "results." + error; } } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -35286,6 +36354,8 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35296,13 +36366,13 @@ throw TypeError(".google.cloud.speech.v2.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v2.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v2.RecognizeResponse.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -35318,20 +36388,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options) { + RecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; if (options.defaults) object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); } return object; }; @@ -35445,15 +36519,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionFeatures.encode = function encode(message, writer) { + StreamingRecognitionFeatures.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableVoiceActivityEvents); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.interimResults); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.endpointingSensitivity); return writer; @@ -35469,7 +36547,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35551,18 +36629,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { var error = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; } - if (message.endpointingSensitivity != null && message.hasOwnProperty("endpointingSensitivity")) + if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) switch (message.endpointingSensitivity) { default: return "endpointingSensitivity: enum value expected"; @@ -35586,6 +36664,8 @@ StreamingRecognitionFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionFeatures) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35596,7 +36676,7 @@ if (object.interimResults != null) message.interimResults = Boolean(object.interimResults); if (object.voiceActivityTimeout != null) { - if (typeof object.voiceActivityTimeout !== "object") + if (!$util.isObject(object.voiceActivityTimeout)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -35636,9 +36716,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionFeatures.toObject = function toObject(message, options) { + StreamingRecognitionFeatures.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableVoiceActivityEvents = false; @@ -35646,13 +36730,13 @@ object.voiceActivityTimeout = null; object.endpointingSensitivity = options.enums === String ? "ENDPOINTING_SENSITIVITY_UNSPECIFIED" : 0; } - if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.interimResults != null && message.hasOwnProperty("interimResults")) + if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) object.interimResults = message.interimResults; - if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); - if (message.endpointingSensitivity != null && message.hasOwnProperty("endpointingSensitivity")) + if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); + if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) object.endpointingSensitivity = options.enums === String ? $root.google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity[message.endpointingSensitivity] === undefined ? message.endpointingSensitivity : $root.google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity[message.endpointingSensitivity] : message.endpointingSensitivity; return object; }; @@ -35745,13 +36829,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer) { + VoiceActivityTimeout.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -35765,7 +36853,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -35839,12 +36927,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -35863,18 +36951,20 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (typeof object.speechStartTimeout !== "object") + if (!$util.isObject(object.speechStartTimeout)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (typeof object.speechEndTimeout !== "object") + if (!$util.isObject(object.speechEndTimeout)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -35890,18 +36980,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options) { + VoiceActivityTimeout.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); - if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); + if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); + if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); return object; }; @@ -36026,15 +37120,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer) { + StreamingRecognitionConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) - $root.google.cloud.speech.v2.StreamingRecognitionFeatures.encode(message.streamingFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionFeatures.encode(message.streamingFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -36048,7 +37146,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36126,17 +37224,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && message.hasOwnProperty("configMask")) { + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.streamingFeatures != null && message.hasOwnProperty("streamingFeatures")) { + if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) { var error = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.verify(message.streamingFeatures, long + 1); if (error) return "streamingFeatures." + error; @@ -36155,23 +37253,25 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.StreamingRecognitionConfig(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (typeof object.configMask !== "object") + if (!$util.isObject(object.configMask)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } if (object.streamingFeatures != null) { - if (typeof object.streamingFeatures !== "object") + if (!$util.isObject(object.streamingFeatures)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.streamingFeatures: object expected"); message.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.fromObject(object.streamingFeatures, long + 1); } @@ -36187,21 +37287,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options) { + StreamingRecognitionConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.streamingFeatures = null; object.configMask = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); - if (message.streamingFeatures != null && message.hasOwnProperty("streamingFeatures")) - object.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.toObject(message.streamingFeatures, options); - if (message.configMask != null && message.hasOwnProperty("configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) + object.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.toObject(message.streamingFeatures, options, q + 1); + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); return object; }; @@ -36319,15 +37423,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer) { + StreamingRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recognizer); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.audio); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v2.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -36341,7 +37449,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36420,10 +37528,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v2.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -36431,7 +37539,7 @@ return "streamingConfig." + error; } } - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -36452,6 +37560,8 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36460,7 +37570,7 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.streamingConfig != null) { - if (typeof object.streamingConfig !== "object") + if (!$util.isObject(object.streamingConfig)) throw TypeError(".google.cloud.speech.v2.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -36481,21 +37591,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options) { + StreamingRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.recognizer = ""; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) object.recognizer = message.recognizer; - if (message.audio != null && message.hasOwnProperty("audio")) { + if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; if (options.oneofs) object.streamingRequest = "audio"; } - if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.toObject(message.streamingConfig, options); + if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); if (options.oneofs) object.streamingRequest = "streamingConfig"; } @@ -36630,20 +37744,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeRequest.encode = function encode(message, writer) { + BatchRecognizeRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.recognizer); if (message.files != null && message.files.length) for (var i = 0; i < message.files.length; ++i) - $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) - $root.google.cloud.speech.v2.RecognitionOutputConfig.encode(message.recognitionOutputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionOutputConfig.encode(message.recognitionOutputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.processingStrategy); return writer; @@ -36659,7 +37777,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -36751,20 +37869,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && message.hasOwnProperty("configMask")) { + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.files != null && message.hasOwnProperty("files")) { + if (message.files != null && Object.hasOwnProperty.call(message, "files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (var i = 0; i < message.files.length; ++i) { @@ -36773,12 +37891,12 @@ return "files." + error; } } - if (message.recognitionOutputConfig != null && message.hasOwnProperty("recognitionOutputConfig")) { + if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) { var error = $root.google.cloud.speech.v2.RecognitionOutputConfig.verify(message.recognitionOutputConfig, long + 1); if (error) return "recognitionOutputConfig." + error; } - if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) + if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) switch (message.processingStrategy) { default: return "processingStrategy: enum value expected"; @@ -36800,6 +37918,8 @@ BatchRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36808,12 +37928,12 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (typeof object.configMask !== "object") + if (!$util.isObject(object.configMask)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -36822,13 +37942,13 @@ throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.files: array expected"); message.files = []; for (var i = 0; i < object.files.length; ++i) { - if (typeof object.files[i] !== "object") + if (!$util.isObject(object.files[i])) throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.files: object expected"); message.files[i] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.fromObject(object.files[i], long + 1); } } if (object.recognitionOutputConfig != null) { - if (typeof object.recognitionOutputConfig !== "object") + if (!$util.isObject(object.recognitionOutputConfig)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.recognitionOutputConfig: object expected"); message.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.fromObject(object.recognitionOutputConfig, long + 1); } @@ -36860,9 +37980,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeRequest.toObject = function toObject(message, options) { + BatchRecognizeRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.files = []; @@ -36873,20 +37997,20 @@ object.recognitionOutputConfig = null; object.processingStrategy = options.enums === String ? "PROCESSING_STRATEGY_UNSPECIFIED" : 0; } - if (message.recognizer != null && message.hasOwnProperty("recognizer")) + if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) object.recognizer = message.recognizer; if (message.files && message.files.length) { object.files = []; for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.toObject(message.files[j], options); - } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); - if (message.configMask != null && message.hasOwnProperty("configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); - if (message.recognitionOutputConfig != null && message.hasOwnProperty("recognitionOutputConfig")) - object.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.toObject(message.recognitionOutputConfig, options); - if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) + object.files[j] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.toObject(message.files[j], options, q + 1); + } + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); + if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) + object.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.toObject(message.recognitionOutputConfig, options, q + 1); + if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) object.processingStrategy = options.enums === String ? $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] === undefined ? message.processingStrategy : $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] : message.processingStrategy; return object; }; @@ -36987,9 +38111,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsOutputConfig.encode = function encode(message, writer) { + GcsOutputConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; @@ -37005,7 +38133,7 @@ * @returns {$protobuf.Writer} Writer */ GcsOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37075,7 +38203,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -37092,6 +38220,8 @@ GcsOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GcsOutputConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.GcsOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37111,13 +38241,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsOutputConfig.toObject = function toObject(message, options) { + GcsOutputConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; return object; }; @@ -37195,9 +38329,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineOutputConfig.encode = function encode(message, writer) { + InlineOutputConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -37211,7 +38349,7 @@ * @returns {$protobuf.Writer} Writer */ InlineOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37291,10 +38429,6 @@ InlineOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.InlineOutputConfig) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.InlineOutputConfig(); }; @@ -37384,9 +38518,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NativeOutputFileFormatConfig.encode = function encode(message, writer) { + NativeOutputFileFormatConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -37400,7 +38538,7 @@ * @returns {$protobuf.Writer} Writer */ NativeOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37480,10 +38618,6 @@ NativeOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.NativeOutputFileFormatConfig) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.NativeOutputFileFormatConfig(); }; @@ -37573,9 +38707,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VttOutputFileFormatConfig.encode = function encode(message, writer) { + VttOutputFileFormatConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -37589,7 +38727,7 @@ * @returns {$protobuf.Writer} Writer */ VttOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37669,10 +38807,6 @@ VttOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.VttOutputFileFormatConfig) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.VttOutputFileFormatConfig(); }; @@ -37762,9 +38896,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SrtOutputFileFormatConfig.encode = function encode(message, writer) { + SrtOutputFileFormatConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -37778,7 +38916,7 @@ * @returns {$protobuf.Writer} Writer */ SrtOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -37858,10 +38996,6 @@ SrtOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SrtOutputFileFormatConfig) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.SrtOutputFileFormatConfig(); }; @@ -37978,15 +39112,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputFormatConfig.encode = function encode(message, writer) { + OutputFormatConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.native != null && Object.hasOwnProperty.call(message, "native")) - $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.encode(message.native, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.encode(message.native, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) - $root.google.cloud.speech.v2.VttOutputFileFormatConfig.encode(message.vtt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.VttOutputFileFormatConfig.encode(message.vtt, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) - $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.encode(message.srt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.encode(message.srt, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -38000,7 +39138,7 @@ * @returns {$protobuf.Writer} Writer */ OutputFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38078,17 +39216,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.native != null && message.hasOwnProperty("native")) { + if (message.native != null && Object.hasOwnProperty.call(message, "native")) { var error = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.verify(message.native, long + 1); if (error) return "native." + error; } - if (message.vtt != null && message.hasOwnProperty("vtt")) { + if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) { var error = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.verify(message.vtt, long + 1); if (error) return "vtt." + error; } - if (message.srt != null && message.hasOwnProperty("srt")) { + if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) { var error = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.verify(message.srt, long + 1); if (error) return "srt." + error; @@ -38107,23 +39245,25 @@ OutputFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.OutputFormatConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.OutputFormatConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.OutputFormatConfig(); if (object.native != null) { - if (typeof object.native !== "object") + if (!$util.isObject(object.native)) throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.native: object expected"); message.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.fromObject(object.native, long + 1); } if (object.vtt != null) { - if (typeof object.vtt !== "object") + if (!$util.isObject(object.vtt)) throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.vtt: object expected"); message.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.fromObject(object.vtt, long + 1); } if (object.srt != null) { - if (typeof object.srt !== "object") + if (!$util.isObject(object.srt)) throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.srt: object expected"); message.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.fromObject(object.srt, long + 1); } @@ -38139,21 +39279,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputFormatConfig.toObject = function toObject(message, options) { + OutputFormatConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.native = null; object.vtt = null; object.srt = null; } - if (message.native != null && message.hasOwnProperty("native")) - object.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.toObject(message.native, options); - if (message.vtt != null && message.hasOwnProperty("vtt")) - object.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.toObject(message.vtt, options); - if (message.srt != null && message.hasOwnProperty("srt")) - object.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.toObject(message.srt, options); + if (message.native != null && Object.hasOwnProperty.call(message, "native")) + object.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.toObject(message.native, options, q + 1); + if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) + object.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.toObject(message.vtt, options, q + 1); + if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) + object.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.toObject(message.srt, options, q + 1); return object; }; @@ -38271,15 +39415,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionOutputConfig.encode = function encode(message, writer) { + RecognitionOutputConfig.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) - $root.google.cloud.speech.v2.GcsOutputConfig.encode(message.gcsOutputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.GcsOutputConfig.encode(message.gcsOutputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) - $root.google.cloud.speech.v2.InlineOutputConfig.encode(message.inlineResponseConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.InlineOutputConfig.encode(message.inlineResponseConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) - $root.google.cloud.speech.v2.OutputFormatConfig.encode(message.outputFormatConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.OutputFormatConfig.encode(message.outputFormatConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -38293,7 +39441,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38372,7 +39520,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) { + if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) { properties.output = 1; { var error = $root.google.cloud.speech.v2.GcsOutputConfig.verify(message.gcsOutputConfig, long + 1); @@ -38380,7 +39528,7 @@ return "gcsOutputConfig." + error; } } - if (message.inlineResponseConfig != null && message.hasOwnProperty("inlineResponseConfig")) { + if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) { if (properties.output === 1) return "output: multiple values"; properties.output = 1; @@ -38390,7 +39538,7 @@ return "inlineResponseConfig." + error; } } - if (message.outputFormatConfig != null && message.hasOwnProperty("outputFormatConfig")) { + if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) { var error = $root.google.cloud.speech.v2.OutputFormatConfig.verify(message.outputFormatConfig, long + 1); if (error) return "outputFormatConfig." + error; @@ -38409,23 +39557,25 @@ RecognitionOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionOutputConfig) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.RecognitionOutputConfig(); if (object.gcsOutputConfig != null) { - if (typeof object.gcsOutputConfig !== "object") + if (!$util.isObject(object.gcsOutputConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.gcsOutputConfig: object expected"); message.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.fromObject(object.gcsOutputConfig, long + 1); } if (object.inlineResponseConfig != null) { - if (typeof object.inlineResponseConfig !== "object") + if (!$util.isObject(object.inlineResponseConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.inlineResponseConfig: object expected"); message.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.fromObject(object.inlineResponseConfig, long + 1); } if (object.outputFormatConfig != null) { - if (typeof object.outputFormatConfig !== "object") + if (!$util.isObject(object.outputFormatConfig)) throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.outputFormatConfig: object expected"); message.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.fromObject(object.outputFormatConfig, long + 1); } @@ -38441,24 +39591,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionOutputConfig.toObject = function toObject(message, options) { + RecognitionOutputConfig.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.outputFormatConfig = null; - if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) { - object.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.toObject(message.gcsOutputConfig, options); + if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) { + object.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.toObject(message.gcsOutputConfig, options, q + 1); if (options.oneofs) object.output = "gcsOutputConfig"; } - if (message.inlineResponseConfig != null && message.hasOwnProperty("inlineResponseConfig")) { - object.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.toObject(message.inlineResponseConfig, options); + if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) { + object.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.toObject(message.inlineResponseConfig, options, q + 1); if (options.oneofs) object.output = "inlineResponseConfig"; } - if (message.outputFormatConfig != null && message.hasOwnProperty("outputFormatConfig")) - object.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.toObject(message.outputFormatConfig, options); + if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) + object.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.toObject(message.outputFormatConfig, options, q + 1); return object; }; @@ -38554,16 +39708,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeResponse.encode = function encode(message, writer) { + BatchRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && Object.hasOwnProperty.call(message, "results")) for (var keys = Object.keys(message.results), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.BatchRecognizeFileResult.encode(message.results[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeFileResult.encode(message.results[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -38577,7 +39735,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38672,7 +39830,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!$util.isObject(message.results)) return "results: object expected"; var key = Object.keys(message.results); @@ -38682,7 +39840,7 @@ return "results." + error; } } - if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) { + if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledDuration, long + 1); if (error) return "totalBilledDuration." + error; @@ -38701,25 +39859,27 @@ BatchRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeResponse(); if (object.results) { - if (typeof object.results !== "object") + if (!$util.isObject(object.results)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.results: object expected"); message.results = {}; for (var keys = Object.keys(object.results), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.results, keys[i]); - if (typeof object.results[keys[i]] !== "object") + if (!$util.isObject(object.results[keys[i]])) throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.results: object expected"); message.results[keys[i]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.fromObject(object.results[keys[i]], long + 1); } } if (object.totalBilledDuration != null) { - if (typeof object.totalBilledDuration !== "object") + if (!$util.isObject(object.totalBilledDuration)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.totalBilledDuration: object expected"); message.totalBilledDuration = $root.google.protobuf.Duration.fromObject(object.totalBilledDuration, long + 1); } @@ -38735,9 +39895,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeResponse.toObject = function toObject(message, options) { + BatchRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.results = {}; @@ -38749,11 +39913,11 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.results, keys2[j]); - object.results[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.toObject(message.results[keys2[j]], options); + object.results[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.toObject(message.results[keys2[j]], options, q + 1); } } - if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) - object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options); + if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) + object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options, q + 1); return object; }; @@ -38849,14 +40013,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeResults.encode = function encode(message, writer) { + BatchRecognizeResults.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -38870,7 +40038,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeResults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -38946,7 +40114,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -38955,7 +40123,7 @@ return "results." + error; } } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -38974,6 +40142,8 @@ BatchRecognizeResults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeResults) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38984,13 +40154,13 @@ throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -39006,9 +40176,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeResults.toObject = function toObject(message, options) { + BatchRecognizeResults.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -39017,10 +40191,10 @@ if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); return object; }; @@ -39124,9 +40298,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageResult.encode = function encode(message, writer) { + CloudStorageResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) @@ -39146,7 +40324,7 @@ * @returns {$protobuf.Writer} Writer */ CloudStorageResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39224,13 +40402,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.vttFormatUri != null && message.hasOwnProperty("vttFormatUri")) + if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) if (!$util.isString(message.vttFormatUri)) return "vttFormatUri: string expected"; - if (message.srtFormatUri != null && message.hasOwnProperty("srtFormatUri")) + if (message.srtFormatUri != null && Object.hasOwnProperty.call(message, "srtFormatUri")) if (!$util.isString(message.srtFormatUri)) return "srtFormatUri: string expected"; return null; @@ -39247,6 +40425,8 @@ CloudStorageResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CloudStorageResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CloudStorageResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -39270,20 +40450,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageResult.toObject = function toObject(message, options) { + CloudStorageResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.uri = ""; object.vttFormatUri = ""; object.srtFormatUri = ""; } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; - if (message.vttFormatUri != null && message.hasOwnProperty("vttFormatUri")) + if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) object.vttFormatUri = message.vttFormatUri; - if (message.srtFormatUri != null && message.hasOwnProperty("srtFormatUri")) + if (message.srtFormatUri != null && Object.hasOwnProperty.call(message, "srtFormatUri")) object.srtFormatUri = message.srtFormatUri; return object; }; @@ -39388,11 +40572,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineResult.encode = function encode(message, writer) { + InlineResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.vttCaptions); if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) @@ -39410,7 +40598,7 @@ * @returns {$protobuf.Writer} Writer */ InlineResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39488,15 +40676,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) { var error = $root.google.cloud.speech.v2.BatchRecognizeResults.verify(message.transcript, long + 1); if (error) return "transcript." + error; } - if (message.vttCaptions != null && message.hasOwnProperty("vttCaptions")) + if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) if (!$util.isString(message.vttCaptions)) return "vttCaptions: string expected"; - if (message.srtCaptions != null && message.hasOwnProperty("srtCaptions")) + if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) if (!$util.isString(message.srtCaptions)) return "srtCaptions: string expected"; return null; @@ -39513,13 +40701,15 @@ InlineResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.InlineResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.InlineResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.InlineResult(); if (object.transcript != null) { - if (typeof object.transcript !== "object") + if (!$util.isObject(object.transcript)) throw TypeError(".google.cloud.speech.v2.InlineResult.transcript: object expected"); message.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.fromObject(object.transcript, long + 1); } @@ -39539,20 +40729,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InlineResult.toObject = function toObject(message, options) { + InlineResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.transcript = null; object.vttCaptions = ""; object.srtCaptions = ""; } - if (message.transcript != null && message.hasOwnProperty("transcript")) - object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options); - if (message.vttCaptions != null && message.hasOwnProperty("vttCaptions")) + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options, q + 1); + if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) object.vttCaptions = message.vttCaptions; - if (message.srtCaptions != null && message.hasOwnProperty("srtCaptions")) + if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) object.srtCaptions = message.srtCaptions; return object; }; @@ -39698,21 +40892,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeFileResult.encode = function encode(message, writer) { + BatchRecognizeFileResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) - $root.google.cloud.speech.v2.CloudStorageResult.encode(message.cloudStorageResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.cloud.speech.v2.CloudStorageResult.encode(message.cloudStorageResult, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) - $root.google.cloud.speech.v2.InlineResult.encode(message.inlineResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.InlineResult.encode(message.inlineResult, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); return writer; }; @@ -39726,7 +40924,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeFileResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -39817,17 +41015,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.cloudStorageResult != null && message.hasOwnProperty("cloudStorageResult")) { + if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) { properties.result = 1; { var error = $root.google.cloud.speech.v2.CloudStorageResult.verify(message.cloudStorageResult, long + 1); @@ -39835,7 +41033,7 @@ return "cloudStorageResult." + error; } } - if (message.inlineResult != null && message.hasOwnProperty("inlineResult")) { + if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) { if (properties.result === 1) return "result: multiple values"; properties.result = 1; @@ -39845,10 +41043,10 @@ return "inlineResult." + error; } } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.transcript != null && message.hasOwnProperty("transcript")) { + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) { var error = $root.google.cloud.speech.v2.BatchRecognizeResults.verify(message.transcript, long + 1); if (error) return "transcript." + error; @@ -39867,35 +41065,37 @@ BatchRecognizeFileResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeFileResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeFileResult(); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } if (object.cloudStorageResult != null) { - if (typeof object.cloudStorageResult !== "object") + if (!$util.isObject(object.cloudStorageResult)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.cloudStorageResult: object expected"); message.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.fromObject(object.cloudStorageResult, long + 1); } if (object.inlineResult != null) { - if (typeof object.inlineResult !== "object") + if (!$util.isObject(object.inlineResult)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.inlineResult: object expected"); message.inlineResult = $root.google.cloud.speech.v2.InlineResult.fromObject(object.inlineResult, long + 1); } if (object.uri != null) message.uri = String(object.uri); if (object.transcript != null) { - if (typeof object.transcript !== "object") + if (!$util.isObject(object.transcript)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.transcript: object expected"); message.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.fromObject(object.transcript, long + 1); } @@ -39911,9 +41111,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeFileResult.toObject = function toObject(message, options) { + BatchRecognizeFileResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.uri = ""; @@ -39921,21 +41125,21 @@ object.metadata = null; object.transcript = null; } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); - if (message.transcript != null && message.hasOwnProperty("transcript")) - object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options); - if (message.cloudStorageResult != null && message.hasOwnProperty("cloudStorageResult")) { - object.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.toObject(message.cloudStorageResult, options); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options, q + 1); + if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) { + object.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.toObject(message.cloudStorageResult, options, q + 1); if (options.oneofs) object.result = "cloudStorageResult"; } - if (message.inlineResult != null && message.hasOwnProperty("inlineResult")) { - object.inlineResult = $root.google.cloud.speech.v2.InlineResult.toObject(message.inlineResult, options); + if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) { + object.inlineResult = $root.google.cloud.speech.v2.InlineResult.toObject(message.inlineResult, options, q + 1); if (options.oneofs) object.result = "inlineResult"; } @@ -40042,13 +41246,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeTranscriptionMetadata.encode = function encode(message, writer) { + BatchRecognizeTranscriptionMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); return writer; @@ -40064,7 +41272,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeTranscriptionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40142,15 +41350,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -40167,6 +41375,8 @@ BatchRecognizeTranscriptionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40175,7 +41385,7 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -40193,20 +41403,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeTranscriptionMetadata.toObject = function toObject(message, options) { + BatchRecognizeTranscriptionMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; object.error = null; object.uri = ""; } - if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) + if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) object.progressPercent = message.progressPercent; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.uri != null && message.hasOwnProperty("uri")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) object.uri = message.uri; return object; }; @@ -40294,13 +41508,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeMetadata.encode = function encode(message, writer) { + BatchRecognizeMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.transcriptionMetadata != null && Object.hasOwnProperty.call(message, "transcriptionMetadata")) for (var keys = Object.keys(message.transcriptionMetadata), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.encode(message.transcriptionMetadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.encode(message.transcriptionMetadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -40315,7 +41533,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40406,7 +41624,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcriptionMetadata != null && message.hasOwnProperty("transcriptionMetadata")) { + if (message.transcriptionMetadata != null && Object.hasOwnProperty.call(message, "transcriptionMetadata")) { if (!$util.isObject(message.transcriptionMetadata)) return "transcriptionMetadata: object expected"; var key = Object.keys(message.transcriptionMetadata); @@ -40430,19 +41648,21 @@ BatchRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeMetadata(); if (object.transcriptionMetadata) { - if (typeof object.transcriptionMetadata !== "object") + if (!$util.isObject(object.transcriptionMetadata)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata.transcriptionMetadata: object expected"); message.transcriptionMetadata = {}; for (var keys = Object.keys(object.transcriptionMetadata), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.transcriptionMetadata, keys[i]); - if (typeof object.transcriptionMetadata[keys[i]] !== "object") + if (!$util.isObject(object.transcriptionMetadata[keys[i]])) throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata.transcriptionMetadata: object expected"); message.transcriptionMetadata[keys[i]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.fromObject(object.transcriptionMetadata[keys[i]], long + 1); } @@ -40459,9 +41679,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeMetadata.toObject = function toObject(message, options) { + BatchRecognizeMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.transcriptionMetadata = {}; @@ -40471,7 +41695,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.transcriptionMetadata, keys2[j]); - object.transcriptionMetadata[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.toObject(message.transcriptionMetadata[keys2[j]], options); + object.transcriptionMetadata[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.toObject(message.transcriptionMetadata[keys2[j]], options, q + 1); } } return object; @@ -40591,15 +41815,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeFileMetadata.encode = function encode(message, writer) { + BatchRecognizeFileMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -40613,7 +41841,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeFileMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -40692,17 +41920,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { properties.audioSource = 1; if (!$util.isString(message.uri)) return "uri: string expected"; } - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && message.hasOwnProperty("configMask")) { + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; @@ -40721,6 +41949,8 @@ BatchRecognizeFileMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeFileMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40729,12 +41959,12 @@ if (object.uri != null) message.uri = String(object.uri); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (typeof object.configMask !== "object") + if (!$util.isObject(object.configMask)) throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -40750,23 +41980,27 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeFileMetadata.toObject = function toObject(message, options) { + BatchRecognizeFileMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.configMask = null; } - if (message.uri != null && message.hasOwnProperty("uri")) { + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); - if (message.configMask != null && message.hasOwnProperty("configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); + if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); return object; }; @@ -40898,18 +42132,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer) { + StreamingRecognitionResult.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -40927,7 +42165,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41019,7 +42257,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && message.hasOwnProperty("alternatives")) { + if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -41028,21 +42266,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) { + if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) { var error = $root.google.protobuf.Duration.verify(message.resultEndOffset, long + 1); if (error) return "resultEndOffset." + error; } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -41059,6 +42297,8 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionResult) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41069,7 +42309,7 @@ throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (typeof object.alternatives[i] !== "object") + if (!$util.isObject(object.alternatives[i])) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -41079,7 +42319,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndOffset != null) { - if (typeof object.resultEndOffset !== "object") + if (!$util.isObject(object.resultEndOffset)) throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.resultEndOffset: object expected"); message.resultEndOffset = $root.google.protobuf.Duration.fromObject(object.resultEndOffset, long + 1); } @@ -41099,9 +42339,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options) { + StreamingRecognitionResult.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -41115,17 +42359,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); + object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); } - if (message.isFinal != null && message.hasOwnProperty("isFinal")) + if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && message.hasOwnProperty("stability")) + if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) - object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options); - if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) + object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options, q + 1); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) object.languageCode = message.languageCode; return object; }; @@ -41240,18 +42484,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer) { + StreamingRecognizeResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.speechEventType); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) - $root.google.protobuf.Duration.encode(message.speechEventOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); return writer; }; @@ -41265,7 +42513,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41349,7 +42597,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && message.hasOwnProperty("results")) { + if (message.results != null && Object.hasOwnProperty.call(message, "results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -41358,7 +42606,7 @@ return "results." + error; } } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -41368,12 +42616,12 @@ case 3: break; } - if (message.speechEventOffset != null && message.hasOwnProperty("speechEventOffset")) { + if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) { var error = $root.google.protobuf.Duration.verify(message.speechEventOffset, long + 1); if (error) return "speechEventOffset." + error; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -41392,6 +42640,8 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognizeResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41402,7 +42652,7 @@ throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") + if (!$util.isObject(object.results[i])) throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -41432,12 +42682,12 @@ break; } if (object.speechEventOffset != null) { - if (typeof object.speechEventOffset !== "object") + if (!$util.isObject(object.speechEventOffset)) throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.speechEventOffset: object expected"); message.speechEventOffset = $root.google.protobuf.Duration.fromObject(object.speechEventOffset, long + 1); } if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -41453,9 +42703,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options) { + StreamingRecognizeResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -41464,17 +42718,17 @@ object.metadata = null; object.speechEventOffset = null; } - if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) + if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.StreamingRecognitionResult.toObject(message.results[j], options); + object.results[j] = $root.google.cloud.speech.v2.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); } - if (message.speechEventOffset != null && message.hasOwnProperty("speechEventOffset")) - object.speechEventOffset = $root.google.protobuf.Duration.toObject(message.speechEventOffset, options); + if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) + object.speechEventOffset = $root.google.protobuf.Duration.toObject(message.speechEventOffset, options, q + 1); return object; }; @@ -41596,15 +42850,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Config.encode = function encode(message, writer) { + Config.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -41618,7 +42876,7 @@ * @returns {$protobuf.Writer} Writer */ Config.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41696,13 +42954,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; @@ -41721,6 +42979,8 @@ Config.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.Config) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.Config: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41731,7 +42991,7 @@ if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); if (object.updateTime != null) { - if (typeof object.updateTime !== "object") + if (!$util.isObject(object.updateTime)) throw TypeError(".google.cloud.speech.v2.Config.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } @@ -41747,21 +43007,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Config.toObject = function toObject(message, options) { + Config.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.kmsKeyName = ""; object.updateTime = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); return object; }; @@ -41847,9 +43111,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConfigRequest.encode = function encode(message, writer) { + GetConfigRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -41865,7 +43133,7 @@ * @returns {$protobuf.Writer} Writer */ GetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -41935,7 +43203,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -41952,6 +43220,8 @@ GetConfigRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetConfigRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.GetConfigRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41971,13 +43241,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConfigRequest.toObject = function toObject(message, options) { + GetConfigRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -42073,13 +43347,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConfigRequest.encode = function encode(message, writer) { + UpdateConfigRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.Config.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.Config.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -42093,7 +43371,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42167,12 +43445,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && message.hasOwnProperty("config")) { + if (message.config != null && Object.hasOwnProperty.call(message, "config")) { var error = $root.google.cloud.speech.v2.Config.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -42191,18 +43469,20 @@ UpdateConfigRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateConfigRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateConfigRequest(); if (object.config != null) { - if (typeof object.config !== "object") + if (!$util.isObject(object.config)) throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.Config.fromObject(object.config, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -42218,18 +43498,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateConfigRequest.toObject = function toObject(message, options) { + UpdateConfigRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.updateMask = null; } - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.speech.v2.Config.toObject(message.config, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + object.config = $root.google.cloud.speech.v2.Config.toObject(message.config, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); return object; }; @@ -42434,9 +43718,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer) { + CustomClass.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) @@ -42445,15 +43733,15 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v2.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -42480,7 +43768,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -42625,16 +43913,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.items != null && message.hasOwnProperty("items")) { + if (message.items != null && Object.hasOwnProperty.call(message, "items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -42643,7 +43931,7 @@ return "items." + error; } } - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -42652,27 +43940,27 @@ case 4: break; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -42680,16 +43968,16 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -42706,6 +43994,8 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomClass) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42722,7 +44012,7 @@ throw TypeError(".google.cloud.speech.v2.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") + if (!$util.isObject(object.items[i])) throw TypeError(".google.cloud.speech.v2.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v2.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -42748,27 +44038,27 @@ break; } if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.cloud.speech.v2.CustomClass.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (typeof object.updateTime !== "object") + if (!$util.isObject(object.updateTime)) throw TypeError(".google.cloud.speech.v2.CustomClass.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.cloud.speech.v2.CustomClass.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.cloud.speech.v2.CustomClass.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (typeof object.annotations !== "object") + if (!$util.isObject(object.annotations)) throw TypeError(".google.cloud.speech.v2.CustomClass.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -42797,9 +44087,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options) { + CustomClass.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -42819,25 +44113,25 @@ object.kmsKeyVersionName = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v2.CustomClass.ClassItem.toObject(message.items[j], options); - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + object.items[j] = $root.google.cloud.speech.v2.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); + } + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -42847,15 +44141,15 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) object.reconciling = message.reconciling; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.CustomClass.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.CustomClass.State[message.state] : message.state; return object; }; @@ -42939,9 +44233,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer) { + ClassItem.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -42957,7 +44255,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43027,7 +44325,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -43044,6 +44342,8 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomClass.ClassItem) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43063,13 +44363,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options) { + ClassItem.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -43303,28 +44607,32 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer) { + PhraseSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v2.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -43351,7 +44659,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43500,13 +44808,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.phrases != null && message.hasOwnProperty("phrases")) { + if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -43515,13 +44823,13 @@ return "phrases." + error; } } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) switch (message.state) { default: return "state: enum value expected"; @@ -43530,27 +44838,27 @@ case 4: break; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -43558,16 +44866,16 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -43584,6 +44892,8 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.PhraseSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43598,7 +44908,7 @@ throw TypeError(".google.cloud.speech.v2.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (typeof object.phrases[i] !== "object") + if (!$util.isObject(object.phrases[i])) throw TypeError(".google.cloud.speech.v2.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v2.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -43628,27 +44938,27 @@ break; } if (object.createTime != null) { - if (typeof object.createTime !== "object") + if (!$util.isObject(object.createTime)) throw TypeError(".google.cloud.speech.v2.PhraseSet.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (typeof object.updateTime !== "object") + if (!$util.isObject(object.updateTime)) throw TypeError(".google.cloud.speech.v2.PhraseSet.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") + if (!$util.isObject(object.deleteTime)) throw TypeError(".google.cloud.speech.v2.PhraseSet.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (typeof object.expireTime !== "object") + if (!$util.isObject(object.expireTime)) throw TypeError(".google.cloud.speech.v2.PhraseSet.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (typeof object.annotations !== "object") + if (!$util.isObject(object.annotations)) throw TypeError(".google.cloud.speech.v2.PhraseSet.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -43677,9 +44987,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options) { + PhraseSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -43700,27 +45014,27 @@ object.kmsKeyVersionName = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) object.uid = message.uid; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v2.PhraseSet.Phrase.toObject(message.phrases[j], options); + object.phrases[j] = $root.google.cloud.speech.v2.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); } - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -43730,15 +45044,15 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) object.reconciling = message.reconciling; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.state != null && message.hasOwnProperty("state")) + if (message.state != null && Object.hasOwnProperty.call(message, "state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.PhraseSet.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.PhraseSet.State[message.state] : message.state; return object; }; @@ -43831,9 +45145,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer) { + Phrase.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -43851,7 +45169,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -43925,10 +45243,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -43945,6 +45263,8 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.PhraseSet.Phrase) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43966,17 +45286,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options) { + Phrase.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.boost != null && message.hasOwnProperty("boost")) + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -44109,11 +45433,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer) { + CreateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) @@ -44133,7 +45461,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44215,18 +45543,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v2.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -44243,13 +45571,15 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreateCustomClassRequest(); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v2.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClass, long + 1); } @@ -44271,9 +45601,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options) { + CreateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; @@ -44281,13 +45615,13 @@ object.customClassId = ""; object.parent = ""; } - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.customClassId != null && message.hasOwnProperty("customClassId")) + if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) object.customClassId = message.customClassId; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; return object; }; @@ -44401,9 +45735,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer) { + ListCustomClassesRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -44425,7 +45763,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44507,16 +45845,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -44533,6 +45871,8 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListCustomClassesRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44558,9 +45898,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options) { + ListCustomClassesRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -44568,13 +45912,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -44671,12 +46015,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer) { + ListCustomClassesResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -44692,7 +46040,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -44768,7 +46116,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && message.hasOwnProperty("customClasses")) { + if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -44777,7 +46125,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -44794,6 +46142,8 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListCustomClassesResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44804,7 +46154,7 @@ throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (typeof object.customClasses[i] !== "object") + if (!$util.isObject(object.customClasses[i])) throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -44823,9 +46173,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options) { + ListCustomClassesResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -44834,9 +46188,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options); + object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -44923,9 +46277,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer) { + GetCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -44941,7 +46299,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45011,7 +46369,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -45028,6 +46386,8 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45047,13 +46407,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options) { + GetCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -45158,13 +46522,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer) { + UpdateCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -45180,7 +46548,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45258,17 +46626,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && message.hasOwnProperty("customClass")) { + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { var error = $root.google.cloud.speech.v2.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -45285,18 +46653,20 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateCustomClassRequest(); if (object.customClass != null) { - if (typeof object.customClass !== "object") + if (!$util.isObject(object.customClass)) throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -45314,20 +46684,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options) { + UpdateCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; object.validateOnly = false; } - if (message.customClass != null && message.hasOwnProperty("customClass")) - object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) + object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -45441,9 +46815,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer) { + DeleteCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -45465,7 +46843,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45547,16 +46925,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -45573,6 +46951,8 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeleteCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45598,9 +46978,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options) { + DeleteCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -45608,13 +46992,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -45719,9 +47103,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteCustomClassRequest.encode = function encode(message, writer) { + UndeleteCustomClassRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -45741,7 +47129,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -45819,13 +47207,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -45842,6 +47230,8 @@ UndeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeleteCustomClassRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UndeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45865,20 +47255,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteCustomClassRequest.toObject = function toObject(message, options) { + UndeleteCustomClassRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -45992,11 +47386,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer) { + CreatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) @@ -46016,7 +47414,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46098,18 +47496,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v2.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -46126,13 +47524,15 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreatePhraseSetRequest(); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v2.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -46154,9 +47554,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options) { + CreatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; @@ -46164,13 +47568,13 @@ object.phraseSetId = ""; object.parent = ""; } - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) + if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; return object; }; @@ -46284,9 +47688,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetsRequest.encode = function encode(message, writer) { + ListPhraseSetsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -46308,7 +47716,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46390,16 +47798,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -46416,6 +47824,8 @@ ListPhraseSetsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListPhraseSetsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListPhraseSetsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46441,9 +47851,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetsRequest.toObject = function toObject(message, options) { + ListPhraseSetsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -46451,13 +47865,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -46554,12 +47968,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetsResponse.encode = function encode(message, writer) { + ListPhraseSetsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -46575,7 +47993,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46651,7 +48069,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { + if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -46660,7 +48078,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -46677,6 +48095,8 @@ ListPhraseSetsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListPhraseSetsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46687,7 +48107,7 @@ throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (typeof object.phraseSets[i] !== "object") + if (!$util.isObject(object.phraseSets[i])) throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -46706,9 +48126,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetsResponse.toObject = function toObject(message, options) { + ListPhraseSetsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -46717,9 +48141,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSets[j], options); + object.phraseSets[j] = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSets[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -46806,9 +48230,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer) { + GetPhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -46824,7 +48252,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -46894,7 +48322,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -46911,6 +48339,8 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetPhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46930,13 +48360,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options) { + GetPhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -47041,13 +48475,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer) { + UpdatePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -47063,7 +48501,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47141,17 +48579,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { var error = $root.google.cloud.speech.v2.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -47168,18 +48606,20 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdatePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (typeof object.phraseSet !== "object") + if (!$util.isObject(object.phraseSet)) throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (typeof object.updateMask !== "object") + if (!$util.isObject(object.updateMask)) throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -47197,20 +48637,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options) { + UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; object.validateOnly = false; } - if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) - object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) + object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -47324,9 +48768,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer) { + DeletePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -47348,7 +48796,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47430,16 +48878,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -47456,6 +48904,8 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeletePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47481,9 +48931,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options) { + DeletePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -47491,13 +48945,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -47602,9 +49056,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeletePhraseSetRequest.encode = function encode(message, writer) { + UndeletePhraseSetRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -47624,7 +49082,7 @@ * @returns {$protobuf.Writer} Writer */ UndeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47702,13 +49160,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -47725,6 +49183,8 @@ UndeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeletePhraseSetRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.UndeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47748,20 +49208,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeletePhraseSetRequest.toObject = function toObject(message, options) { + UndeletePhraseSetRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) object.etag = message.etag; return object; }; @@ -47857,9 +49321,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelFeature.encode = function encode(message, writer) { + ModelFeature.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.feature); if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) @@ -47877,7 +49345,7 @@ * @returns {$protobuf.Writer} Writer */ ModelFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -47951,10 +49419,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.feature != null && message.hasOwnProperty("feature")) + if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) if (!$util.isString(message.feature)) return "feature: string expected"; - if (message.releaseState != null && message.hasOwnProperty("releaseState")) + if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) if (!$util.isString(message.releaseState)) return "releaseState: string expected"; return null; @@ -47971,6 +49439,8 @@ ModelFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelFeature) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ModelFeature: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47992,17 +49462,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelFeature.toObject = function toObject(message, options) { + ModelFeature.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.feature = ""; object.releaseState = ""; } - if (message.feature != null && message.hasOwnProperty("feature")) + if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) object.feature = message.feature; - if (message.releaseState != null && message.hasOwnProperty("releaseState")) + if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) object.releaseState = message.releaseState; return object; }; @@ -48090,12 +49564,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelFeatures.encode = function encode(message, writer) { + ModelFeatures.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.modelFeature != null && message.modelFeature.length) for (var i = 0; i < message.modelFeature.length; ++i) - $root.google.cloud.speech.v2.ModelFeature.encode(message.modelFeature[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.ModelFeature.encode(message.modelFeature[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -48109,7 +49587,7 @@ * @returns {$protobuf.Writer} Writer */ ModelFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48181,7 +49659,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.modelFeature != null && message.hasOwnProperty("modelFeature")) { + if (message.modelFeature != null && Object.hasOwnProperty.call(message, "modelFeature")) { if (!Array.isArray(message.modelFeature)) return "modelFeature: array expected"; for (var i = 0; i < message.modelFeature.length; ++i) { @@ -48204,6 +49682,8 @@ ModelFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelFeatures) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ModelFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48214,7 +49694,7 @@ throw TypeError(".google.cloud.speech.v2.ModelFeatures.modelFeature: array expected"); message.modelFeature = []; for (var i = 0; i < object.modelFeature.length; ++i) { - if (typeof object.modelFeature[i] !== "object") + if (!$util.isObject(object.modelFeature[i])) throw TypeError(".google.cloud.speech.v2.ModelFeatures.modelFeature: object expected"); message.modelFeature[i] = $root.google.cloud.speech.v2.ModelFeature.fromObject(object.modelFeature[i], long + 1); } @@ -48231,16 +49711,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelFeatures.toObject = function toObject(message, options) { + ModelFeatures.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.modelFeature = []; if (message.modelFeature && message.modelFeature.length) { object.modelFeature = []; for (var j = 0; j < message.modelFeature.length; ++j) - object.modelFeature[j] = $root.google.cloud.speech.v2.ModelFeature.toObject(message.modelFeature[j], options); + object.modelFeature[j] = $root.google.cloud.speech.v2.ModelFeature.toObject(message.modelFeature[j], options, q + 1); } return object; }; @@ -48328,13 +49812,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelMetadata.encode = function encode(message, writer) { + ModelMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.modelFeatures != null && Object.hasOwnProperty.call(message, "modelFeatures")) for (var keys = Object.keys(message.modelFeatures), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.ModelFeatures.encode(message.modelFeatures[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.cloud.speech.v2.ModelFeatures.encode(message.modelFeatures[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -48349,7 +49837,7 @@ * @returns {$protobuf.Writer} Writer */ ModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48440,7 +49928,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.modelFeatures != null && message.hasOwnProperty("modelFeatures")) { + if (message.modelFeatures != null && Object.hasOwnProperty.call(message, "modelFeatures")) { if (!$util.isObject(message.modelFeatures)) return "modelFeatures: object expected"; var key = Object.keys(message.modelFeatures); @@ -48464,19 +49952,21 @@ ModelMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.ModelMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.ModelMetadata(); if (object.modelFeatures) { - if (typeof object.modelFeatures !== "object") + if (!$util.isObject(object.modelFeatures)) throw TypeError(".google.cloud.speech.v2.ModelMetadata.modelFeatures: object expected"); message.modelFeatures = {}; for (var keys = Object.keys(object.modelFeatures), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.modelFeatures, keys[i]); - if (typeof object.modelFeatures[keys[i]] !== "object") + if (!$util.isObject(object.modelFeatures[keys[i]])) throw TypeError(".google.cloud.speech.v2.ModelMetadata.modelFeatures: object expected"); message.modelFeatures[keys[i]] = $root.google.cloud.speech.v2.ModelFeatures.fromObject(object.modelFeatures[keys[i]], long + 1); } @@ -48493,9 +49983,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelMetadata.toObject = function toObject(message, options) { + ModelMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.modelFeatures = {}; @@ -48505,7 +49999,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.modelFeatures, keys2[j]); - object.modelFeatures[keys2[j]] = $root.google.cloud.speech.v2.ModelFeatures.toObject(message.modelFeatures[keys2[j]], options); + object.modelFeatures[keys2[j]] = $root.google.cloud.speech.v2.ModelFeatures.toObject(message.modelFeatures[keys2[j]], options, q + 1); } } return object; @@ -48594,13 +50088,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LanguageMetadata.encode = function encode(message, writer) { + LanguageMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.models != null && Object.hasOwnProperty.call(message, "models")) for (var keys = Object.keys(message.models), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.ModelMetadata.encode(message.models[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + $root.google.cloud.speech.v2.ModelMetadata.encode(message.models[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); } return writer; }; @@ -48615,7 +50113,7 @@ * @returns {$protobuf.Writer} Writer */ LanguageMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48706,7 +50204,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.models != null && message.hasOwnProperty("models")) { + if (message.models != null && Object.hasOwnProperty.call(message, "models")) { if (!$util.isObject(message.models)) return "models: object expected"; var key = Object.keys(message.models); @@ -48730,19 +50228,21 @@ LanguageMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.LanguageMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.LanguageMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.LanguageMetadata(); if (object.models) { - if (typeof object.models !== "object") + if (!$util.isObject(object.models)) throw TypeError(".google.cloud.speech.v2.LanguageMetadata.models: object expected"); message.models = {}; for (var keys = Object.keys(object.models), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.models, keys[i]); - if (typeof object.models[keys[i]] !== "object") + if (!$util.isObject(object.models[keys[i]])) throw TypeError(".google.cloud.speech.v2.LanguageMetadata.models: object expected"); message.models[keys[i]] = $root.google.cloud.speech.v2.ModelMetadata.fromObject(object.models[keys[i]], long + 1); } @@ -48759,9 +50259,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LanguageMetadata.toObject = function toObject(message, options) { + LanguageMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.models = {}; @@ -48771,7 +50275,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.models, keys2[j]); - object.models[keys2[j]] = $root.google.cloud.speech.v2.ModelMetadata.toObject(message.models[keys2[j]], options); + object.models[keys2[j]] = $root.google.cloud.speech.v2.ModelMetadata.toObject(message.models[keys2[j]], options, q + 1); } } return object; @@ -48859,9 +50363,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccessMetadata.encode = function encode(message, writer) { + AccessMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.constraintType); return writer; @@ -48877,7 +50385,7 @@ * @returns {$protobuf.Writer} Writer */ AccessMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -48947,7 +50455,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.constraintType != null && message.hasOwnProperty("constraintType")) + if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) switch (message.constraintType) { default: return "constraintType: enum value expected"; @@ -48969,6 +50477,8 @@ AccessMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.AccessMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.AccessMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49002,13 +50512,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AccessMetadata.toObject = function toObject(message, options) { + AccessMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.constraintType = options.enums === String ? "CONSTRAINT_TYPE_UNSPECIFIED" : 0; - if (message.constraintType != null && message.hasOwnProperty("constraintType")) + if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) object.constraintType = options.enums === String ? $root.google.cloud.speech.v2.AccessMetadata.ConstraintType[message.constraintType] === undefined ? message.constraintType : $root.google.cloud.speech.v2.AccessMetadata.ConstraintType[message.constraintType] : message.constraintType; return object; }; @@ -49118,13 +50632,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationsMetadata.encode = function encode(message, writer) { + LocationsMetadata.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) - $root.google.cloud.speech.v2.LanguageMetadata.encode(message.languages, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.speech.v2.LanguageMetadata.encode(message.languages, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) - $root.google.cloud.speech.v2.AccessMetadata.encode(message.accessMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.speech.v2.AccessMetadata.encode(message.accessMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -49138,7 +50656,7 @@ * @returns {$protobuf.Writer} Writer */ LocationsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49212,12 +50730,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.languages != null && message.hasOwnProperty("languages")) { + if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) { var error = $root.google.cloud.speech.v2.LanguageMetadata.verify(message.languages, long + 1); if (error) return "languages." + error; } - if (message.accessMetadata != null && message.hasOwnProperty("accessMetadata")) { + if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) { var error = $root.google.cloud.speech.v2.AccessMetadata.verify(message.accessMetadata, long + 1); if (error) return "accessMetadata." + error; @@ -49236,18 +50754,20 @@ LocationsMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.LocationsMetadata) return object; + if (!$util.isObject(object)) + throw TypeError(".google.cloud.speech.v2.LocationsMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.LocationsMetadata(); if (object.languages != null) { - if (typeof object.languages !== "object") + if (!$util.isObject(object.languages)) throw TypeError(".google.cloud.speech.v2.LocationsMetadata.languages: object expected"); message.languages = $root.google.cloud.speech.v2.LanguageMetadata.fromObject(object.languages, long + 1); } if (object.accessMetadata != null) { - if (typeof object.accessMetadata !== "object") + if (!$util.isObject(object.accessMetadata)) throw TypeError(".google.cloud.speech.v2.LocationsMetadata.accessMetadata: object expected"); message.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.fromObject(object.accessMetadata, long + 1); } @@ -49263,18 +50783,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationsMetadata.toObject = function toObject(message, options) { + LocationsMetadata.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.languages = null; object.accessMetadata = null; } - if (message.languages != null && message.hasOwnProperty("languages")) - object.languages = $root.google.cloud.speech.v2.LanguageMetadata.toObject(message.languages, options); - if (message.accessMetadata != null && message.hasOwnProperty("accessMetadata")) - object.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.toObject(message.accessMetadata, options); + if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) + object.languages = $root.google.cloud.speech.v2.LanguageMetadata.toObject(message.languages, options, q + 1); + if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) + object.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.toObject(message.accessMetadata, options, q + 1); return object; }; @@ -49388,12 +50912,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + Http.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; @@ -49409,7 +50937,7 @@ * @returns {$protobuf.Writer} Writer */ Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49485,7 +51013,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && message.hasOwnProperty("rules")) { + if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -49494,7 +51022,7 @@ return "rules." + error; } } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) if (typeof message.fullyDecodeReservedExpansion !== "boolean") return "fullyDecodeReservedExpansion: boolean expected"; return null; @@ -49511,6 +51039,8 @@ Http.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Http) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Http: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49521,7 +51051,7 @@ throw TypeError(".google.api.Http.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") + if (!$util.isObject(object.rules[i])) throw TypeError(".google.api.Http.rules: object expected"); message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); } @@ -49540,9 +51070,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; @@ -49551,9 +51085,9 @@ if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options, q + 1); } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; @@ -49736,9 +51270,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.get != null && Object.hasOwnProperty.call(message, "get")) @@ -49754,10 +51292,10 @@ if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; @@ -49773,7 +51311,7 @@ * @returns {$protobuf.Writer} Writer */ HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -49882,43 +51420,43 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { properties.pattern = 1; if (!$util.isString(message.get)) return "get: string expected"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.put)) return "put: string expected"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.post)) return "post: string expected"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message["delete"])) return "delete: string expected"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.patch)) return "patch: string expected"; } - if (message.custom != null && message.hasOwnProperty("custom")) { + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; @@ -49928,13 +51466,13 @@ return "custom." + error; } } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) if (!$util.isString(message.body)) return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) if (!$util.isString(message.responseBody)) return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { if (!Array.isArray(message.additionalBindings)) return "additionalBindings: array expected"; for (var i = 0; i < message.additionalBindings.length; ++i) { @@ -49957,6 +51495,8 @@ HttpRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.HttpRule) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.HttpRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49975,7 +51515,7 @@ if (object.patch != null) message.patch = String(object.patch); if (object.custom != null) { - if (typeof object.custom !== "object") + if (!$util.isObject(object.custom)) throw TypeError(".google.api.HttpRule.custom: object expected"); message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); } @@ -49988,7 +51528,7 @@ throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); message.additionalBindings = []; for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") + if (!$util.isObject(object.additionalBindings[i])) throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); } @@ -50005,9 +51545,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.additionalBindings = []; @@ -50016,46 +51560,46 @@ object.body = ""; object.responseBody = ""; } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { + if (message.get != null && Object.hasOwnProperty.call(message, "get")) { object.get = message.get; if (options.oneofs) object.pattern = "get"; } - if (message.put != null && message.hasOwnProperty("put")) { + if (message.put != null && Object.hasOwnProperty.call(message, "put")) { object.put = message.put; if (options.oneofs) object.pattern = "put"; } - if (message.post != null && message.hasOwnProperty("post")) { + if (message.post != null && Object.hasOwnProperty.call(message, "post")) { object.post = message.post; if (options.oneofs) object.pattern = "post"; } - if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { object["delete"] = message["delete"]; if (options.oneofs) object.pattern = "delete"; } - if (message.patch != null && message.hasOwnProperty("patch")) { + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { object.patch = message.patch; if (options.oneofs) object.pattern = "patch"; } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); if (options.oneofs) object.pattern = "custom"; } if (message.additionalBindings && message.additionalBindings.length) { object.additionalBindings = []; for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options, q + 1); } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) object.responseBody = message.responseBody; return object; }; @@ -50151,9 +51695,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); if (message.path != null && Object.hasOwnProperty.call(message, "path")) @@ -50171,7 +51719,7 @@ * @returns {$protobuf.Writer} Writer */ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50245,10 +51793,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) if (!$util.isString(message.kind)) return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -50265,6 +51813,8 @@ CustomHttpPattern.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CustomHttpPattern) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CustomHttpPattern: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50286,17 +51836,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.kind = ""; object.path = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) object.path = message.path; return object; }; @@ -50402,9 +51956,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + CommonLanguageSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); if (message.destinations != null && message.destinations.length) { @@ -50414,7 +51972,7 @@ writer.ldelim(); } if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -50428,7 +51986,7 @@ * @returns {$protobuf.Writer} Writer */ CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50513,10 +52071,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) if (!$util.isString(message.referenceDocsUri)) return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (message.destinations != null && Object.hasOwnProperty.call(message, "destinations")) { if (!Array.isArray(message.destinations)) return "destinations: array expected"; for (var i = 0; i < message.destinations.length; ++i) @@ -50529,7 +52087,7 @@ break; } } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) { var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); if (error) return "selectiveGapicGeneration." + error; @@ -50548,6 +52106,8 @@ CommonLanguageSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CommonLanguageSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CommonLanguageSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50581,7 +52141,7 @@ } } if (object.selectiveGapicGeneration != null) { - if (typeof object.selectiveGapicGeneration !== "object") + if (!$util.isObject(object.selectiveGapicGeneration)) throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); } @@ -50597,9 +52157,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.destinations = []; @@ -50607,15 +52171,15 @@ object.referenceDocsUri = ""; object.selectiveGapicGeneration = null; } - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { object.destinations = []; for (var j = 0; j < message.destinations.length; ++j) object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) - object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options, q + 1); return object; }; @@ -50791,9 +52355,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + ClientLibrarySettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) @@ -50801,21 +52369,21 @@ if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork(), q + 1).ldelim(); if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork(), q + 1).ldelim(); if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork(), q + 1).ldelim(); if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork(), q + 1).ldelim(); return writer; }; @@ -50829,7 +52397,7 @@ * @returns {$protobuf.Writer} Writer */ ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -50939,10 +52507,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) if (!$util.isString(message.version)) return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) switch (message.launchStage) { default: return "launchStage: enum value expected"; @@ -50956,45 +52524,45 @@ case 5: break; } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) if (typeof message.restNumericEnums !== "boolean") return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) { var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); if (error) return "javaSettings." + error; } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) { var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); if (error) return "cppSettings." + error; } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) { var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); if (error) return "phpSettings." + error; } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) { var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); if (error) return "pythonSettings." + error; } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) { var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); if (error) return "nodeSettings." + error; } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) { var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); if (error) return "dotnetSettings." + error; } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) { var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); if (error) return "rubySettings." + error; } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) { var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); if (error) return "goSettings." + error; @@ -51013,6 +52581,8 @@ ClientLibrarySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ClientLibrarySettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ClientLibrarySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51063,42 +52633,42 @@ if (object.restNumericEnums != null) message.restNumericEnums = Boolean(object.restNumericEnums); if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") + if (!$util.isObject(object.javaSettings)) throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); } if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") + if (!$util.isObject(object.cppSettings)) throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); } if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") + if (!$util.isObject(object.phpSettings)) throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); } if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") + if (!$util.isObject(object.pythonSettings)) throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); } if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") + if (!$util.isObject(object.nodeSettings)) throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); } if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") + if (!$util.isObject(object.dotnetSettings)) throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); } if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") + if (!$util.isObject(object.rubySettings)) throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); } if (object.goSettings != null) { - if (typeof object.goSettings !== "object") + if (!$util.isObject(object.goSettings)) throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); } @@ -51114,9 +52684,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + ClientLibrarySettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = ""; @@ -51131,28 +52705,28 @@ object.rubySettings = null; object.goSettings = null; } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && Object.hasOwnProperty.call(message, "version")) object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options, q + 1); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options, q + 1); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options, q + 1); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options, q + 1); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options, q + 1); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options, q + 1); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options, q + 1); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options, q + 1); return object; }; @@ -51331,12 +52905,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + Publishing.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.methodSettings != null && message.methodSettings.length) for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) @@ -51354,7 +52932,7 @@ writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); if (message.librarySettings != null && message.librarySettings.length) for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork(), q + 1).ldelim(); if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) @@ -51372,7 +52950,7 @@ * @returns {$protobuf.Writer} Writer */ Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51488,7 +53066,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (message.methodSettings != null && Object.hasOwnProperty.call(message, "methodSettings")) { if (!Array.isArray(message.methodSettings)) return "methodSettings: array expected"; for (var i = 0; i < message.methodSettings.length; ++i) { @@ -51497,29 +53075,29 @@ return "methodSettings." + error; } } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) if (!$util.isString(message.newIssueUri)) return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) if (!$util.isString(message.documentationUri)) return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) if (!$util.isString(message.apiShortName)) return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) if (!$util.isString(message.githubLabel)) return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (message.codeownerGithubTeams != null && Object.hasOwnProperty.call(message, "codeownerGithubTeams")) { if (!Array.isArray(message.codeownerGithubTeams)) return "codeownerGithubTeams: array expected"; for (var i = 0; i < message.codeownerGithubTeams.length; ++i) if (!$util.isString(message.codeownerGithubTeams[i])) return "codeownerGithubTeams: string[] expected"; } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) if (!$util.isString(message.docTagPrefix)) return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) switch (message.organization) { default: return "organization: enum value expected"; @@ -51533,7 +53111,7 @@ case 7: break; } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (message.librarySettings != null && Object.hasOwnProperty.call(message, "librarySettings")) { if (!Array.isArray(message.librarySettings)) return "librarySettings: array expected"; for (var i = 0; i < message.librarySettings.length; ++i) { @@ -51542,10 +53120,10 @@ return "librarySettings." + error; } } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) if (!$util.isString(message.protoReferenceDocumentationUri)) return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) if (!$util.isString(message.restReferenceDocumentationUri)) return "restReferenceDocumentationUri: string expected"; return null; @@ -51562,6 +53140,8 @@ Publishing.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Publishing) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.Publishing: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51572,7 +53152,7 @@ throw TypeError(".google.api.Publishing.methodSettings: array expected"); message.methodSettings = []; for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") + if (!$util.isObject(object.methodSettings[i])) throw TypeError(".google.api.Publishing.methodSettings: object expected"); message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); } @@ -51639,7 +53219,7 @@ throw TypeError(".google.api.Publishing.librarySettings: array expected"); message.librarySettings = []; for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") + if (!$util.isObject(object.librarySettings[i])) throw TypeError(".google.api.Publishing.librarySettings: object expected"); message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); } @@ -51660,9 +53240,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + Publishing.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.methodSettings = []; @@ -51682,33 +53266,33 @@ if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options, q + 1); } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) object.githubLabel = message.githubLabel; if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { object.codeownerGithubTeams = []; for (var j = 0; j < message.codeownerGithubTeams.length; ++j) object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; if (message.librarySettings && message.librarySettings.length) { object.librarySettings = []; for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options, q + 1); } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; @@ -51814,16 +53398,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + JavaSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -51837,7 +53425,7 @@ * @returns {$protobuf.Writer} Writer */ JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -51936,10 +53524,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) if (!$util.isString(message.libraryPackage)) return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) { if (!$util.isObject(message.serviceClassNames)) return "serviceClassNames: object expected"; var key = Object.keys(message.serviceClassNames); @@ -51947,7 +53535,7 @@ if (!$util.isString(message.serviceClassNames[key[i]])) return "serviceClassNames: string{k:string} expected"; } - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -51966,6 +53554,8 @@ JavaSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.JavaSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.JavaSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51974,7 +53564,7 @@ if (object.libraryPackage != null) message.libraryPackage = String(object.libraryPackage); if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") + if (!$util.isObject(object.serviceClassNames)) throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); message.serviceClassNames = {}; for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { @@ -51984,7 +53574,7 @@ } } if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.JavaSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -52000,9 +53590,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + JavaSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.serviceClassNames = {}; @@ -52010,7 +53604,7 @@ object.libraryPackage = ""; object.common = null; } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) object.libraryPackage = message.libraryPackage; var keys2; if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { @@ -52021,8 +53615,8 @@ object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; } } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -52108,11 +53702,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + CppSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -52126,7 +53724,7 @@ * @returns {$protobuf.Writer} Writer */ CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52196,7 +53794,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -52215,13 +53813,15 @@ CppSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CppSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.CppSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.CppSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.CppSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -52237,14 +53837,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + CppSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -52330,11 +53934,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer) { + PhpSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -52348,7 +53956,7 @@ * @returns {$protobuf.Writer} Writer */ PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52418,7 +54026,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -52437,13 +54045,15 @@ PhpSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PhpSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PhpSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PhpSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.PhpSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -52459,14 +54069,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhpSettings.toObject = function toObject(message, options) { + PhpSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -52561,13 +54175,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, writer) { + PythonSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -52581,7 +54199,7 @@ * @returns {$protobuf.Writer} Writer */ PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52655,12 +54273,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) { var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); if (error) return "experimentalFeatures." + error; @@ -52679,18 +54297,20 @@ PythonSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PythonSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.experimentalFeatures != null) { - if (typeof object.experimentalFeatures !== "object") + if (!$util.isObject(object.experimentalFeatures)) throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); } @@ -52706,18 +54326,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options) { + PythonSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.common = null; object.experimentalFeatures = null; } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) - object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options, q + 1); return object; }; @@ -52818,9 +54442,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExperimentalFeatures.encode = function encode(message, writer) { + ExperimentalFeatures.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) @@ -52840,7 +54468,7 @@ * @returns {$protobuf.Writer} Writer */ ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -52918,13 +54546,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) if (typeof message.restAsyncIoEnabled !== "boolean") return "restAsyncIoEnabled: boolean expected"; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) if (typeof message.protobufPythonicTypesEnabled !== "boolean") return "protobufPythonicTypesEnabled: boolean expected"; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) if (typeof message.unversionedPackageDisabled !== "boolean") return "unversionedPackageDisabled: boolean expected"; return null; @@ -52941,6 +54569,8 @@ ExperimentalFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52964,20 +54594,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExperimentalFeatures.toObject = function toObject(message, options) { + ExperimentalFeatures.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.restAsyncIoEnabled = false; object.protobufPythonicTypesEnabled = false; object.unversionedPackageDisabled = false; } - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) object.restAsyncIoEnabled = message.restAsyncIoEnabled; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) object.unversionedPackageDisabled = message.unversionedPackageDisabled; return object; }; @@ -53067,11 +54701,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + NodeSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -53085,7 +54723,7 @@ * @returns {$protobuf.Writer} Writer */ NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53155,7 +54793,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -53174,13 +54812,15 @@ NodeSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.NodeSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.NodeSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.NodeSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.NodeSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -53196,14 +54836,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + NodeSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -53339,11 +54983,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, writer) { + DotnetSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -53372,7 +55020,7 @@ * @returns {$protobuf.Writer} Writer */ DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53510,12 +55158,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -53523,7 +55171,7 @@ if (!$util.isString(message.renamedServices[key[i]])) return "renamedServices: string{k:string} expected"; } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) { if (!$util.isObject(message.renamedResources)) return "renamedResources: object expected"; var key = Object.keys(message.renamedResources); @@ -53531,21 +55179,21 @@ if (!$util.isString(message.renamedResources[key[i]])) return "renamedResources: string{k:string} expected"; } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (message.ignoredResources != null && Object.hasOwnProperty.call(message, "ignoredResources")) { if (!Array.isArray(message.ignoredResources)) return "ignoredResources: array expected"; for (var i = 0; i < message.ignoredResources.length; ++i) if (!$util.isString(message.ignoredResources[i])) return "ignoredResources: string[] expected"; } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (message.forcedNamespaceAliases != null && Object.hasOwnProperty.call(message, "forcedNamespaceAliases")) { if (!Array.isArray(message.forcedNamespaceAliases)) return "forcedNamespaceAliases: array expected"; for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) if (!$util.isString(message.forcedNamespaceAliases[i])) return "forcedNamespaceAliases: string[] expected"; } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (message.handwrittenSignatures != null && Object.hasOwnProperty.call(message, "handwrittenSignatures")) { if (!Array.isArray(message.handwrittenSignatures)) return "handwrittenSignatures: array expected"; for (var i = 0; i < message.handwrittenSignatures.length; ++i) @@ -53566,18 +55214,20 @@ DotnetSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.DotnetSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.DotnetSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.DotnetSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (typeof object.renamedServices !== "object") + if (!$util.isObject(object.renamedServices)) throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -53587,7 +55237,7 @@ } } if (object.renamedResources) { - if (typeof object.renamedResources !== "object") + if (!$util.isObject(object.renamedResources)) throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); message.renamedResources = {}; for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { @@ -53629,9 +55279,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options) { + DotnetSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ignoredResources = []; @@ -53644,8 +55298,8 @@ } if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -53763,11 +55417,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + RubySettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -53781,7 +55439,7 @@ * @returns {$protobuf.Writer} Writer */ RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -53851,7 +55509,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -53870,13 +55528,15 @@ RubySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.RubySettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.RubySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.RubySettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.RubySettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -53892,14 +55552,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + RubySettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); return object; }; @@ -53995,11 +55659,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + GoSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -54016,7 +55684,7 @@ * @returns {$protobuf.Writer} Writer */ GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54111,12 +55779,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && message.hasOwnProperty("common")) { + if (message.common != null && Object.hasOwnProperty.call(message, "common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -54138,18 +55806,20 @@ GoSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.GoSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.GoSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.GoSettings(); if (object.common != null) { - if (typeof object.common !== "object") + if (!$util.isObject(object.common)) throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (typeof object.renamedServices !== "object") + if (!$util.isObject(object.renamedServices)) throw TypeError(".google.api.GoSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -54170,16 +55840,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + GoSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.renamedServices = {}; if (options.defaults) object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -54293,13 +55967,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + MethodSettings.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) for (var i = 0; i < message.autoPopulatedFields.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); @@ -54316,7 +55994,7 @@ * @returns {$protobuf.Writer} Writer */ MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54396,15 +56074,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) { var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); if (error) return "longRunning." + error; } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (message.autoPopulatedFields != null && Object.hasOwnProperty.call(message, "autoPopulatedFields")) { if (!Array.isArray(message.autoPopulatedFields)) return "autoPopulatedFields: array expected"; for (var i = 0; i < message.autoPopulatedFields.length; ++i) @@ -54425,6 +56103,8 @@ MethodSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54433,7 +56113,7 @@ if (object.selector != null) message.selector = String(object.selector); if (object.longRunning != null) { - if (typeof object.longRunning !== "object") + if (!$util.isObject(object.longRunning)) throw TypeError(".google.api.MethodSettings.longRunning: object expected"); message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); } @@ -54456,9 +56136,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + MethodSettings.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.autoPopulatedFields = []; @@ -54466,10 +56150,10 @@ object.selector = ""; object.longRunning = null; } - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options, q + 1); if (message.autoPopulatedFields && message.autoPopulatedFields.length) { object.autoPopulatedFields = []; for (var j = 0; j < message.autoPopulatedFields.length; ++j) @@ -54584,17 +56268,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunning.encode = function encode(message, writer) { + LongRunning.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); return writer; }; @@ -54608,7 +56296,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -54690,20 +56378,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); if (error) return "initialPollDelay." + error; } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) if (typeof message.pollDelayMultiplier !== "number") return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); if (error) return "maxPollDelay." + error; } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) { var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); if (error) return "totalPollTimeout." + error; @@ -54722,25 +56410,27 @@ LongRunning.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings.LongRunning) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.MethodSettings.LongRunning: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.MethodSettings.LongRunning(); if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") + if (!$util.isObject(object.initialPollDelay)) throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); } if (object.pollDelayMultiplier != null) message.pollDelayMultiplier = Number(object.pollDelayMultiplier); if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") + if (!$util.isObject(object.maxPollDelay)) throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); } if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") + if (!$util.isObject(object.totalPollTimeout)) throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); } @@ -54756,9 +56446,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunning.toObject = function toObject(message, options) { + LongRunning.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.initialPollDelay = null; @@ -54766,14 +56460,14 @@ object.maxPollDelay = null; object.totalPollTimeout = null; } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options, q + 1); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options, q + 1); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options, q + 1); return object; }; @@ -54914,9 +56608,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SelectiveGapicGeneration.encode = function encode(message, writer) { + SelectiveGapicGeneration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.methods != null && message.methods.length) for (var i = 0; i < message.methods.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); @@ -54935,7 +56633,7 @@ * @returns {$protobuf.Writer} Writer */ SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55011,14 +56709,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methods != null && message.hasOwnProperty("methods")) { + if (message.methods != null && Object.hasOwnProperty.call(message, "methods")) { if (!Array.isArray(message.methods)) return "methods: array expected"; for (var i = 0; i < message.methods.length; ++i) if (!$util.isString(message.methods[i])) return "methods: string[] expected"; } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) if (typeof message.generateOmittedAsInternal !== "boolean") return "generateOmittedAsInternal: boolean expected"; return null; @@ -55035,6 +56733,8 @@ SelectiveGapicGeneration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.SelectiveGapicGeneration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.SelectiveGapicGeneration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55061,9 +56761,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SelectiveGapicGeneration.toObject = function toObject(message, options) { + SelectiveGapicGeneration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.methods = []; @@ -55074,7 +56778,7 @@ for (var j = 0; j < message.methods.length; ++j) object.methods[j] = message.methods[j]; } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) object.generateOmittedAsInternal = message.generateOmittedAsInternal; return object; }; @@ -55271,9 +56975,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.pattern != null && message.pattern.length) @@ -55306,7 +57014,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55409,20 +57117,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) { if (!Array.isArray(message.pattern)) return "pattern: array expected"; for (var i = 0; i < message.pattern.length; ++i) if (!$util.isString(message.pattern[i])) return "pattern: string[] expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) if (!$util.isString(message.nameField)) return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(message, "history")) switch (message.history) { default: return "history: enum value expected"; @@ -55431,13 +57139,13 @@ case 2: break; } - if (message.plural != null && message.hasOwnProperty("plural")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) if (!$util.isString(message.plural)) return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) if (!$util.isString(message.singular)) return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { + if (message.style != null && Object.hasOwnProperty.call(message, "style")) { if (!Array.isArray(message.style)) return "style: array expected"; for (var i = 0; i < message.style.length; ++i) @@ -55463,6 +57171,8 @@ ResourceDescriptor.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceDescriptor) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceDescriptor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55536,9 +57246,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.pattern = []; @@ -55551,20 +57265,20 @@ object.plural = ""; object.singular = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; if (message.pattern && message.pattern.length) { object.pattern = []; for (var j = 0; j < message.pattern.length; ++j) object.pattern[j] = message.pattern[j]; } - if (message.nameField != null && message.hasOwnProperty("nameField")) + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) + if (message.history != null && Object.hasOwnProperty.call(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")) + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) object.singular = message.singular; if (message.style && message.style.length) { object.style = []; @@ -55695,9 +57409,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) @@ -55715,7 +57433,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -55789,10 +57507,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) if (!$util.isString(message.childType)) return "childType: string expected"; return null; @@ -55809,6 +57527,8 @@ ResourceReference.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceReference) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.ResourceReference: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -55830,17 +57550,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type = ""; object.childType = ""; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) object.childType = message.childType; return object; }; @@ -55937,14 +57661,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldInfo.encode = function encode(message, writer) { + FieldInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); if (message.referencedTypes != null && message.referencedTypes.length) for (var i = 0; i < message.referencedTypes.length; ++i) - $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -55958,7 +57686,7 @@ * @returns {$protobuf.Writer} Writer */ FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56034,7 +57762,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.format != null && message.hasOwnProperty("format")) + if (message.format != null && Object.hasOwnProperty.call(message, "format")) switch (message.format) { default: return "format: enum value expected"; @@ -56045,7 +57773,7 @@ case 4: break; } - if (message.referencedTypes != null && message.hasOwnProperty("referencedTypes")) { + if (message.referencedTypes != null && Object.hasOwnProperty.call(message, "referencedTypes")) { if (!Array.isArray(message.referencedTypes)) return "referencedTypes: array expected"; for (var i = 0; i < message.referencedTypes.length; ++i) { @@ -56068,6 +57796,8 @@ FieldInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.FieldInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.FieldInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56106,7 +57836,7 @@ throw TypeError(".google.api.FieldInfo.referencedTypes: array expected"); message.referencedTypes = []; for (var i = 0; i < object.referencedTypes.length; ++i) { - if (typeof object.referencedTypes[i] !== "object") + if (!$util.isObject(object.referencedTypes[i])) throw TypeError(".google.api.FieldInfo.referencedTypes: object expected"); message.referencedTypes[i] = $root.google.api.TypeReference.fromObject(object.referencedTypes[i], long + 1); } @@ -56123,20 +57853,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldInfo.toObject = function toObject(message, options) { + FieldInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.referencedTypes = []; if (options.defaults) object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) + if (message.format != null && Object.hasOwnProperty.call(message, "format")) object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; if (message.referencedTypes && message.referencedTypes.length) { object.referencedTypes = []; for (var j = 0; j < message.referencedTypes.length; ++j) - object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options); + object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options, q + 1); } return object; }; @@ -56243,9 +57977,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypeReference.encode = function encode(message, writer) { + TypeReference.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeName); return writer; @@ -56261,7 +57999,7 @@ * @returns {$protobuf.Writer} Writer */ TypeReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56331,7 +58069,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; return null; @@ -56348,6 +58086,8 @@ TypeReference.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.TypeReference) return object; + if (!$util.isObject(object)) + throw TypeError(".google.api.TypeReference: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56367,13 +58107,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TypeReference.toObject = function toObject(message, options) { + TypeReference.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.typeName = ""; - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) object.typeName = message.typeName; return object; }; @@ -56473,12 +58217,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileDescriptorSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -56492,7 +58240,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -56564,7 +58312,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.file != null && message.hasOwnProperty("file")) { + if (message.file != null && Object.hasOwnProperty.call(message, "file")) { if (!Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { @@ -56587,6 +58335,8 @@ FileDescriptorSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56597,7 +58347,7 @@ throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); message.file = []; for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") + if (!$util.isObject(object.file[i])) throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); } @@ -56614,16 +58364,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { object.file = []; for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, q + 1); } return object; }; @@ -56869,9 +58623,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) @@ -56881,20 +58639,20 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.messageType != null && message.messageType.length) for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); @@ -56921,7 +58679,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57069,41 +58827,41 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { if (!Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { if (!Array.isArray(message.publicDependency)) return "publicDependency: array expected"; for (var i = 0; i < message.publicDependency.length; ++i) if (!$util.isInteger(message.publicDependency[i])) return "publicDependency: integer[] expected"; } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { if (!Array.isArray(message.weakDependency)) return "weakDependency: array expected"; for (var i = 0; i < message.weakDependency.length; ++i) if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } - if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { if (!Array.isArray(message.optionDependency)) return "optionDependency: array expected"; for (var i = 0; i < message.optionDependency.length; ++i) if (!$util.isString(message.optionDependency[i])) return "optionDependency: string[] expected"; } - if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; for (var i = 0; i < message.messageType.length; ++i) { @@ -57112,7 +58870,7 @@ return "messageType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -57121,7 +58879,7 @@ return "enumType." + error; } } - if (message.service != null && message.hasOwnProperty("service")) { + if (message.service != null && Object.hasOwnProperty.call(message, "service")) { if (!Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { @@ -57130,7 +58888,7 @@ return "service." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -57139,20 +58897,20 @@ return "extension." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); if (error) return "sourceCodeInfo." + error; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -57184,6 +58942,8 @@ FileDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57226,7 +58986,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); message.messageType = []; for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") + if (!$util.isObject(object.messageType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); } @@ -57236,7 +58996,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -57246,7 +59006,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); message.service = []; for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") + if (!$util.isObject(object.service[i])) throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); } @@ -57256,18 +59016,18 @@ throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); } if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") + if (!$util.isObject(object.sourceCodeInfo)) throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); } @@ -57341,9 +59101,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -57363,9 +59127,9 @@ object.syntax = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { object.dependency = []; @@ -57375,27 +59139,27 @@ if (message.messageType && message.messageType.length) { object.messageType = []; for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options, q + 1); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); } if (message.service && message.service.length) { object.service = []; for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, q + 1); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); if (message.publicDependency && message.publicDependency.length) { object.publicDependency = []; for (var j = 0; j < message.publicDependency.length; ++j) @@ -57406,9 +59170,9 @@ for (var j = 0; j < message.weakDependency.length; ++j) object.weakDependency[j] = message.weakDependency[j]; } - if (message.syntax != null && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; if (message.optionDependency && message.optionDependency.length) { object.optionDependency = []; @@ -57598,34 +59362,38 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + DescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.nestedType != null && message.nestedType.length) for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.extensionRange != null && message.extensionRange.length) for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); @@ -57644,7 +59412,7 @@ * @returns {$protobuf.Writer} Writer */ DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -57770,10 +59538,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { + if (message.field != null && Object.hasOwnProperty.call(message, "field")) { if (!Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { @@ -57782,7 +59550,7 @@ return "field." + error; } } - if (message.extension != null && message.hasOwnProperty("extension")) { + if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -57791,7 +59559,7 @@ return "extension." + error; } } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { if (!Array.isArray(message.nestedType)) return "nestedType: array expected"; for (var i = 0; i < message.nestedType.length; ++i) { @@ -57800,7 +59568,7 @@ return "nestedType." + error; } } - if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -57809,7 +59577,7 @@ return "enumType." + error; } } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { if (!Array.isArray(message.extensionRange)) return "extensionRange: array expected"; for (var i = 0; i < message.extensionRange.length; ++i) { @@ -57818,7 +59586,7 @@ return "extensionRange." + error; } } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { if (!Array.isArray(message.oneofDecl)) return "oneofDecl: array expected"; for (var i = 0; i < message.oneofDecl.length; ++i) { @@ -57827,12 +59595,12 @@ return "oneofDecl." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -57841,14 +59609,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -57871,6 +59639,8 @@ DescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57883,7 +59653,7 @@ throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); message.field = []; for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") + if (!$util.isObject(object.field[i])) throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); } @@ -57893,7 +59663,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") + if (!$util.isObject(object.extension[i])) throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } @@ -57903,7 +59673,7 @@ throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); message.nestedType = []; for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") + if (!$util.isObject(object.nestedType[i])) throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); } @@ -57913,7 +59683,7 @@ throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") + if (!$util.isObject(object.enumType[i])) throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -57923,7 +59693,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); message.extensionRange = []; for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") + if (!$util.isObject(object.extensionRange[i])) throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); } @@ -57933,13 +59703,13 @@ throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); message.oneofDecl = []; for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") + if (!$util.isObject(object.oneofDecl[i])) throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); } @@ -57948,7 +59718,7 @@ throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -57992,9 +59762,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + DescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -58011,51 +59785,51 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.field && message.field.length) { object.field = []; for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, q + 1); } if (message.nestedType && message.nestedType.length) { object.nestedType = []; for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options, q + 1); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); } if (message.extensionRange && message.extensionRange.length) { object.extensionRange = []; for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options, q + 1); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); if (message.oneofDecl && message.oneofDecl.length) { object.oneofDecl = []; for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options, q + 1); } if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options, q + 1); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -58157,15 +59931,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer) { + ExtensionRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -58179,7 +59957,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58257,13 +60035,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -58282,6 +60060,8 @@ ExtensionRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58292,7 +60072,7 @@ if (object.end != null) message.end = object.end | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); } @@ -58308,21 +60088,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options) { + ExtensionRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; object.options = null; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); return object; }; @@ -58417,9 +60201,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer) { + ReservedRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -58437,7 +60225,7 @@ * @returns {$protobuf.Writer} Writer */ ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58511,10 +60299,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -58531,6 +60319,8 @@ ReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58552,17 +60342,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options) { + ReservedRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -58681,19 +60475,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + ExtensionRangeOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.declaration != null && message.declaration.length) for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -58707,7 +60505,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -58793,7 +60591,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -58802,7 +60600,7 @@ return "uninterpretedOption." + error; } } - if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { if (!Array.isArray(message.declaration)) return "declaration: array expected"; for (var i = 0; i < message.declaration.length; ++i) { @@ -58811,12 +60609,12 @@ return "declaration." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) switch (message.verification) { default: return "verification: enum value expected"; @@ -58838,6 +60636,8 @@ ExtensionRangeOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58848,7 +60648,7 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -58858,13 +60658,13 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); message.declaration = []; for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") + if (!$util.isObject(object.declaration[i])) throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -58896,9 +60696,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.declaration = []; @@ -58911,16 +60715,16 @@ if (message.declaration && message.declaration.length) { object.declaration = []; for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); } - if (message.verification != null && message.hasOwnProperty("verification")) + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -59040,9 +60844,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Declaration.encode = function encode(message, writer) { + Declaration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) @@ -59066,7 +60874,7 @@ * @returns {$protobuf.Writer} Writer */ Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59152,19 +60960,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) if (typeof message.reserved !== "boolean") return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) if (typeof message.repeated !== "boolean") return "repeated: boolean expected"; return null; @@ -59181,6 +60989,8 @@ Declaration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59208,9 +61018,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Declaration.toObject = function toObject(message, options) { + Declaration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.number = 0; @@ -59219,15 +61033,15 @@ object.reserved = false; object.repeated = false; } - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) object.repeated = message.repeated; return object; }; @@ -59421,9 +61235,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) @@ -59439,7 +61257,7 @@ if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) @@ -59459,7 +61277,7 @@ * @returns {$protobuf.Writer} Writer */ FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -59569,13 +61387,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) switch (message.label) { default: return "label: enum value expected"; @@ -59584,7 +61402,7 @@ case 2: break; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) switch (message.type) { default: return "type: enum value expected"; @@ -59608,27 +61426,27 @@ case 18: break; } - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) if (!$util.isString(message.defaultValue)) return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) if (!$util.isInteger(message.oneofIndex)) return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) if (!$util.isString(message.jsonName)) return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) if (typeof message.proto3Optional !== "boolean") return "proto3Optional: boolean expected"; return null; @@ -59645,6 +61463,8 @@ FieldDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59765,7 +61585,7 @@ if (object.jsonName != null) message.jsonName = String(object.jsonName); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); } @@ -59783,9 +61603,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -59800,27 +61624,27 @@ object.jsonName = ""; object.proto3Optional = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(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")) + if (message.type != null && Object.hasOwnProperty.call(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")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) object.proto3Optional = message.proto3Optional; return object; }; @@ -59978,13 +61802,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + OneofDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -59998,7 +61826,7 @@ * @returns {$protobuf.Writer} Writer */ OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60072,10 +61900,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -60094,6 +61922,8 @@ OneofDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60102,7 +61932,7 @@ if (object.name != null) message.name = String(object.name); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); } @@ -60118,18 +61948,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + OneofDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); return object; }; @@ -60263,19 +62097,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); @@ -60294,7 +62132,7 @@ * @returns {$protobuf.Writer} Writer */ EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60390,10 +62228,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { + if (message.value != null && Object.hasOwnProperty.call(message, "value")) { if (!Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { @@ -60402,12 +62240,12 @@ return "value." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -60416,14 +62254,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -60446,6 +62284,8 @@ EnumDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60458,13 +62298,13 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); message.value = []; for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") + if (!$util.isObject(object.value[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); } @@ -60473,7 +62313,7 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") + if (!$util.isObject(object.reservedRange[i])) throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -60517,9 +62357,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.value = []; @@ -60531,26 +62375,26 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.value && message.value.length) { object.value = []; for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options, q + 1); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && message.hasOwnProperty("visibility")) + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -60643,9 +62487,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encode = function encode(message, writer) { + EnumReservedRange.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -60663,7 +62511,7 @@ * @returns {$protobuf.Writer} Writer */ EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60737,10 +62585,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -60757,6 +62605,8 @@ EnumReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60778,17 +62628,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumReservedRange.toObject = function toObject(message, options) { + EnumReservedRange.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; return object; }; @@ -60896,15 +62750,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -60918,7 +62776,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -60996,13 +62854,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -61021,6 +62879,8 @@ EnumValueDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61031,7 +62891,7 @@ if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); } @@ -61047,21 +62907,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); return object; }; @@ -61166,16 +63030,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -61189,7 +63057,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61269,10 +63137,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { + if (message.method != null && Object.hasOwnProperty.call(message, "method")) { if (!Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { @@ -61281,7 +63149,7 @@ return "method." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -61300,6 +63168,8 @@ ServiceDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61312,13 +63182,13 @@ throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); message.method = []; for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") + if (!$util.isObject(object.method[i])) throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); } } if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); } @@ -61334,9 +63204,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -61344,15 +63218,15 @@ object.name = ""; object.options = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; if (message.method && message.method.length) { object.method = []; for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, q + 1); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); return object; }; @@ -61483,9 +63357,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) @@ -61493,7 +63371,7 @@ if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) @@ -61511,7 +63389,7 @@ * @returns {$protobuf.Writer} Writer */ MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -61601,24 +63479,24 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) if (!$util.isString(message.inputType)) return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) if (!$util.isString(message.outputType)) return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { + if (message.options != null && Object.hasOwnProperty.call(message, "options")) { var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) if (typeof message.clientStreaming !== "boolean") return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) if (typeof message.serverStreaming !== "boolean") return "serverStreaming: boolean expected"; return null; @@ -61635,6 +63513,8 @@ MethodDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61647,7 +63527,7 @@ if (object.outputType != null) message.outputType = String(object.outputType); if (object.options != null) { - if (typeof object.options !== "object") + if (!$util.isObject(object.options)) throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); } @@ -61667,9 +63547,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -61679,17 +63563,17 @@ object.clientStreaming = false; object.serverStreaming = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) object.serverStreaming = message.serverStreaming; return object; }; @@ -61967,9 +63851,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + FileOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) @@ -62009,13 +63897,13 @@ if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); return writer; }; @@ -62029,7 +63917,7 @@ * @returns {$protobuf.Writer} Writer */ FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62187,22 +64075,22 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) if (!$util.isString(message.javaPackage)) return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) if (!$util.isString(message.javaOuterClassname)) return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) if (typeof message.javaMultipleFiles !== "boolean") return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) if (typeof message.javaGenerateEqualsAndHash !== "boolean") return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) if (typeof message.javaStringCheckUtf8 !== "boolean") return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) switch (message.optimizeFor) { default: return "optimizeFor: enum value expected"; @@ -62211,51 +64099,51 @@ case 3: break; } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) if (!$util.isString(message.goPackage)) return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) if (typeof message.ccGenericServices !== "boolean") return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) if (typeof message.javaGenericServices !== "boolean") return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) if (typeof message.pyGenericServices !== "boolean") return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) if (typeof message.ccEnableArenas !== "boolean") return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) if (!$util.isString(message.objcClassPrefix)) return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) if (!$util.isString(message.csharpNamespace)) return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) if (!$util.isString(message.swiftPrefix)) return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) if (!$util.isString(message.phpClassPrefix)) return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) if (!$util.isString(message.phpNamespace)) return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) if (!$util.isString(message.phpMetadataNamespace)) return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) if (!$util.isString(message.rubyPackage)) return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -62264,7 +64152,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (message[".google.api.resourceDefinition"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceDefinition")) { if (!Array.isArray(message[".google.api.resourceDefinition"])) return ".google.api.resourceDefinition: array expected"; for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { @@ -62287,6 +64175,8 @@ FileOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FileOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62349,7 +64239,7 @@ if (object.rubyPackage != null) message.rubyPackage = String(object.rubyPackage); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FileOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -62358,7 +64248,7 @@ throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -62368,7 +64258,7 @@ throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); message[".google.api.resourceDefinition"] = []; for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") + if (!$util.isObject(object[".google.api.resourceDefinition"][i])) throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i], long + 1); } @@ -62385,9 +64275,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -62415,55 +64309,55 @@ object.rubyPackage = ""; object.features = null; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(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")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { object[".google.api.resourceDefinition"] = []; for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options, q + 1); } return object; }; @@ -62630,9 +64524,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) @@ -62644,12 +64542,12 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); return writer; }; @@ -62663,7 +64561,7 @@ * @returns {$protobuf.Writer} Writer */ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -62763,27 +64661,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) if (typeof message.messageSetWireFormat !== "boolean") return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) if (typeof message.noStandardDescriptorAccessor !== "boolean") return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -62792,7 +64690,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) { var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); if (error) return ".google.api.resource." + error; @@ -62811,6 +64709,8 @@ MessageOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MessageOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MessageOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62827,7 +64727,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MessageOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -62836,13 +64736,13 @@ throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") + if (!$util.isObject(object[".google.api.resource"])) throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); } @@ -62858,9 +64758,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -62873,25 +64777,25 @@ object.features = null; object[".google.api.resource"] = null; } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options, q + 1); return object; }; @@ -63125,9 +65029,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) @@ -63151,21 +65059,21 @@ writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); if (message.editionDefaults != null && message.editionDefaults.length) for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork(), q + 1).ldelim(); if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork(), q + 1).ldelim(); return writer; }; @@ -63179,7 +65087,7 @@ * @returns {$protobuf.Writer} Writer */ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -63331,7 +65239,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -63340,10 +65248,10 @@ case 2: break; } - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) switch (message.jstype) { default: return "jstype: enum value expected"; @@ -63352,22 +65260,22 @@ case 2: break; } - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) if (typeof message.unverifiedLazy !== "boolean") return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) switch (message.retention) { default: return "retention: enum value expected"; @@ -63376,7 +65284,7 @@ case 2: break; } - if (message.targets != null && message.hasOwnProperty("targets")) { + if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { if (!Array.isArray(message.targets)) return "targets: array expected"; for (var i = 0; i < message.targets.length; ++i) @@ -63396,7 +65304,7 @@ break; } } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (message.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { if (!Array.isArray(message.editionDefaults)) return "editionDefaults: array expected"; for (var i = 0; i < message.editionDefaults.length; ++i) { @@ -63405,17 +65313,17 @@ return "editionDefaults." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -63424,7 +65332,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (message[".google.api.fieldBehavior"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) @@ -63443,12 +65351,12 @@ break; } } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) { var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); if (error) return ".google.api.resourceReference." + error; } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) { var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"], long + 1); if (error) return ".google.api.fieldInfo." + error; @@ -63467,6 +65375,8 @@ FieldOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63602,18 +65512,18 @@ throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); message.editionDefaults = []; for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") + if (!$util.isObject(object.editionDefaults[i])) throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); } } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -63622,7 +65532,7 @@ throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -63677,12 +65587,12 @@ } } if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") + if (!$util.isObject(object[".google.api.resourceReference"])) throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); } if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") + if (!$util.isObject(object[".google.api.fieldInfo"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"], long + 1); } @@ -63698,9 +65608,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.targets = []; @@ -63723,23 +65637,23 @@ object[".google.api.resourceReference"] = null; object[".google.api.fieldInfo"] = null; } - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(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")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(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")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; if (message.targets && message.targets.length) { object.targets = []; @@ -63749,26 +65663,26 @@ if (message.editionDefaults && message.editionDefaults.length) { object.editionDefaults = []; for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } 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]] === 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); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options, q + 1); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options, q + 1); return object; }; @@ -63938,9 +65852,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer) { + EditionDefault.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) @@ -63958,7 +65876,7 @@ * @returns {$protobuf.Writer} Writer */ EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64032,7 +65950,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -64050,7 +65968,7 @@ case 2147483647: break; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -64067,6 +65985,8 @@ EditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64142,17 +66062,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + EditionDefault.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -64266,9 +66190,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSupport.encode = function encode(message, writer) { + FeatureSupport.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) @@ -64290,7 +66218,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64372,7 +66300,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) switch (message.editionIntroduced) { default: return "editionIntroduced: enum value expected"; @@ -64390,7 +66318,7 @@ case 2147483647: break; } - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) switch (message.editionDeprecated) { default: return "editionDeprecated: enum value expected"; @@ -64408,10 +66336,10 @@ case 2147483647: break; } - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) if (!$util.isString(message.deprecationWarning)) return "deprecationWarning: string expected"; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) switch (message.editionRemoved) { default: return "editionRemoved: enum value expected"; @@ -64443,6 +66371,8 @@ FeatureSupport.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64630,9 +66560,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSupport.toObject = function toObject(message, options) { + FeatureSupport.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; @@ -64640,13 +66574,13 @@ object.deprecationWarning = ""; object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; @@ -64746,14 +66680,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -64767,7 +66705,7 @@ * @returns {$protobuf.Writer} Writer */ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -64843,12 +66781,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -64871,13 +66809,15 @@ OneofOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.OneofOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -64886,7 +66826,7 @@ throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -64903,20 +66843,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -65040,9 +66984,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + EnumOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) @@ -65050,10 +66998,10 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -65067,7 +67015,7 @@ * @returns {$protobuf.Writer} Writer */ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65155,21 +67103,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) if (typeof message.allowAlias !== "boolean") return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -65192,6 +67140,8 @@ EnumOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65204,7 +67154,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -65213,7 +67163,7 @@ throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -65230,9 +67180,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -65242,18 +67196,18 @@ object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -65377,20 +67331,24 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + EnumValueOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); return writer; }; @@ -65404,7 +67362,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65492,23 +67450,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -65531,6 +67489,8 @@ EnumValueOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.EnumValueOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65539,14 +67499,14 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") + if (!$util.isObject(object.featureSupport)) throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -65555,7 +67515,7 @@ throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -65572,9 +67532,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -65584,18 +67548,18 @@ object.debugRedact = false; object.featureSupport = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) object.debugRedact = message.debugRedact; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } return object; }; @@ -65728,16 +67692,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) @@ -65757,7 +67725,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -65849,15 +67817,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -65866,13 +67834,13 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) if (!$util.isString(message[".google.api.defaultHost"])) return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) if (!$util.isString(message[".google.api.apiVersion"])) return ".google.api.apiVersion: string expected"; return null; @@ -65889,13 +67857,15 @@ ServiceOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.ServiceOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -65906,7 +67876,7 @@ throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -65929,9 +67899,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -65942,20 +67916,20 @@ object[".google.api.oauthScopes"] = ""; object[".google.api.apiVersion"] = ""; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; @@ -66098,25 +68072,29 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork(), q + 1).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork(), q + 1).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork(), q + 1).ldelim(); return writer; }; @@ -66130,7 +68108,7 @@ * @returns {$protobuf.Writer} Writer */ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66228,10 +68206,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) switch (message.idempotencyLevel) { default: return "idempotencyLevel: enum value expected"; @@ -66240,12 +68218,12 @@ case 2: break; } - if (message.features != null && message.hasOwnProperty("features")) { + if (message.features != null && Object.hasOwnProperty.call(message, "features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -66254,19 +68232,19 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); if (error) return ".google.api.http." + error; } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (message[".google.api.methodSignature"] != null && Object.hasOwnProperty.call(message, ".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) { var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"], long + 1); if (error) return ".google.longrunning.operationInfo." + error; @@ -66285,6 +68263,8 @@ MethodOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodOptions) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.MethodOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66313,7 +68293,7 @@ break; } if (object.features != null) { - if (typeof object.features !== "object") + if (!$util.isObject(object.features)) throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -66322,13 +68302,13 @@ throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") + if (!$util.isObject(object.uninterpretedOption[i])) throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") + if (!$util.isObject(object[".google.api.http"])) throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); } @@ -66340,7 +68320,7 @@ message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") + if (!$util.isObject(object[".google.longrunning.operationInfo"])) throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"], long + 1); } @@ -66356,9 +68336,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -66371,26 +68355,26 @@ object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(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.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options, q + 1); if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); return object; }; @@ -66547,12 +68531,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) @@ -66578,7 +68566,7 @@ * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66674,7 +68662,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) { + if (message.name != null && Object.hasOwnProperty.call(message, "name")) { if (!Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { @@ -66683,22 +68671,22 @@ return "name." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) if (!$util.isString(message.identifierValue)) return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) if (typeof message.doubleValue !== "number") return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) if (!$util.isString(message.aggregateValue)) return "aggregateValue: string expected"; return null; @@ -66715,6 +68703,8 @@ UninterpretedOption.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66725,7 +68715,7 @@ throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); message.name = []; for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") + if (!$util.isObject(object.name[i])) throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); } @@ -66734,7 +68724,7 @@ message.identifierValue = String(object.identifierValue); if (object.positiveIntValue != null) if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue, true); else if (typeof object.positiveIntValue === "string") message.positiveIntValue = parseInt(object.positiveIntValue, 10); else if (typeof object.positiveIntValue === "number") @@ -66743,7 +68733,7 @@ message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); if (object.negativeIntValue != null) if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue, false); else if (typeof object.negativeIntValue === "string") message.negativeIntValue = parseInt(object.negativeIntValue, 10); else if (typeof object.negativeIntValue === "number") @@ -66771,9 +68761,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -66781,14 +68775,14 @@ object.identifierValue = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.positiveIntValue = options.longs === String ? "0" : 0; + object.positiveIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.negativeIntValue = options.longs === String ? "0" : 0; + object.negativeIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.doubleValue = 0; if (options.bytes === String) object.stringValue = ""; @@ -66802,25 +68796,29 @@ if (message.name && message.name.length) { object.name = []; for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, q + 1); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); + else if (typeof message.positiveIntValue === "number") object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; else object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); + else if (typeof message.negativeIntValue === "number") object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; else object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) object.aggregateValue = message.aggregateValue; return object; }; @@ -66913,9 +68911,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + NamePart.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); return writer; @@ -66931,7 +68933,7 @@ * @returns {$protobuf.Writer} Writer */ NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -66971,9 +68973,9 @@ break; } } - if (!message.hasOwnProperty("namePart")) + if (!Object.hasOwnProperty.call(message, "namePart")) throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) + if (!Object.hasOwnProperty.call(message, "isExtension")) throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; @@ -67027,6 +69029,8 @@ NamePart.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67048,17 +69052,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + NamePart.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.namePart = ""; object.isExtension = false; } - if (message.namePart != null && message.hasOwnProperty("namePart")) + if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) + if (message.isExtension != null && Object.hasOwnProperty.call(message, "isExtension")) object.isExtension = message.isExtension; return object; }; @@ -67211,9 +69219,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encode = function encode(message, writer) { + FeatureSet.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) @@ -67243,7 +69255,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67341,7 +69353,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) switch (message.fieldPresence) { default: return "fieldPresence: enum value expected"; @@ -67351,7 +69363,7 @@ case 3: break; } - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) switch (message.enumType) { default: return "enumType: enum value expected"; @@ -67360,7 +69372,7 @@ case 2: break; } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) switch (message.repeatedFieldEncoding) { default: return "repeatedFieldEncoding: enum value expected"; @@ -67369,7 +69381,7 @@ case 2: break; } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) switch (message.utf8Validation) { default: return "utf8Validation: enum value expected"; @@ -67378,7 +69390,7 @@ case 3: break; } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) switch (message.messageEncoding) { default: return "messageEncoding: enum value expected"; @@ -67387,7 +69399,7 @@ case 2: break; } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) switch (message.jsonFormat) { default: return "jsonFormat: enum value expected"; @@ -67396,7 +69408,7 @@ case 2: break; } - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) switch (message.enforceNamingStyle) { default: return "enforceNamingStyle: enum value expected"; @@ -67405,7 +69417,7 @@ case 2: break; } - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) switch (message.defaultSymbolVisibility) { default: return "defaultSymbolVisibility: enum value expected"; @@ -67430,6 +69442,8 @@ FeatureSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67619,9 +69633,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + FeatureSet.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; @@ -67633,21 +69651,21 @@ object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -67836,9 +69854,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VisibilityFeature.encode = function encode(message, writer) { + VisibilityFeature.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -67852,7 +69874,7 @@ * @returns {$protobuf.Writer} Writer */ VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -67932,10 +69954,6 @@ VisibilityFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.FeatureSet.VisibilityFeature(); }; @@ -68076,12 +70094,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + FeatureSetDefaults.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.defaults != null && message.defaults.length) for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) @@ -68099,7 +70121,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68179,7 +70201,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { if (!Array.isArray(message.defaults)) return "defaults: array expected"; for (var i = 0; i < message.defaults.length; ++i) { @@ -68188,7 +70210,7 @@ return "defaults." + error; } } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) switch (message.minimumEdition) { default: return "minimumEdition: enum value expected"; @@ -68206,7 +70228,7 @@ case 2147483647: break; } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) switch (message.maximumEdition) { default: return "maximumEdition: enum value expected"; @@ -68238,6 +70260,8 @@ FeatureSetDefaults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68248,7 +70272,7 @@ throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); message.defaults = []; for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") + if (!$util.isObject(object.defaults[i])) throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); } @@ -68377,9 +70401,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.defaults = []; @@ -68390,11 +70418,11 @@ if (message.defaults && message.defaults.length) { object.defaults = []; for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; @@ -68496,15 +70524,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetEditionDefault.encode = function encode(message, writer) { + FeatureSetEditionDefault.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -68518,7 +70550,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68596,7 +70628,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -68614,12 +70646,12 @@ case 2147483647: break; } - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); if (error) return "overridableFeatures." + error; } - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); if (error) return "fixedFeatures." + error; @@ -68638,6 +70670,8 @@ FeatureSetEditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68700,12 +70734,12 @@ break; } if (object.overridableFeatures != null) { - if (typeof object.overridableFeatures !== "object") + if (!$util.isObject(object.overridableFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); } if (object.fixedFeatures != null) { - if (typeof object.fixedFeatures !== "object") + if (!$util.isObject(object.fixedFeatures)) throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); } @@ -68721,21 +70755,25 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { + FeatureSetEditionDefault.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; object.overridableFeatures = null; object.fixedFeatures = null; } - if (message.edition != null && message.hasOwnProperty("edition")) + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) - object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) - object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); return object; }; @@ -68825,12 +70863,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -68844,7 +70886,7 @@ * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -68916,7 +70958,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.location != null && message.hasOwnProperty("location")) { + if (message.location != null && Object.hasOwnProperty.call(message, "location")) { if (!Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { @@ -68939,6 +70981,8 @@ SourceCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68949,7 +70993,7 @@ throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); message.location = []; for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") + if (!$util.isObject(object.location[i])) throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); } @@ -68966,16 +71010,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { object.location = []; for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, q + 1); } return object; }; @@ -69098,9 +71146,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Location.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -69133,7 +71185,7 @@ * @returns {$protobuf.Writer} Writer */ Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69235,27 +71287,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { + if (message.span != null && Object.hasOwnProperty.call(message, "span")) { if (!Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) return "span: integer[] expected"; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) if (!$util.isString(message.leadingComments)) return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) if (!$util.isString(message.trailingComments)) return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { if (!Array.isArray(message.leadingDetachedComments)) return "leadingDetachedComments: array expected"; for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -69276,6 +71328,8 @@ Location.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69318,9 +71372,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; @@ -69341,9 +71399,9 @@ for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) object.trailingComments = message.trailingComments; if (message.leadingDetachedComments && message.leadingDetachedComments.length) { object.leadingDetachedComments = []; @@ -69439,12 +71497,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.annotation != null && message.annotation.length) for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); return writer; }; @@ -69458,7 +71520,7 @@ * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69530,7 +71592,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { if (!Array.isArray(message.annotation)) return "annotation: array expected"; for (var i = 0; i < message.annotation.length; ++i) { @@ -69553,6 +71615,8 @@ GeneratedCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69563,7 +71627,7 @@ throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); message.annotation = []; for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") + if (!$util.isObject(object.annotation[i])) throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); } @@ -69580,16 +71644,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.annotation = []; if (message.annotation && message.annotation.length) { object.annotation = []; for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options, q + 1); } return object; }; @@ -69710,9 +71778,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -69740,7 +71812,7 @@ * @returns {$protobuf.Writer} Writer */ Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -69833,23 +71905,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && message.hasOwnProperty("path")) { + if (message.path != null && Object.hasOwnProperty.call(message, "path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) if (!$util.isString(message.sourceFile)) return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) if (!$util.isInteger(message.begin)) return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) switch (message.semantic) { default: return "semantic: enum value expected"; @@ -69872,6 +71944,8 @@ Annotation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69922,9 +71996,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.path = []; @@ -69939,13 +72017,13 @@ for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) + if (message.semantic != null && Object.hasOwnProperty.call(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; }; @@ -70076,9 +72154,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -70096,7 +72178,7 @@ * @returns {$protobuf.Writer} Writer */ Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70170,10 +72252,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -70190,6 +72272,8 @@ Duration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Duration) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Duration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70197,7 +72281,7 @@ var message = new $root.google.protobuf.Duration(); if (object.seconds != null) if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + message.seconds = $util.Long.fromValue(object.seconds, false); else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -70218,24 +72302,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.seconds = options.longs === String ? "0" : 0; + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.nanos = 0; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) object.nanos = message.nanos; return object; }; @@ -70331,9 +72421,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Any.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); if (message.value != null && Object.hasOwnProperty.call(message, "value")) @@ -70351,7 +72445,7 @@ * @returns {$protobuf.Writer} Writer */ Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70425,10 +72519,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) if (!$util.isString(message.type_url)) return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -70445,6 +72539,8 @@ Any.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Any) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Any: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70469,9 +72565,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type_url = ""; @@ -70483,9 +72583,9 @@ object.value = $util.newBuffer(object.value); } } - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -70563,9 +72663,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); return writer; }; @@ -70579,7 +72683,7 @@ * @returns {$protobuf.Writer} Writer */ Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70659,10 +72763,6 @@ Empty.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Empty) return object; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.Empty(); }; @@ -70770,9 +72870,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -70790,7 +72894,7 @@ * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -70864,10 +72968,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -70884,6 +72988,8 @@ Timestamp.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Timestamp) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Timestamp: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70891,7 +72997,7 @@ var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + message.seconds = $util.Long.fromValue(object.seconds, false); else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -70912,24 +73018,30 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.seconds = options.longs === String ? "0" : 0; + object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; object.nanos = 0; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) object.nanos = message.nanos; return object; }; @@ -71016,9 +73128,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encode = function encode(message, writer) { + DoubleValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; @@ -71034,7 +73150,7 @@ * @returns {$protobuf.Writer} Writer */ DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71104,7 +73220,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -71121,6 +73237,8 @@ DoubleValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DoubleValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.DoubleValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71140,13 +73258,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + DoubleValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -71233,9 +73355,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encode = function encode(message, writer) { + FloatValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; @@ -71251,7 +73377,7 @@ * @returns {$protobuf.Writer} Writer */ FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71321,7 +73447,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -71338,6 +73464,8 @@ FloatValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FloatValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FloatValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71357,13 +73485,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + FloatValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -71450,9 +73582,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64Value.encode = function encode(message, writer) { + Int64Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; @@ -71468,7 +73604,7 @@ * @returns {$protobuf.Writer} Writer */ Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71538,7 +73674,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -71555,6 +73691,8 @@ Int64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int64Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71562,7 +73700,7 @@ var message = new $root.google.protobuf.Int64Value(); if (object.value != null) if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; + message.value = $util.Long.fromValue(object.value, false); else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -71581,18 +73719,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64Value.toObject = function toObject(message, options) { + Int64Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, false).toBigInt(); + else if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; @@ -71681,9 +73825,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encode = function encode(message, writer) { + UInt64Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; @@ -71699,7 +73847,7 @@ * @returns {$protobuf.Writer} Writer */ UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -71769,7 +73917,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -71786,6 +73934,8 @@ UInt64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt64Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71793,7 +73943,7 @@ var message = new $root.google.protobuf.UInt64Value(); if (object.value != null) if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; + message.value = $util.Long.fromValue(object.value, true); else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -71812,18 +73962,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + UInt64Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") + object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (typeof BigInt !== "undefined" && options.longs === BigInt) + object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt(); + else if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; @@ -71912,9 +74068,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int32Value.encode = function encode(message, writer) { + Int32Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; @@ -71930,7 +74090,7 @@ * @returns {$protobuf.Writer} Writer */ Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72000,7 +74160,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -72017,6 +74177,8 @@ Int32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int32Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.Int32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72036,13 +74198,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -72129,9 +74295,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encode = function encode(message, writer) { + UInt32Value.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; @@ -72147,7 +74317,7 @@ * @returns {$protobuf.Writer} Writer */ UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72217,7 +74387,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -72234,6 +74404,8 @@ UInt32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt32Value) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.UInt32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72253,13 +74425,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + UInt32Value.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -72346,9 +74522,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encode = function encode(message, writer) { + BoolValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; @@ -72364,7 +74544,7 @@ * @returns {$protobuf.Writer} Writer */ BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72434,7 +74614,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; @@ -72451,6 +74631,8 @@ BoolValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BoolValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BoolValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72470,13 +74652,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + BoolValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = false; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -72563,9 +74749,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encode = function encode(message, writer) { + StringValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -72581,7 +74771,7 @@ * @returns {$protobuf.Writer} Writer */ StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72651,7 +74841,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -72668,6 +74858,8 @@ StringValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.StringValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.StringValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72687,13 +74879,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + StringValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = message.value; return object; }; @@ -72780,9 +74976,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encode = function encode(message, writer) { + BytesValue.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; @@ -72798,7 +74998,7 @@ * @returns {$protobuf.Writer} Writer */ BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -72868,7 +75068,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -72885,6 +75085,8 @@ BytesValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BytesValue) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.BytesValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72907,9 +75109,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + BytesValue.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -72919,7 +75125,7 @@ if (options.bytes !== Array) object.value = $util.newBuffer(object.value); } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -73007,9 +75213,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.paths != null && message.paths.length) for (var i = 0; i < message.paths.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); @@ -73026,7 +75236,7 @@ * @returns {$protobuf.Writer} Writer */ FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73098,7 +75308,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.paths != null && message.hasOwnProperty("paths")) { + if (message.paths != null && Object.hasOwnProperty.call(message, "paths")) { if (!Array.isArray(message.paths)) return "paths: array expected"; for (var i = 0; i < message.paths.length; ++i) @@ -73119,6 +75329,8 @@ FieldMask.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldMask) return object; + if (!$util.isObject(object)) + throw TypeError(".google.protobuf.FieldMask: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73143,9 +75355,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + FieldMask.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.paths = []; @@ -73250,7 +75466,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); }, "name", { value: "ListOperations" }); /** @@ -73283,7 +75499,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "GetOperation" }); /** @@ -73316,7 +75532,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteOperation" }); /** @@ -73349,7 +75565,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "CancelOperation" }); /** @@ -73382,7 +75598,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + return $protobuf.rpc.Service.prototype.rpcCall.call(this, waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "WaitOperation" }); /** @@ -73501,19 +75717,23 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Operation.encode = function encode(message, writer) { + Operation.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); return writer; }; @@ -73527,7 +75747,7 @@ * @returns {$protobuf.Writer} Writer */ Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73614,18 +75834,18 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { var error = $root.google.protobuf.Any.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.done != null && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) if (typeof message.done !== "boolean") return "done: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) { + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { properties.result = 1; { var error = $root.google.rpc.Status.verify(message.error, long + 1); @@ -73633,7 +75853,7 @@ return "error." + error; } } - if (message.response != null && message.hasOwnProperty("response")) { + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { if (properties.result === 1) return "result: multiple values"; properties.result = 1; @@ -73657,6 +75877,8 @@ Operation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.Operation) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.Operation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73665,19 +75887,19 @@ if (object.name != null) message.name = String(object.name); if (object.metadata != null) { - if (typeof object.metadata !== "object") + if (!$util.isObject(object.metadata)) throw TypeError(".google.longrunning.Operation.metadata: object expected"); message.metadata = $root.google.protobuf.Any.fromObject(object.metadata, long + 1); } if (object.done != null) message.done = Boolean(object.done); if (object.error != null) { - if (typeof object.error !== "object") + if (!$util.isObject(object.error)) throw TypeError(".google.longrunning.Operation.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } if (object.response != null) { - if (typeof object.response !== "object") + if (!$util.isObject(object.response)) throw TypeError(".google.longrunning.Operation.response: object expected"); message.response = $root.google.protobuf.Any.fromObject(object.response, long + 1); } @@ -73693,28 +75915,32 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Operation.toObject = function toObject(message, options) { + Operation.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.metadata = null; object.done = false; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); - if (message.done != null && message.hasOwnProperty("done")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options, q + 1); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) object.done = message.done; - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); if (options.oneofs) object.result = "error"; } - if (message.response != null && message.hasOwnProperty("response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options, q + 1); if (options.oneofs) object.result = "response"; } @@ -73803,9 +76029,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOperationRequest.encode = function encode(message, writer) { + GetOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -73821,7 +76051,7 @@ * @returns {$protobuf.Writer} Writer */ GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -73891,7 +76121,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -73908,6 +76138,8 @@ GetOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.GetOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.GetOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73927,13 +76159,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperationRequest.toObject = function toObject(message, options) { + GetOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -74047,9 +76283,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsRequest.encode = function encode(message, writer) { + ListOperationsRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -74071,7 +76311,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74153,16 +76393,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -74179,6 +76419,8 @@ ListOperationsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74204,9 +76446,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsRequest.toObject = function toObject(message, options) { + ListOperationsRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.filter = ""; @@ -74214,13 +76460,13 @@ object.pageToken = ""; object.name = ""; } - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) object.pageToken = message.pageToken; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -74317,12 +76563,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsResponse.encode = function encode(message, writer) { + ListOperationsResponse.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.operations != null && message.operations.length) for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -74338,7 +76588,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74414,7 +76664,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.operations != null && message.hasOwnProperty("operations")) { + if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) { if (!Array.isArray(message.operations)) return "operations: array expected"; for (var i = 0; i < message.operations.length; ++i) { @@ -74423,7 +76673,7 @@ return "operations." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -74440,6 +76690,8 @@ ListOperationsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.ListOperationsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74450,7 +76702,7 @@ throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); message.operations = []; for (var i = 0; i < object.operations.length; ++i) { - if (typeof object.operations[i] !== "object") + if (!$util.isObject(object.operations[i])) throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i], long + 1); } @@ -74469,9 +76721,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsResponse.toObject = function toObject(message, options) { + ListOperationsResponse.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.operations = []; @@ -74480,9 +76736,9 @@ if (message.operations && message.operations.length) { object.operations = []; for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options, q + 1); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -74569,9 +76825,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelOperationRequest.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -74587,7 +76847,7 @@ * @returns {$protobuf.Writer} Writer */ CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74657,7 +76917,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -74674,6 +76934,8 @@ CancelOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.CancelOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74693,13 +76955,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelOperationRequest.toObject = function toObject(message, options) { + CancelOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -74786,9 +77052,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationRequest.encode = function encode(message, writer) { + DeleteOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -74804,7 +77074,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -74874,7 +77144,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -74891,6 +77161,8 @@ DeleteOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.DeleteOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74910,13 +77182,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationRequest.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; return object; }; @@ -75012,13 +77288,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WaitOperationRequest.encode = function encode(message, writer) { + WaitOperationRequest.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); return writer; }; @@ -75032,7 +77312,7 @@ * @returns {$protobuf.Writer} Writer */ WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75106,10 +77386,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) { + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) { var error = $root.google.protobuf.Duration.verify(message.timeout, long + 1); if (error) return "timeout." + error; @@ -75128,6 +77408,8 @@ WaitOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.WaitOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75136,7 +77418,7 @@ if (object.name != null) message.name = String(object.name); if (object.timeout != null) { - if (typeof object.timeout !== "object") + if (!$util.isObject(object.timeout)) throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout, long + 1); } @@ -75152,18 +77434,22 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WaitOperationRequest.toObject = function toObject(message, options) { + WaitOperationRequest.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.timeout = null; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) object.name = message.name; - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options, q + 1); return object; }; @@ -75258,9 +77544,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationInfo.encode = function encode(message, writer) { + OperationInfo.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) @@ -75278,7 +77568,7 @@ * @returns {$protobuf.Writer} Writer */ OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75352,10 +77642,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) if (!$util.isString(message.responseType)) return "responseType: string expected"; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) if (!$util.isString(message.metadataType)) return "metadataType: string expected"; return null; @@ -75372,6 +77662,8 @@ OperationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.OperationInfo) return object; + if (!$util.isObject(object)) + throw TypeError(".google.longrunning.OperationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75393,17 +77685,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationInfo.toObject = function toObject(message, options) { + OperationInfo.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.responseType = ""; object.metadataType = ""; } - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) object.responseType = message.responseType; - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) object.metadataType = message.metadataType; return object; }; @@ -75521,16 +77817,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer) { + Status.encode = function encode(message, writer, q) { if (!writer) writer = $Writer.create(); + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); return writer; }; @@ -75544,7 +77844,7 @@ * @returns {$protobuf.Writer} Writer */ Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); }; /** @@ -75624,13 +77924,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) if (!$util.isInteger(message.code)) return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { + if (message.details != null && Object.hasOwnProperty.call(message, "details")) { if (!Array.isArray(message.details)) return "details: array expected"; for (var i = 0; i < message.details.length; ++i) { @@ -75653,6 +77953,8 @@ Status.fromObject = function fromObject(object, long) { if (object instanceof $root.google.rpc.Status) return object; + if (!$util.isObject(object)) + throw TypeError(".google.rpc.Status: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75667,7 +77969,7 @@ throw TypeError(".google.rpc.Status.details: array expected"); message.details = []; for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") + if (!$util.isObject(object.details[i])) throw TypeError(".google.rpc.Status.details: object expected"); message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i], long + 1); } @@ -75684,9 +77986,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options, q) { if (!options) options = {}; + if (q === undefined) + q = 0; + if (q > $util.recursionLimit) + throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.details = []; @@ -75694,14 +78000,14 @@ object.code = 0; object.message = ""; } - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) object.message = message.message; if (message.details && message.details.length) { object.details = []; for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options, q + 1); } return object; }; diff --git a/packages/google-cloud-speech/src/helpers.ts b/packages/google-cloud-speech/src/helpers.ts index 0b24f145143b..9d443018e199 100644 --- a/packages/google-cloud-speech/src/helpers.ts +++ b/packages/google-cloud-speech/src/helpers.ts @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google Inc. All Rights Reserved. + * Copyright 2026 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav b/packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav deleted file mode 100644 index 27a14fa7e3c5cee61020a78d3bd7c50cc98999ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 113604 zcmeFZb$paZxGz5Q>bh@~Bm_us_u^0}E=5a#(m;Wh;!p|{3dNmLycGB1u0@J#&;;VH zo6Y*}D>HXCl;1h`o^$VCzdujrGw#nb&%CoU&o^K8=+^D}H3)`w8q#&#q?uI>002nL zt&spMyaoUT3}EaxGr!qJ%KXpY|4`t6DDXcN_#X-YfboA%h5s)7f8RO(@3Bug!TmS5 z3xBkq-2cA6|99%gmj0v6$2K9^)q{VZ`uUU^jDIx$wZ_NtpT-ib@!$V_Z1YpO|Gv!s zJN5tG_W!%yf6m4K{{7dq|D5vwclaY6KhpKT()1H$KhZeIg^%I?>{BE)Xo9))zu`~* zr@a3fr%Bmh>L;HC3<(GAe{cRH=VQ5G%OC6iM~JQ*!>2w!`k&_Te^Ty$=h?^A_1~|7 z|B#O$i_j-V{ToIk1!4KW7zs<2X`kFr{>PG^azDjB)&JPmr#^zQkAI*1kFyA-{h#ys zw;)OX6#D4P|Bes;JHlYk0v3r45cARXfVQ(tk|}E+VmFTvBPuD&11ze#$SctQD*qY{gO8Vg+#>|C(U0!G7J9 z#zWkX&HO#IQgERK!;kH)s?jqy}2zYl*KT zu9lSe&*oD+m>)F3+KS4WAKMF#GuV6ZPa?Aj^6?{=eT45mvJO737BBIgm21aNR$4h( zNx{`tgbQ&2&L<`hXXDIDla4cp`9Mr6u_=}21AhCjd4ZGgOZ@s@`vM2!FG%ba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?IY_x-;C+;_l( diff --git a/packages/google-cloud-speech/system-test/speech_system_test.js b/packages/google-cloud-speech/system-test/speech_system_test.js deleted file mode 100644 index 292de0cbd2ea..000000000000 --- a/packages/google-cloud-speech/system-test/speech_system_test.js +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const {describe, it} = require('mocha'); -const path = require('path'); -const speech = require(path.join(process.cwd(), 'build', 'src')); -const fs = require('fs'); - -describe('SpeechClient system test default', () => { - it('calls recognize', async () => { - const client = new speech.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = 'LINEAR16'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on('data', response => { - assert.match( - response.results[0].alternatives[0].transcript, - /test of streaming.*call/ - ); - gotResponse = true; - }); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/system-test/speech_system_test_v1.js b/packages/google-cloud-speech/system-test/speech_system_test_v1.js deleted file mode 100644 index 78728558fc7c..000000000000 --- a/packages/google-cloud-speech/system-test/speech_system_test_v1.js +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const {describe, it} = require('mocha'); -const path = require('path'); -const speech = require(path.join(process.cwd(), 'build', 'src')); -const fs = require('fs'); - -describe('SpeechClient system test v1', () => { - it('calls recognize', async () => { - const client = new speech.v1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.v1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = 'LINEAR16'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.v1.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on('data', response => { - assert.match( - response.results[0].alternatives[0].transcript, - /test of streaming.*call/ - ); - gotResponse = true; - }); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js b/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js deleted file mode 100644 index 19ca671458f3..000000000000 --- a/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); -const {describe, it} = require('mocha'); -const path = require('path'); -const speech = require(path.join(process.cwd(), 'build', 'src')); -const fs = require('fs'); - -describe('SpeechClient system test v1p1beta1', () => { - it('calls recognize', async () => { - const client = new speech.v1p1beta1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.v1p1beta1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = 'FLAC'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - audioChannelCount: 2, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri: uri, - }; - const request = { - config: config, - audio: audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = 'LINEAR16'; - const config = { - languageCode: languageCode, - sampleRateHertz: sampleRateHertz, - encoding: encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.v1p1beta1.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on('data', response => { - assert.match( - response.results[0].alternatives[0].transcript, - /test of streaming.*call/ - ); - gotResponse = true; - }); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts deleted file mode 100644 index e8a265f9c41d..000000000000 --- a/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import * as speech from '../src'; -import * as fs from 'fs'; -import * as path from 'path'; -import {google} from '../protos/protos'; - -describe('SpeechClient TypeScript system test default', () => { - it('calls recognize', async () => { - const client = new speech.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual( - response.results![0].alternatives![0].transcript, - 'hello' - ); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual( - response.results![0].alternatives![0].transcript, - 'hello' - ); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; - const config = { - languageCode, - sampleRateHertz, - encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on( - 'data', - (response: google.cloud.speech.v1.IStreamingRecognizeResponse) => { - assert.match( - response.results![0].alternatives![0].transcript ?? '', - /test of streaming.*call/ - ); - gotResponse = true; - } - ); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts deleted file mode 100644 index d502f61cbd07..000000000000 --- a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import * as speech from '../src'; -import * as fs from 'fs'; -import * as path from 'path'; -import {google} from '../protos/protos'; - -describe('SpeechClient TypeScript system test v1', () => { - it('calls recognize', async () => { - const client = new speech.v1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual( - response.results![0]!.alternatives![0].transcript, - 'hello' - ); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.v1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual( - response.results![0].alternatives![0].transcript, - 'hello' - ); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; - const config = { - languageCode, - sampleRateHertz, - encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.v1.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on( - 'data', - (response: google.cloud.speech.v1.IStreamingRecognizeResponse) => { - assert.match( - response.results![0].alternatives![0].transcript ?? '', - /test of streaming.*call/ - ); - gotResponse = true; - } - ); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts deleted file mode 100644 index d710f571ae4a..000000000000 --- a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import * as speech from '../src'; -import * as fs from 'fs'; -import * as path from 'path'; -import {google} from '../protos/protos'; - -describe('SpeechClient TypeScript system test v1p1beta1', () => { - it('calls recognize', async () => { - const client = new speech.v1p1beta1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [response] = await client.recognize(request); - assert.strictEqual( - response.results![0].alternatives![0].transcript, - 'hello' - ); - }); - - it('calls longRunningRecognize', async () => { - const client = new speech.v1p1beta1.SpeechClient(); - - const languageCode = 'en-US'; - const sampleRateHertz = 44100; - const encoding = - google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding.FLAC; - const audioChannelCount = 2; - const config = { - languageCode, - sampleRateHertz, - encoding, - audioChannelCount, - }; - const uri = 'gs://cloud-samples-data/speech/hello.flac'; - const audio = { - uri, - }; - const request = { - config, - audio, - }; - const [operation] = await client.longRunningRecognize(request); - const [response] = await operation.promise(); - assert.strictEqual( - response.results![0].alternatives![0].transcript, - 'hello' - ); - }); - - it('calls streamingRecognize', done => { - const filename = path.join( - 'system-test', - 'fixtures', - 'streamingRecognize', - 'input.wav' - ); - - const languageCode = 'en-US'; - const sampleRateHertz = 24000; - const encoding = - google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; - const config = { - languageCode, - sampleRateHertz, - encoding, - }; - const request = { - config, - interimResults: false, - }; - - const client = new speech.v1p1beta1.SpeechClient(); - const stream = client.streamingRecognize(request); - let gotResponse = false; - stream.on( - 'data', - (response: google.cloud.speech.v1p1beta1.IStreamingRecognizeResponse) => { - assert.match( - response.results![0].alternatives![0].transcript ?? '', - /test of streaming.*call/ - ); - gotResponse = true; - } - ); - stream.on('end', () => { - assert(gotResponse); - done(); - }); - stream.on('error', done); - fs.createReadStream(filename).pipe(stream); - }); -}); diff --git a/packages/google-cloud-speech/test/helpers.test.ts b/packages/google-cloud-speech/test/helpers.test.ts index 9cb690b272e2..a47b4968cbed 100644 --- a/packages/google-cloud-speech/test/helpers.test.ts +++ b/packages/google-cloud-speech/test/helpers.test.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2017 Google Inc. All Rights Reserved. + * Copyright 2026 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 358475c5f6c36922d5ac1772da81df58ba09bc01 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 15 Jun 2026 17:08:08 +0000 Subject: [PATCH 2/2] feat: preserve system tests and fixtures in keep list --- librarian.yaml | 7 + packages/google-cloud-speech/protos/protos.js | 9088 ++++++----------- .../fixtures/streamingRecognize/input.wav | Bin 0 -> 113604 bytes .../system-test/speech_system_test.js | 111 + .../system-test/speech_system_test_v1.js | 111 + .../speech_system_test_v1p1beta1.js | 111 + .../speech_typescript_system_test.ts | 124 + .../speech_typescript_system_test_v1.ts | 124 + ...speech_typescript_system_test_v1p1beta1.ts | 124 + 9 files changed, 4103 insertions(+), 5697 deletions(-) create mode 100644 packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav create mode 100644 packages/google-cloud-speech/system-test/speech_system_test.js create mode 100644 packages/google-cloud-speech/system-test/speech_system_test_v1.js create mode 100644 packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js create mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test.ts create mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts create mode 100644 packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts diff --git a/librarian.yaml b/librarian.yaml index c5f34c64e1c1..a23bf680b014 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1402,6 +1402,13 @@ libraries: keep: - src/helpers.ts - src/index.ts + - system-test/fixtures/streamingRecognize/input.wav + - system-test/speech_system_test.js + - system-test/speech_system_test_v1.js + - system-test/speech_system_test_v1p1beta1.js + - system-test/speech_typescript_system_test.ts + - system-test/speech_typescript_system_test_v1.ts + - system-test/speech_typescript_system_test_v1p1beta1.ts - test/helpers.test.ts nodejs: default_version: v1 diff --git a/packages/google-cloud-speech/protos/protos.js b/packages/google-cloud-speech/protos/protos.js index 9f881ef56d95..85a8976389f4 100644 --- a/packages/google-cloud-speech/protos/protos.js +++ b/packages/google-cloud-speech/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["_google_cloud_speech_protos"] || ($protobuf.roots["_google_cloud_speech_protos"] = {}); + var $root = $protobuf.roots._google_cloud_speech_protos || ($protobuf.roots._google_cloud_speech_protos = {}); $root.google = (function() { @@ -118,7 +118,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v1.RecognizeRequest, $root.google.cloud.speech.v1.RecognizeResponse, request, callback); + return this.rpcCall(recognize, $root.google.cloud.speech.v1.RecognizeRequest, $root.google.cloud.speech.v1.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -151,7 +151,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.longRunningRecognize = function longRunningRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, longRunningRecognize, $root.google.cloud.speech.v1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(longRunningRecognize, $root.google.cloud.speech.v1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "LongRunningRecognize" }); /** @@ -184,7 +184,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v1.StreamingRecognizeRequest, $root.google.cloud.speech.v1.StreamingRecognizeResponse, request, callback); + return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v1.StreamingRecognizeRequest, $root.google.cloud.speech.v1.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -262,17 +262,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer, q) { + RecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -286,7 +282,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -360,12 +356,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { var error = $root.google.cloud.speech.v1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; @@ -384,20 +380,18 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.RecognizeRequest(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (!$util.isObject(object.audio)) + if (typeof object.audio !== "object") throw TypeError(".google.cloud.speech.v1.RecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1.RecognitionAudio.fromObject(object.audio, long + 1); } @@ -413,22 +407,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options, q) { + RecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options); return object; }; @@ -532,19 +522,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeRequest.encode = function encode(message, writer, q) { + LongRunningRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -558,7 +544,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -636,17 +622,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { var error = $root.google.cloud.speech.v1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; } - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { var error = $root.google.cloud.speech.v1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -665,25 +651,23 @@ LongRunningRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.LongRunningRecognizeRequest(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (!$util.isObject(object.audio)) + if (typeof object.audio !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1.RecognitionAudio.fromObject(object.audio, long + 1); } if (object.outputConfig != null) { - if (!$util.isObject(object.outputConfig)) + if (typeof object.outputConfig !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeRequest.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -699,25 +683,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeRequest.toObject = function toObject(message, options, q) { + LongRunningRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; object.outputConfig = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options, q + 1); - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.speech.v1.RecognitionAudio.toObject(message.audio, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options); return object; }; @@ -817,13 +797,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptOutputConfig.encode = function encode(message, writer, q) { + TranscriptOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); return writer; @@ -839,7 +815,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -910,7 +886,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { properties.outputType = 1; if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; @@ -929,8 +905,6 @@ TranscriptOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptOutputConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.TranscriptOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -950,15 +924,11 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptOutputConfig.toObject = function toObject(message, options, q) { + TranscriptOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { object.gcsUri = message.gcsUri; if (options.oneofs) object.outputType = "gcsUri"; @@ -1071,15 +1041,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer, q) { + StreamingRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audioContent); return writer; @@ -1095,7 +1061,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -1170,7 +1136,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v1.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -1178,7 +1144,7 @@ return "streamingConfig." + error; } } - if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { + if (message.audioContent != null && message.hasOwnProperty("audioContent")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -1199,15 +1165,13 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognizeRequest(); if (object.streamingConfig != null) { - if (!$util.isObject(object.streamingConfig)) + if (typeof object.streamingConfig !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -1228,20 +1192,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options, q) { + StreamingRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v1.StreamingRecognitionConfig.toObject(message.streamingConfig, options); if (options.oneofs) object.streamingRequest = "streamingConfig"; } - if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { + if (message.audioContent != null && message.hasOwnProperty("audioContent")) { object.audioContent = options.bytes === String ? $util.base64.encode(message.audioContent, 0, message.audioContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.audioContent) : message.audioContent; if (options.oneofs) object.streamingRequest = "audioContent"; @@ -1367,15 +1327,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer, q) { + StreamingRecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) @@ -1383,7 +1339,7 @@ if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -1397,7 +1353,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -1483,21 +1439,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) if (typeof message.singleUtterance !== "boolean") return "singleUtterance: boolean expected"; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { var error = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; @@ -1516,15 +1472,13 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v1.RecognitionConfig.fromObject(object.config, long + 1); } @@ -1535,7 +1489,7 @@ if (object.enableVoiceActivityEvents != null) message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); if (object.voiceActivityTimeout != null) { - if (!$util.isObject(object.voiceActivityTimeout)) + if (typeof object.voiceActivityTimeout !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -1551,13 +1505,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options, q) { + StreamingRecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; @@ -1566,16 +1516,16 @@ object.enableVoiceActivityEvents = false; object.voiceActivityTimeout = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1.RecognitionConfig.toObject(message.config, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) object.singleUtterance = message.singleUtterance; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) object.interimResults = message.interimResults; - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); return object; }; @@ -1667,17 +1617,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer, q) { + VoiceActivityTimeout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -1691,7 +1637,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -1765,12 +1711,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -1789,20 +1735,18 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (!$util.isObject(object.speechStartTimeout)) + if (typeof object.speechStartTimeout !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (!$util.isObject(object.speechEndTimeout)) + if (typeof object.speechEndTimeout !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -1818,22 +1762,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options, q) { + VoiceActivityTimeout.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); return object; }; @@ -2095,13 +2035,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer, q) { + RecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -2114,13 +2050,13 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.profanityFilter); if (message.speechContexts != null && message.speechContexts.length) for (var i = 0; i < message.speechContexts.length; ++i) - $root.google.cloud.speech.v1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.audioChannelCount); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableWordTimeOffsets); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutomaticPunctuation); if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) @@ -2135,15 +2071,15 @@ for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) writer.uint32(/* id 18, wireType 2 =*/146).string(message.alternativeLanguageCodes[i]); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -2157,7 +2093,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -2307,7 +2243,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -2323,42 +2259,42 @@ case 9: break; } - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; - if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) if (typeof message.enableSeparateRecognitionPerChannel !== "boolean") return "enableSeparateRecognitionPerChannel: boolean expected"; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; - if (message.alternativeLanguageCodes != null && Object.hasOwnProperty.call(message, "alternativeLanguageCodes")) { + if (message.alternativeLanguageCodes != null && message.hasOwnProperty("alternativeLanguageCodes")) { if (!Array.isArray(message.alternativeLanguageCodes)) return "alternativeLanguageCodes: array expected"; for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) if (!$util.isString(message.alternativeLanguageCodes[i])) return "alternativeLanguageCodes: string[] expected"; } - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { + if (message.adaptation != null && message.hasOwnProperty("adaptation")) { var error = $root.google.cloud.speech.v1.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { var error = $root.google.cloud.speech.v1.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.speechContexts != null && Object.hasOwnProperty.call(message, "speechContexts")) { + if (message.speechContexts != null && message.hasOwnProperty("speechContexts")) { if (!Array.isArray(message.speechContexts)) return "speechContexts: array expected"; for (var i = 0; i < message.speechContexts.length; ++i) { @@ -2367,39 +2303,39 @@ return "speechContexts." + error; } } - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) { + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenPunctuation, long + 1); if (error) return "enableSpokenPunctuation." + error; } - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) { + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenEmojis, long + 1); if (error) return "enableSpokenEmojis." + error; } - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { var error = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v1.RecognitionMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) + if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) if (typeof message.useEnhanced !== "boolean") return "useEnhanced: boolean expected"; return null; @@ -2416,8 +2352,6 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2491,12 +2425,12 @@ if (object.profanityFilter != null) message.profanityFilter = Boolean(object.profanityFilter); if (object.adaptation != null) { - if (!$util.isObject(object.adaptation)) + if (typeof object.adaptation !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (!$util.isObject(object.transcriptNormalization)) + if (typeof object.transcriptNormalization !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } @@ -2505,7 +2439,7 @@ throw TypeError(".google.cloud.speech.v1.RecognitionConfig.speechContexts: array expected"); message.speechContexts = []; for (var i = 0; i < object.speechContexts.length; ++i) { - if (!$util.isObject(object.speechContexts[i])) + if (typeof object.speechContexts[i] !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.speechContexts: object expected"); message.speechContexts[i] = $root.google.cloud.speech.v1.SpeechContext.fromObject(object.speechContexts[i], long + 1); } @@ -2517,22 +2451,22 @@ if (object.enableAutomaticPunctuation != null) message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); if (object.enableSpokenPunctuation != null) { - if (!$util.isObject(object.enableSpokenPunctuation)) + if (typeof object.enableSpokenPunctuation !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.enableSpokenPunctuation: object expected"); message.enableSpokenPunctuation = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenPunctuation, long + 1); } if (object.enableSpokenEmojis != null) { - if (!$util.isObject(object.enableSpokenEmojis)) + if (typeof object.enableSpokenEmojis !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.enableSpokenEmojis: object expected"); message.enableSpokenEmojis = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenEmojis, long + 1); } if (object.diarizationConfig != null) { - if (!$util.isObject(object.diarizationConfig)) + if (typeof object.diarizationConfig !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v1.RecognitionConfig.metadata: object expected"); message.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.fromObject(object.metadata, long + 1); } @@ -2552,13 +2486,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options, q) { + RecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.speechContexts = []; @@ -2584,52 +2514,52 @@ object.enableSpokenEmojis = null; object.transcriptNormalization = null; } - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v1.RecognitionConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v1.RecognitionConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) object.profanityFilter = message.profanityFilter; if (message.speechContexts && message.speechContexts.length) { object.speechContexts = []; for (var j = 0; j < message.speechContexts.length; ++j) - object.speechContexts[j] = $root.google.cloud.speech.v1.SpeechContext.toObject(message.speechContexts[j], options, q + 1); + object.speechContexts[j] = $root.google.cloud.speech.v1.SpeechContext.toObject(message.speechContexts[j], options); } - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) object.audioChannelCount = message.audioChannelCount; - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.toObject(message.metadata, options, q + 1); - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v1.RecognitionMetadata.toObject(message.metadata, options); + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) object.enableSeparateRecognitionPerChannel = message.enableSeparateRecognitionPerChannel; - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) object.model = message.model; - if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) + if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) object.useEnhanced = message.useEnhanced; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; if (message.alternativeLanguageCodes && message.alternativeLanguageCodes.length) { object.alternativeLanguageCodes = []; for (var j = 0; j < message.alternativeLanguageCodes.length; ++j) object.alternativeLanguageCodes[j] = message.alternativeLanguageCodes[j]; } - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - object.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.toObject(message.adaptation, options, q + 1); - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options, q + 1); - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options, q + 1); - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); + if (message.adaptation != null && message.hasOwnProperty("adaptation")) + object.adaptation = $root.google.cloud.speech.v1.SpeechAdaptation.toObject(message.adaptation, options); + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) + object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options); + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) + object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options); + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v1.TranscriptNormalization.toObject(message.transcriptNormalization, options); return object; }; @@ -2772,13 +2702,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer, q) { + SpeakerDiarizationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeakerDiarization); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) @@ -2800,7 +2726,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -2882,16 +2808,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; return null; @@ -2908,8 +2834,6 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeakerDiarizationConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -2935,13 +2859,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { + SpeakerDiarizationConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableSpeakerDiarization = false; @@ -2949,13 +2869,13 @@ object.maxSpeakerCount = 0; object.speakerTag = 0; } - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) object.speakerTag = message.speakerTag; return object; }; @@ -3105,13 +3025,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionMetadata.encode = function encode(message, writer, q) { + RecognitionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.interactionType); if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) @@ -3141,7 +3057,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -3239,7 +3155,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) + if (message.interactionType != null && message.hasOwnProperty("interactionType")) switch (message.interactionType) { default: return "interactionType: enum value expected"; @@ -3254,10 +3170,10 @@ case 8: break; } - if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) if (!$util.isInteger(message.industryNaicsCodeOfAudio)) return "industryNaicsCodeOfAudio: integer expected"; - if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) + if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) switch (message.microphoneDistance) { default: return "microphoneDistance: enum value expected"; @@ -3267,7 +3183,7 @@ case 3: break; } - if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) + if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) switch (message.originalMediaType) { default: return "originalMediaType: enum value expected"; @@ -3276,7 +3192,7 @@ case 2: break; } - if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) + if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) switch (message.recordingDeviceType) { default: return "recordingDeviceType: enum value expected"; @@ -3289,13 +3205,13 @@ case 6: break; } - if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) + if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) if (!$util.isString(message.recordingDeviceName)) return "recordingDeviceName: string expected"; - if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) + if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) if (!$util.isString(message.originalMimeType)) return "originalMimeType: string expected"; - if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) + if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) if (!$util.isString(message.audioTopic)) return "audioTopic: string expected"; return null; @@ -3312,8 +3228,6 @@ RecognitionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.RecognitionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3463,13 +3377,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionMetadata.toObject = function toObject(message, options, q) { + RecognitionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interactionType = options.enums === String ? "INTERACTION_TYPE_UNSPECIFIED" : 0; @@ -3481,21 +3391,21 @@ object.originalMimeType = ""; object.audioTopic = ""; } - if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) + if (message.interactionType != null && message.hasOwnProperty("interactionType")) object.interactionType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.InteractionType[message.interactionType] === undefined ? message.interactionType : $root.google.cloud.speech.v1.RecognitionMetadata.InteractionType[message.interactionType] : message.interactionType; - if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) object.industryNaicsCodeOfAudio = message.industryNaicsCodeOfAudio; - if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) + if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) object.microphoneDistance = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] === undefined ? message.microphoneDistance : $root.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] : message.microphoneDistance; - if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) + if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) object.originalMediaType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] === undefined ? message.originalMediaType : $root.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] : message.originalMediaType; - if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) + if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) object.recordingDeviceType = options.enums === String ? $root.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] === undefined ? message.recordingDeviceType : $root.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] : message.recordingDeviceType; - if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) + if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) object.recordingDeviceName = message.recordingDeviceName; - if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) + if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) object.originalMimeType = message.originalMimeType; - if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) + if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) object.audioTopic = message.audioTopic; return object; }; @@ -3678,13 +3588,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechContext.encode = function encode(message, writer, q) { + SpeechContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); @@ -3703,7 +3609,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -3779,14 +3685,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { + if (message.phrases != null && message.hasOwnProperty("phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) if (!$util.isString(message.phrases[i])) return "phrases: string[] expected"; } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -3803,8 +3709,6 @@ SpeechContext.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechContext) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechContext: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -3831,13 +3735,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechContext.toObject = function toObject(message, options, q) { + SpeechContext.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -3848,7 +3748,7 @@ for (var j = 0; j < message.phrases.length; ++j) object.phrases[j] = message.phrases[j]; } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -3958,13 +3858,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionAudio.encode = function encode(message, writer, q) { + RecognitionAudio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) @@ -3982,7 +3878,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -4057,12 +3953,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -4083,8 +3979,6 @@ RecognitionAudio.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognitionAudio) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.RecognitionAudio: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4109,20 +4003,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionAudio.toObject = function toObject(message, options, q) { + RecognitionAudio.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; @@ -4240,20 +4130,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer, q) { + RecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.requestId); return writer; @@ -4269,7 +4155,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -4353,7 +4239,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -4362,17 +4248,17 @@ return "results." + error; } } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -4389,8 +4275,6 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.RecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4401,24 +4285,24 @@ throw TypeError(".google.cloud.speech.v1.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1.RecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1.RecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -4437,13 +4321,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options, q) { + RecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -4452,23 +4332,21 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); - } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options); + } + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -4603,24 +4481,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeResponse.encode = function encode(message, writer, q) { + LongRunningRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.requestId); return writer; @@ -4636,7 +4510,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -4728,7 +4602,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -4737,27 +4611,27 @@ return "results." + error; } } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { var error = $root.google.cloud.speech.v1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; } - if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) { + if (message.outputError != null && message.hasOwnProperty("outputError")) { var error = $root.google.rpc.Status.verify(message.outputError, long + 1); if (error) return "outputError." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -4774,8 +4648,6 @@ LongRunningRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -4786,34 +4658,34 @@ throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.outputConfig != null) { - if (!$util.isObject(object.outputConfig)) + if (typeof object.outputConfig !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } if (object.outputError != null) { - if (!$util.isObject(object.outputError)) + if (typeof object.outputError !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.outputError: object expected"); message.outputError = $root.google.rpc.Status.fromObject(object.outputError, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -4832,13 +4704,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeResponse.toObject = function toObject(message, options, q) { + LongRunningRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -4849,27 +4717,25 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); - } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); - if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - object.outputError = $root.google.rpc.Status.toObject(message.outputError, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1.SpeechRecognitionResult.toObject(message.results[j], options); + } + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1.TranscriptOutputConfig.toObject(message.outputConfig, options); + if (message.outputError != null && message.hasOwnProperty("outputError")) + object.outputError = $root.google.rpc.Status.toObject(message.outputError, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -4985,19 +4851,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeMetadata.encode = function encode(message, writer, q) { + LongRunningRecognizeMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); return writer; @@ -5013,7 +4875,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -5095,20 +4957,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) { + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime, long + 1); if (error) return "lastUpdateTime." + error; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -5125,8 +4987,6 @@ LongRunningRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.LongRunningRecognizeMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -5135,12 +4995,12 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.startTime != null) { - if (!$util.isObject(object.startTime)) + if (typeof object.startTime !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.lastUpdateTime != null) { - if (!$util.isObject(object.lastUpdateTime)) + if (typeof object.lastUpdateTime !== "object") throw TypeError(".google.cloud.speech.v1.LongRunningRecognizeMetadata.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime, long + 1); } @@ -5158,13 +5018,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeMetadata.toObject = function toObject(message, options, q) { + LongRunningRecognizeMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; @@ -5172,13 +5028,13 @@ object.lastUpdateTime = null; object.uri = ""; } - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) object.progressPercent = message.progressPercent; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options, q + 1); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; return object; }; @@ -5320,26 +5176,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer, q) { + StreamingRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 10, wireType 0 =*/80).int64(message.requestId); return writer; @@ -5355,7 +5207,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -5451,12 +5303,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (message.error != null && message.hasOwnProperty("error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -5465,7 +5317,7 @@ return "results." + error; } } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -5476,22 +5328,22 @@ case 4: break; } - if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) { + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { var error = $root.google.protobuf.Duration.verify(message.speechEventTime, long + 1); if (error) return "speechEventTime." + error; } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -5508,15 +5360,13 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.StreamingRecognizeResponse(); if (object.error != null) { - if (!$util.isObject(object.error)) + if (typeof object.error !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -5525,7 +5375,7 @@ throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -5559,23 +5409,23 @@ break; } if (object.speechEventTime != null) { - if (!$util.isObject(object.speechEventTime)) + if (typeof object.speechEventTime !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.speechEventTime: object expected"); message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime, long + 1); } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -5594,13 +5444,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options, q) { + StreamingRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -5612,29 +5458,27 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; } - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); + object.results[j] = $root.google.cloud.speech.v1.StreamingRecognitionResult.toObject(message.results[j], options); } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -5789,22 +5633,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer, q) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -5822,7 +5662,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -5914,7 +5754,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -5923,21 +5763,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -5954,8 +5794,6 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.StreamingRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -5966,7 +5804,7 @@ throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -5976,7 +5814,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndTime != null) { - if (!$util.isObject(object.resultEndTime)) + if (typeof object.resultEndTime !== "object") throw TypeError(".google.cloud.speech.v1.StreamingRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -5996,13 +5834,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options, q) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -6016,17 +5850,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -6141,20 +5975,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer, q) { + SpeechRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -6170,7 +6000,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -6254,7 +6084,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -6263,15 +6093,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -6288,8 +6118,6 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6300,7 +6128,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -6308,7 +6136,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndTime != null) { - if (!$util.isObject(object.resultEndTime)) + if (typeof object.resultEndTime !== "object") throw TypeError(".google.cloud.speech.v1.SpeechRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -6326,13 +6154,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options, q) { + SpeechRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -6344,13 +6168,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -6456,20 +6280,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer, q) { + SpeechRecognitionAlternative.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -6483,7 +6303,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -6563,13 +6383,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && Object.hasOwnProperty.call(message, "words")) { + if (message.words != null && message.hasOwnProperty("words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -6592,8 +6412,6 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechRecognitionAlternative) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -6608,7 +6426,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (!$util.isObject(object.words[i])) + if (typeof object.words[i] !== "object") throw TypeError(".google.cloud.speech.v1.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v1.WordInfo.fromObject(object.words[i], long + 1); } @@ -6625,13 +6443,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { + SpeechRecognitionAlternative.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -6639,14 +6453,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v1.WordInfo.toObject(message.words[j], options, q + 1); + object.words[j] = $root.google.cloud.speech.v1.WordInfo.toObject(message.words[j], options); } return object; }; @@ -6778,17 +6592,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer, q) { + WordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -6810,7 +6620,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -6900,26 +6710,26 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Duration.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + if (message.endTime != null && message.hasOwnProperty("endTime")) { var error = $root.google.protobuf.Duration.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.word != null && message.hasOwnProperty("word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -6936,20 +6746,18 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.WordInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.WordInfo(); if (object.startTime != null) { - if (!$util.isObject(object.startTime)) + if (typeof object.startTime !== "object") throw TypeError(".google.cloud.speech.v1.WordInfo.startTime: object expected"); message.startTime = $root.google.protobuf.Duration.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (!$util.isObject(object.endTime)) + if (typeof object.endTime !== "object") throw TypeError(".google.cloud.speech.v1.WordInfo.endTime: object expected"); message.endTime = $root.google.protobuf.Duration.fromObject(object.endTime, long + 1); } @@ -6973,13 +6781,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options, q) { + WordInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startTime = null; @@ -6989,17 +6793,17 @@ object.speakerTag = 0; object.speakerLabel = ""; } - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options, q + 1); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options, q + 1); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options); + if (message.word != null && message.hasOwnProperty("word")) object.word = message.word; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) object.speakerTag = message.speakerTag; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -7095,13 +6899,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptationInfo.encode = function encode(message, writer, q) { + SpeechAdaptationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.adaptationTimeout); if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) @@ -7119,7 +6919,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -7193,10 +6993,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) + if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) if (typeof message.adaptationTimeout !== "boolean") return "adaptationTimeout: boolean expected"; - if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) + if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) if (!$util.isString(message.timeoutMessage)) return "timeoutMessage: string expected"; return null; @@ -7213,8 +7013,6 @@ SpeechAdaptationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptationInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechAdaptationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7236,21 +7034,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptationInfo.toObject = function toObject(message, options, q) { + SpeechAdaptationInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.adaptationTimeout = false; object.timeoutMessage = ""; } - if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) + if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) object.adaptationTimeout = message.adaptationTimeout; - if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) + if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) object.timeoutMessage = message.timeoutMessage; return object; }; @@ -7356,20 +7150,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer, q) { + CustomClass.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -7383,7 +7173,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -7463,13 +7253,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.items != null && Object.hasOwnProperty.call(message, "items")) { + if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -7492,8 +7282,6 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CustomClass) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7508,7 +7296,7 @@ throw TypeError(".google.cloud.speech.v1.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (!$util.isObject(object.items[i])) + if (typeof object.items[i] !== "object") throw TypeError(".google.cloud.speech.v1.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v1.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -7525,13 +7313,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options, q) { + CustomClass.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -7539,14 +7323,14 @@ object.name = ""; object.customClassId = ""; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) object.customClassId = message.customClassId; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v1.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); + object.items[j] = $root.google.cloud.speech.v1.CustomClass.ClassItem.toObject(message.items[j], options); } return object; }; @@ -7630,13 +7414,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer, q) { + ClassItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -7652,7 +7432,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -7722,7 +7502,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -7739,8 +7519,6 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CustomClass.ClassItem) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -7760,17 +7538,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options, q) { + ClassItem.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -7879,18 +7653,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer, q) { + PhraseSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); return writer; @@ -7906,7 +7676,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -7986,10 +7756,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { + if (message.phrases != null && message.hasOwnProperty("phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -7998,7 +7768,7 @@ return "phrases." + error; } } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -8015,8 +7785,6 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.PhraseSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8029,7 +7797,7 @@ throw TypeError(".google.cloud.speech.v1.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (!$util.isObject(object.phrases[i])) + if (typeof object.phrases[i] !== "object") throw TypeError(".google.cloud.speech.v1.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v1.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -8048,13 +7816,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options, q) { + PhraseSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -8062,14 +7826,14 @@ object.name = ""; object.boost = 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v1.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); + object.phrases[j] = $root.google.cloud.speech.v1.PhraseSet.Phrase.toObject(message.phrases[j], options); } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -8162,13 +7926,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer, q) { + Phrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -8186,7 +7946,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -8260,10 +8020,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -8280,8 +8040,6 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.PhraseSet.Phrase) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8303,21 +8061,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options, q) { + Phrase.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -8437,24 +8191,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer, q) { + SpeechAdaptation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.phraseSetReferences != null && message.phraseSetReferences.length) for (var i = 0; i < message.phraseSetReferences.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetReferences[i]); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -8468,7 +8218,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -8556,7 +8306,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -8565,14 +8315,14 @@ return "phraseSets." + error; } } - if (message.phraseSetReferences != null && Object.hasOwnProperty.call(message, "phraseSetReferences")) { + if (message.phraseSetReferences != null && message.hasOwnProperty("phraseSetReferences")) { if (!Array.isArray(message.phraseSetReferences)) return "phraseSetReferences: array expected"; for (var i = 0; i < message.phraseSetReferences.length; ++i) if (!$util.isString(message.phraseSetReferences[i])) return "phraseSetReferences: string[] expected"; } - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -8581,7 +8331,7 @@ return "customClasses." + error; } } - if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) { + if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) { var error = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.verify(message.abnfGrammar, long + 1); if (error) return "abnfGrammar." + error; @@ -8600,8 +8350,6 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptation) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8612,7 +8360,7 @@ throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -8629,13 +8377,13 @@ throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClasses[i], long + 1); } } if (object.abnfGrammar != null) { - if (!$util.isObject(object.abnfGrammar)) + if (typeof object.abnfGrammar !== "object") throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.abnfGrammar: object expected"); message.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.fromObject(object.abnfGrammar, long + 1); } @@ -8651,13 +8399,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options, q) { + SpeechAdaptation.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -8669,7 +8413,7 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options); } if (message.phraseSetReferences && message.phraseSetReferences.length) { object.phraseSetReferences = []; @@ -8679,10 +8423,10 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options); } - if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - object.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options, q + 1); + if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) + object.abnfGrammar = $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options); return object; }; @@ -8766,13 +8510,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ABNFGrammar.encode = function encode(message, writer, q) { + ABNFGrammar.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.abnfStrings != null && message.abnfStrings.length) for (var i = 0; i < message.abnfStrings.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.abnfStrings[i]); @@ -8789,7 +8529,7 @@ * @returns {$protobuf.Writer} Writer */ ABNFGrammar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -8861,7 +8601,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.abnfStrings != null && Object.hasOwnProperty.call(message, "abnfStrings")) { + if (message.abnfStrings != null && message.hasOwnProperty("abnfStrings")) { if (!Array.isArray(message.abnfStrings)) return "abnfStrings: array expected"; for (var i = 0; i < message.abnfStrings.length; ++i) @@ -8882,8 +8622,6 @@ ABNFGrammar.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -8908,13 +8646,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ABNFGrammar.toObject = function toObject(message, options, q) { + ABNFGrammar.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.abnfStrings = []; @@ -9012,16 +8746,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer, q) { + TranscriptNormalization.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -9035,7 +8765,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -9107,7 +8837,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { + if (message.entries != null && message.hasOwnProperty("entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -9130,8 +8860,6 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptNormalization) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9142,7 +8870,7 @@ throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (!$util.isObject(object.entries[i])) + if (typeof object.entries[i] !== "object") throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -9159,20 +8887,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options, q) { + TranscriptNormalization.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); + object.entries[j] = $root.google.cloud.speech.v1.TranscriptNormalization.Entry.toObject(message.entries[j], options); } return object; }; @@ -9274,13 +8998,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer, q) { + Entry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -9300,7 +9020,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -9378,13 +9098,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -9401,8 +9121,6 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.TranscriptNormalization.Entry) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -9426,24 +9144,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options, q) { + Entry.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) object.search = message.search; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) object.replace = message.replace; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -9532,7 +9246,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v1.CreatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v1.CreatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -9565,7 +9279,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v1.GetPhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v1.GetPhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -9598,7 +9312,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listPhraseSet = function listPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSet, $root.google.cloud.speech.v1.ListPhraseSetRequest, $root.google.cloud.speech.v1.ListPhraseSetResponse, request, callback); + return this.rpcCall(listPhraseSet, $root.google.cloud.speech.v1.ListPhraseSetRequest, $root.google.cloud.speech.v1.ListPhraseSetResponse, request, callback); }, "name", { value: "ListPhraseSet" }); /** @@ -9631,7 +9345,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); + return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1.PhraseSet, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -9664,7 +9378,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -9697,7 +9411,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createCustomClass = function createCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v1.CreateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return this.rpcCall(createCustomClass, $root.google.cloud.speech.v1.CreateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -9730,7 +9444,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getCustomClass = function getCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v1.GetCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return this.rpcCall(getCustomClass, $root.google.cloud.speech.v1.GetCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -9763,7 +9477,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v1.ListCustomClassesRequest, $root.google.cloud.speech.v1.ListCustomClassesResponse, request, callback); + return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v1.ListCustomClassesRequest, $root.google.cloud.speech.v1.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -9796,7 +9510,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v1.UpdateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); + return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v1.UpdateCustomClassRequest, $root.google.cloud.speech.v1.CustomClass, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -9829,7 +9543,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -9916,19 +9630,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer, q) { + CreatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetId); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -9942,7 +9652,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -10020,13 +9730,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; @@ -10045,8 +9755,6 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CreatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10057,7 +9765,7 @@ if (object.phraseSetId != null) message.phraseSetId = String(object.phraseSetId); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v1.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -10073,25 +9781,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options, q) { + CreatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.phraseSetId = ""; object.phraseSet = null; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options); return object; }; @@ -10186,17 +9890,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer, q) { + UpdatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -10210,7 +9910,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -10284,12 +9984,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -10308,20 +10008,18 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.UpdatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v1.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -10337,22 +10035,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { + UpdatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; } - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSet, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -10438,13 +10132,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer, q) { + GetPhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -10460,7 +10150,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -10530,7 +10220,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -10547,8 +10237,6 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.GetPhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10568,17 +10256,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options, q) { + GetPhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -10683,13 +10367,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetRequest.encode = function encode(message, writer, q) { + ListPhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -10709,7 +10389,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -10787,13 +10467,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -10810,8 +10490,6 @@ ListPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListPhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.ListPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -10835,24 +10513,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetRequest.toObject = function toObject(message, options, q) { + ListPhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; return object; }; @@ -10949,16 +10623,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetResponse.encode = function encode(message, writer, q) { + ListPhraseSetResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -10974,7 +10644,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -11050,7 +10720,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -11059,7 +10729,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -11076,8 +10746,6 @@ ListPhraseSetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListPhraseSetResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11088,7 +10756,7 @@ throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v1.ListPhraseSetResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -11107,13 +10775,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetResponse.toObject = function toObject(message, options, q) { + ListPhraseSetResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -11122,9 +10786,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v1.PhraseSet.toObject(message.phraseSets[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -11211,13 +10875,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer, q) { + DeletePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -11233,7 +10893,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -11303,7 +10963,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -11320,8 +10980,6 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.DeletePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11341,17 +10999,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options, q) { + DeletePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -11456,19 +11110,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer, q) { + CreateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -11482,7 +11132,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -11560,13 +11210,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; @@ -11585,8 +11235,6 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.CreateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -11597,7 +11245,7 @@ if (object.customClassId != null) message.customClassId = String(object.customClassId); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v1.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClass, long + 1); } @@ -11613,25 +11261,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options, q) { + CreateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.customClassId = ""; object.customClass = null; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) object.customClassId = message.customClassId; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options, q + 1); + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options); return object; }; @@ -11726,17 +11370,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer, q) { + UpdateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -11750,7 +11390,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -11824,12 +11464,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -11848,20 +11488,18 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.UpdateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1.UpdateCustomClassRequest(); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v1.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -11877,22 +11515,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options, q) { + UpdateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; } - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClass, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -11978,13 +11612,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer, q) { + GetCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -12000,7 +11630,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -12070,7 +11700,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -12087,8 +11717,6 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.GetCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12108,17 +11736,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options, q) { + GetCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -12223,13 +11847,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer, q) { + ListCustomClassesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -12249,7 +11869,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -12327,13 +11947,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -12350,8 +11970,6 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListCustomClassesRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12375,24 +11993,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options, q) { + ListCustomClassesRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; return object; }; @@ -12489,16 +12103,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer, q) { + ListCustomClassesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -12514,7 +12124,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -12590,7 +12200,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -12599,7 +12209,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -12616,8 +12226,6 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.ListCustomClassesResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12628,7 +12236,7 @@ throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v1.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -12647,13 +12255,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options, q) { + ListCustomClassesResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -12662,9 +12266,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v1.CustomClass.toObject(message.customClasses[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -12751,13 +12355,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer, q) { + DeleteCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -12773,7 +12373,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -12843,7 +12443,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -12860,8 +12460,6 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1.DeleteCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -12881,17 +12479,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options, q) { + DeleteCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -12989,7 +12583,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v1p1beta1.RecognizeRequest, $root.google.cloud.speech.v1p1beta1.RecognizeResponse, request, callback); + return this.rpcCall(recognize, $root.google.cloud.speech.v1p1beta1.RecognizeRequest, $root.google.cloud.speech.v1p1beta1.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -13022,7 +12616,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.longRunningRecognize = function longRunningRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, longRunningRecognize, $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(longRunningRecognize, $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "LongRunningRecognize" }); /** @@ -13055,7 +12649,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse, request, callback); + return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest, $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -13133,17 +12727,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer, q) { + RecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -13157,7 +12747,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -13231,12 +12821,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; @@ -13255,20 +12845,18 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.RecognizeRequest(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (!$util.isObject(object.audio)) + if (typeof object.audio !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.fromObject(object.audio, long + 1); } @@ -13284,22 +12872,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options, q) { + RecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options); return object; }; @@ -13403,19 +12987,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeRequest.encode = function encode(message, writer, q) { + LongRunningRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionAudio.encode(message.audio, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -13429,7 +13009,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -13507,17 +13087,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.verify(message.audio, long + 1); if (error) return "audio." + error; } - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -13536,25 +13116,23 @@ LongRunningRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } if (object.audio != null) { - if (!$util.isObject(object.audio)) + if (typeof object.audio !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.audio: object expected"); message.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.fromObject(object.audio, long + 1); } if (object.outputConfig != null) { - if (!$util.isObject(object.outputConfig)) + if (typeof object.outputConfig !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -13570,25 +13148,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeRequest.toObject = function toObject(message, options, q) { + LongRunningRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.audio = null; object.outputConfig = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) - object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options, q + 1); - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); + if (message.audio != null && message.hasOwnProperty("audio")) + object.audio = $root.google.cloud.speech.v1p1beta1.RecognitionAudio.toObject(message.audio, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); return object; }; @@ -13688,13 +13262,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptOutputConfig.encode = function encode(message, writer, q) { + TranscriptOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsUri); return writer; @@ -13710,7 +13280,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -13781,7 +13351,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { properties.outputType = 1; if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; @@ -13800,8 +13370,6 @@ TranscriptOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -13821,15 +13389,11 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptOutputConfig.toObject = function toObject(message, options, q) { + TranscriptOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) { + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { object.gcsUri = message.gcsUri; if (options.oneofs) object.outputType = "gcsUri"; @@ -13942,15 +13506,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer, q) { + StreamingRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.audioContent); return writer; @@ -13966,7 +13526,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -14041,7 +13601,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -14049,7 +13609,7 @@ return "streamingConfig." + error; } } - if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { + if (message.audioContent != null && message.hasOwnProperty("audioContent")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -14070,15 +13630,13 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest(); if (object.streamingConfig != null) { - if (!$util.isObject(object.streamingConfig)) + if (typeof object.streamingConfig !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -14099,20 +13657,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options, q) { + StreamingRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.toObject(message.streamingConfig, options); if (options.oneofs) object.streamingRequest = "streamingConfig"; } - if (message.audioContent != null && Object.hasOwnProperty.call(message, "audioContent")) { + if (message.audioContent != null && message.hasOwnProperty("audioContent")) { object.audioContent = options.bytes === String ? $util.base64.encode(message.audioContent, 0, message.audioContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.audioContent) : message.audioContent; if (options.oneofs) object.streamingRequest = "audioContent"; @@ -14238,15 +13792,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer, q) { + StreamingRecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.singleUtterance); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) @@ -14254,7 +13804,7 @@ if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enableVoiceActivityEvents); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -14268,7 +13818,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -14354,21 +13904,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) if (typeof message.singleUtterance !== "boolean") return "singleUtterance: boolean expected"; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { var error = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; @@ -14387,15 +13937,13 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.fromObject(object.config, long + 1); } @@ -14406,7 +13954,7 @@ if (object.enableVoiceActivityEvents != null) message.enableVoiceActivityEvents = Boolean(object.enableVoiceActivityEvents); if (object.voiceActivityTimeout != null) { - if (!$util.isObject(object.voiceActivityTimeout)) + if (typeof object.voiceActivityTimeout !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -14422,13 +13970,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options, q) { + StreamingRecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; @@ -14437,16 +13981,16 @@ object.enableVoiceActivityEvents = false; object.voiceActivityTimeout = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v1p1beta1.RecognitionConfig.toObject(message.config, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) object.singleUtterance = message.singleUtterance; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) object.interimResults = message.interimResults; - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); return object; }; @@ -14538,17 +14082,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer, q) { + VoiceActivityTimeout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -14562,7 +14102,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -14636,12 +14176,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -14660,20 +14200,18 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (!$util.isObject(object.speechStartTimeout)) + if (typeof object.speechStartTimeout !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (!$util.isObject(object.speechEndTimeout)) + if (typeof object.speechEndTimeout !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -14689,22 +14227,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options, q) { + VoiceActivityTimeout.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); return object; }; @@ -14984,13 +14518,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer, q) { + RecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -15003,13 +14533,13 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.profanityFilter); if (message.speechContexts != null && message.speechContexts.length) for (var i = 0; i < message.speechContexts.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechContext.encode(message.speechContexts[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.audioChannelCount); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableWordTimeOffsets); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.encode(message.metadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableAutomaticPunctuation); if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) @@ -15028,15 +14558,15 @@ for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) writer.uint32(/* id 18, wireType 2 =*/146).string(message.alternativeLanguageCodes[i]); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenPunctuation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); + $root.google.protobuf.BoolValue.encode(message.enableSpokenEmojis, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -15050,7 +14580,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -15208,7 +14738,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -15225,42 +14755,42 @@ case 10: break; } - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; - if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) if (typeof message.enableSeparateRecognitionPerChannel !== "boolean") return "enableSeparateRecognitionPerChannel: boolean expected"; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; - if (message.alternativeLanguageCodes != null && Object.hasOwnProperty.call(message, "alternativeLanguageCodes")) { + if (message.alternativeLanguageCodes != null && message.hasOwnProperty("alternativeLanguageCodes")) { if (!Array.isArray(message.alternativeLanguageCodes)) return "alternativeLanguageCodes: array expected"; for (var i = 0; i < message.alternativeLanguageCodes.length; ++i) if (!$util.isString(message.alternativeLanguageCodes[i])) return "alternativeLanguageCodes: string[] expected"; } - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { + if (message.adaptation != null && message.hasOwnProperty("adaptation")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.speechContexts != null && Object.hasOwnProperty.call(message, "speechContexts")) { + if (message.speechContexts != null && message.hasOwnProperty("speechContexts")) { if (!Array.isArray(message.speechContexts)) return "speechContexts: array expected"; for (var i = 0; i < message.speechContexts.length; ++i) { @@ -15269,45 +14799,45 @@ return "speechContexts." + error; } } - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) { + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenPunctuation, long + 1); if (error) return "enableSpokenPunctuation." + error; } - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) { + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) { var error = $root.google.protobuf.BoolValue.verify(message.enableSpokenEmojis, long + 1); if (error) return "enableSpokenEmojis." + error; } - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.diarizationSpeakerCount != null && Object.hasOwnProperty.call(message, "diarizationSpeakerCount")) + if (message.diarizationSpeakerCount != null && message.hasOwnProperty("diarizationSpeakerCount")) if (!$util.isInteger(message.diarizationSpeakerCount)) return "diarizationSpeakerCount: integer expected"; - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { var error = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) + if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) if (typeof message.useEnhanced !== "boolean") return "useEnhanced: boolean expected"; return null; @@ -15324,8 +14854,6 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15403,12 +14931,12 @@ if (object.profanityFilter != null) message.profanityFilter = Boolean(object.profanityFilter); if (object.adaptation != null) { - if (!$util.isObject(object.adaptation)) + if (typeof object.adaptation !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (!$util.isObject(object.transcriptNormalization)) + if (typeof object.transcriptNormalization !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } @@ -15417,7 +14945,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.speechContexts: array expected"); message.speechContexts = []; for (var i = 0; i < object.speechContexts.length; ++i) { - if (!$util.isObject(object.speechContexts[i])) + if (typeof object.speechContexts[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.speechContexts: object expected"); message.speechContexts[i] = $root.google.cloud.speech.v1p1beta1.SpeechContext.fromObject(object.speechContexts[i], long + 1); } @@ -15429,12 +14957,12 @@ if (object.enableAutomaticPunctuation != null) message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); if (object.enableSpokenPunctuation != null) { - if (!$util.isObject(object.enableSpokenPunctuation)) + if (typeof object.enableSpokenPunctuation !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.enableSpokenPunctuation: object expected"); message.enableSpokenPunctuation = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenPunctuation, long + 1); } if (object.enableSpokenEmojis != null) { - if (!$util.isObject(object.enableSpokenEmojis)) + if (typeof object.enableSpokenEmojis !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.enableSpokenEmojis: object expected"); message.enableSpokenEmojis = $root.google.protobuf.BoolValue.fromObject(object.enableSpokenEmojis, long + 1); } @@ -15443,12 +14971,12 @@ if (object.diarizationSpeakerCount != null) message.diarizationSpeakerCount = object.diarizationSpeakerCount | 0; if (object.diarizationConfig != null) { - if (!$util.isObject(object.diarizationConfig)) + if (typeof object.diarizationConfig !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionConfig.metadata: object expected"); message.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.fromObject(object.metadata, long + 1); } @@ -15468,13 +14996,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options, q) { + RecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.speechContexts = []; @@ -15502,56 +15026,56 @@ object.enableSpokenEmojis = null; object.transcriptNormalization = null; } - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) object.profanityFilter = message.profanityFilter; if (message.speechContexts && message.speechContexts.length) { object.speechContexts = []; for (var j = 0; j < message.speechContexts.length; ++j) - object.speechContexts[j] = $root.google.cloud.speech.v1p1beta1.SpeechContext.toObject(message.speechContexts[j], options, q + 1); + object.speechContexts[j] = $root.google.cloud.speech.v1p1beta1.SpeechContext.toObject(message.speechContexts[j], options); } - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) object.audioChannelCount = message.audioChannelCount; - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.toObject(message.metadata, options, q + 1); - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.toObject(message.metadata, options); + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.enableSeparateRecognitionPerChannel != null && Object.hasOwnProperty.call(message, "enableSeparateRecognitionPerChannel")) + if (message.enableSeparateRecognitionPerChannel != null && message.hasOwnProperty("enableSeparateRecognitionPerChannel")) object.enableSeparateRecognitionPerChannel = message.enableSeparateRecognitionPerChannel; - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) object.model = message.model; - if (message.useEnhanced != null && Object.hasOwnProperty.call(message, "useEnhanced")) + if (message.useEnhanced != null && message.hasOwnProperty("useEnhanced")) object.useEnhanced = message.useEnhanced; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.diarizationSpeakerCount != null && Object.hasOwnProperty.call(message, "diarizationSpeakerCount")) + if (message.diarizationSpeakerCount != null && message.hasOwnProperty("diarizationSpeakerCount")) object.diarizationSpeakerCount = message.diarizationSpeakerCount; if (message.alternativeLanguageCodes && message.alternativeLanguageCodes.length) { object.alternativeLanguageCodes = []; for (var j = 0; j < message.alternativeLanguageCodes.length; ++j) object.alternativeLanguageCodes[j] = message.alternativeLanguageCodes[j]; } - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - object.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.toObject(message.adaptation, options, q + 1); - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) - object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options, q + 1); - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) - object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options, q + 1); - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); + if (message.adaptation != null && message.hasOwnProperty("adaptation")) + object.adaptation = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.toObject(message.adaptation, options); + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) + object.enableSpokenPunctuation = $root.google.protobuf.BoolValue.toObject(message.enableSpokenPunctuation, options); + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) + object.enableSpokenEmojis = $root.google.protobuf.BoolValue.toObject(message.enableSpokenEmojis, options); + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.toObject(message.transcriptNormalization, options); return object; }; @@ -15696,13 +15220,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer, q) { + SpeakerDiarizationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableSpeakerDiarization); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) @@ -15724,7 +15244,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -15806,16 +15326,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) if (typeof message.enableSpeakerDiarization !== "boolean") return "enableSpeakerDiarization: boolean expected"; - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; return null; @@ -15832,8 +15352,6 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -15859,13 +15377,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { + SpeakerDiarizationConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableSpeakerDiarization = false; @@ -15873,13 +15387,13 @@ object.maxSpeakerCount = 0; object.speakerTag = 0; } - if (message.enableSpeakerDiarization != null && Object.hasOwnProperty.call(message, "enableSpeakerDiarization")) + if (message.enableSpeakerDiarization != null && message.hasOwnProperty("enableSpeakerDiarization")) object.enableSpeakerDiarization = message.enableSpeakerDiarization; - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) object.speakerTag = message.speakerTag; return object; }; @@ -16038,13 +15552,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionMetadata.encode = function encode(message, writer, q) { + RecognitionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.interactionType); if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) @@ -16076,7 +15586,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -16178,7 +15688,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) + if (message.interactionType != null && message.hasOwnProperty("interactionType")) switch (message.interactionType) { default: return "interactionType: enum value expected"; @@ -16193,10 +15703,10 @@ case 8: break; } - if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) if (!$util.isInteger(message.industryNaicsCodeOfAudio)) return "industryNaicsCodeOfAudio: integer expected"; - if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) + if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) switch (message.microphoneDistance) { default: return "microphoneDistance: enum value expected"; @@ -16206,7 +15716,7 @@ case 3: break; } - if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) + if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) switch (message.originalMediaType) { default: return "originalMediaType: enum value expected"; @@ -16215,7 +15725,7 @@ case 2: break; } - if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) + if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) switch (message.recordingDeviceType) { default: return "recordingDeviceType: enum value expected"; @@ -16228,16 +15738,16 @@ case 6: break; } - if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) + if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) if (!$util.isString(message.recordingDeviceName)) return "recordingDeviceName: string expected"; - if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) + if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) if (!$util.isString(message.originalMimeType)) return "originalMimeType: string expected"; - if (message.obfuscatedId != null && Object.hasOwnProperty.call(message, "obfuscatedId")) + if (message.obfuscatedId != null && message.hasOwnProperty("obfuscatedId")) if (!$util.isInteger(message.obfuscatedId) && !(message.obfuscatedId && $util.isInteger(message.obfuscatedId.low) && $util.isInteger(message.obfuscatedId.high))) return "obfuscatedId: integer|Long expected"; - if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) + if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) if (!$util.isString(message.audioTopic)) return "audioTopic: string expected"; return null; @@ -16254,8 +15764,6 @@ RecognitionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16393,7 +15901,7 @@ message.originalMimeType = String(object.originalMimeType); if (object.obfuscatedId != null) if ($util.Long) - message.obfuscatedId = $util.Long.fromValue(object.obfuscatedId, false); + (message.obfuscatedId = $util.Long.fromValue(object.obfuscatedId)).unsigned = false; else if (typeof object.obfuscatedId === "string") message.obfuscatedId = parseInt(object.obfuscatedId, 10); else if (typeof object.obfuscatedId === "number") @@ -16414,13 +15922,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionMetadata.toObject = function toObject(message, options, q) { + RecognitionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.interactionType = options.enums === String ? "INTERACTION_TYPE_UNSPECIFIED" : 0; @@ -16432,33 +15936,31 @@ object.originalMimeType = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.obfuscatedId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.obfuscatedId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.obfuscatedId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.obfuscatedId = options.longs === String ? "0" : 0; object.audioTopic = ""; } - if (message.interactionType != null && Object.hasOwnProperty.call(message, "interactionType")) + if (message.interactionType != null && message.hasOwnProperty("interactionType")) object.interactionType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType[message.interactionType] === undefined ? message.interactionType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType[message.interactionType] : message.interactionType; - if (message.industryNaicsCodeOfAudio != null && Object.hasOwnProperty.call(message, "industryNaicsCodeOfAudio")) + if (message.industryNaicsCodeOfAudio != null && message.hasOwnProperty("industryNaicsCodeOfAudio")) object.industryNaicsCodeOfAudio = message.industryNaicsCodeOfAudio; - if (message.microphoneDistance != null && Object.hasOwnProperty.call(message, "microphoneDistance")) + if (message.microphoneDistance != null && message.hasOwnProperty("microphoneDistance")) object.microphoneDistance = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] === undefined ? message.microphoneDistance : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance[message.microphoneDistance] : message.microphoneDistance; - if (message.originalMediaType != null && Object.hasOwnProperty.call(message, "originalMediaType")) + if (message.originalMediaType != null && message.hasOwnProperty("originalMediaType")) object.originalMediaType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] === undefined ? message.originalMediaType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType[message.originalMediaType] : message.originalMediaType; - if (message.recordingDeviceType != null && Object.hasOwnProperty.call(message, "recordingDeviceType")) + if (message.recordingDeviceType != null && message.hasOwnProperty("recordingDeviceType")) object.recordingDeviceType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] === undefined ? message.recordingDeviceType : $root.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType[message.recordingDeviceType] : message.recordingDeviceType; - if (message.recordingDeviceName != null && Object.hasOwnProperty.call(message, "recordingDeviceName")) + if (message.recordingDeviceName != null && message.hasOwnProperty("recordingDeviceName")) object.recordingDeviceName = message.recordingDeviceName; - if (message.originalMimeType != null && Object.hasOwnProperty.call(message, "originalMimeType")) + if (message.originalMimeType != null && message.hasOwnProperty("originalMimeType")) object.originalMimeType = message.originalMimeType; - if (message.obfuscatedId != null && Object.hasOwnProperty.call(message, "obfuscatedId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.obfuscatedId = typeof message.obfuscatedId === "number" ? BigInt(message.obfuscatedId) : $util.Long.fromBits(message.obfuscatedId.low >>> 0, message.obfuscatedId.high >>> 0, false).toBigInt(); - else if (typeof message.obfuscatedId === "number") + if (message.obfuscatedId != null && message.hasOwnProperty("obfuscatedId")) + if (typeof message.obfuscatedId === "number") object.obfuscatedId = options.longs === String ? String(message.obfuscatedId) : message.obfuscatedId; else object.obfuscatedId = options.longs === String ? $util.Long.prototype.toString.call(message.obfuscatedId) : options.longs === Number ? new $util.LongBits(message.obfuscatedId.low >>> 0, message.obfuscatedId.high >>> 0).toNumber() : message.obfuscatedId; - if (message.audioTopic != null && Object.hasOwnProperty.call(message, "audioTopic")) + if (message.audioTopic != null && message.hasOwnProperty("audioTopic")) object.audioTopic = message.audioTopic; return object; }; @@ -16641,13 +16143,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechContext.encode = function encode(message, writer, q) { + SpeechContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phrases[i]); @@ -16666,7 +16164,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -16742,14 +16240,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { + if (message.phrases != null && message.hasOwnProperty("phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) if (!$util.isString(message.phrases[i])) return "phrases: string[] expected"; } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -16766,8 +16264,6 @@ SpeechContext.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechContext) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechContext: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -16794,13 +16290,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechContext.toObject = function toObject(message, options, q) { + SpeechContext.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -16811,7 +16303,7 @@ for (var j = 0; j < message.phrases.length; ++j) object.phrases[j] = message.phrases[j]; } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -16921,13 +16413,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionAudio.encode = function encode(message, writer, q) { + RecognitionAudio.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.content != null && Object.hasOwnProperty.call(message, "content")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) @@ -16945,7 +16433,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionAudio.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -17020,12 +16508,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -17046,8 +16534,6 @@ RecognitionAudio.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognitionAudio) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.RecognitionAudio: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17072,20 +16558,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionAudio.toObject = function toObject(message, options, q) { + RecognitionAudio.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; @@ -17212,20 +16694,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer, q) { + RecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 8, wireType 0 =*/64).int64(message.requestId); if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) @@ -17243,7 +16721,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -17331,7 +16809,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -17340,20 +16818,20 @@ return "results." + error; } } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; - if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) + if (message.usingLegacyModels != null && message.hasOwnProperty("usingLegacyModels")) if (typeof message.usingLegacyModels !== "boolean") return "usingLegacyModels: boolean expected"; return null; @@ -17370,8 +16848,6 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.RecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17382,24 +16858,24 @@ throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.RecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -17420,13 +16896,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options, q) { + RecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -17435,28 +16907,26 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; object.usingLegacyModels = false; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); - } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options); + } + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; - if (message.usingLegacyModels != null && Object.hasOwnProperty.call(message, "usingLegacyModels")) + if (message.usingLegacyModels != null && message.hasOwnProperty("usingLegacyModels")) object.usingLegacyModels = message.usingLegacyModels; return object; }; @@ -17589,24 +17059,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeResponse.encode = function encode(message, writer, q) { + LongRunningRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.outputError, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 0 =*/72).int64(message.requestId); return writer; @@ -17622,7 +17088,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -17714,7 +17180,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -17723,27 +17189,27 @@ return "results." + error; } } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; } - if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) { + if (message.outputError != null && message.hasOwnProperty("outputError")) { var error = $root.google.rpc.Status.verify(message.outputError, long + 1); if (error) return "outputError." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -17760,8 +17226,6 @@ LongRunningRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -17772,34 +17236,34 @@ throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.outputConfig != null) { - if (!$util.isObject(object.outputConfig)) + if (typeof object.outputConfig !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } if (object.outputError != null) { - if (!$util.isObject(object.outputError)) + if (typeof object.outputError !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.outputError: object expected"); message.outputError = $root.google.rpc.Status.fromObject(object.outputError, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -17818,13 +17282,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeResponse.toObject = function toObject(message, options, q) { + LongRunningRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -17835,27 +17295,25 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; } if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); - } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); - if (message.outputError != null && Object.hasOwnProperty.call(message, "outputError")) - object.outputError = $root.google.rpc.Status.toObject(message.outputError, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + object.results[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult.toObject(message.results[j], options); + } + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); + if (message.outputError != null && message.hasOwnProperty("outputError")) + object.outputError = $root.google.rpc.Status.toObject(message.outputError, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -17980,23 +17438,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunningRecognizeMetadata.encode = function encode(message, writer, q) { + LongRunningRecognizeMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.uri); if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.encode(message.outputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -18010,7 +17464,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunningRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -18096,23 +17550,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) { + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime, long + 1); if (error) return "lastUpdateTime." + error; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) { + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { var error = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.verify(message.outputConfig, long + 1); if (error) return "outputConfig." + error; @@ -18131,8 +17585,6 @@ LongRunningRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18141,19 +17593,19 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.startTime != null) { - if (!$util.isObject(object.startTime)) + if (typeof object.startTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.startTime: object expected"); message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); } if (object.lastUpdateTime != null) { - if (!$util.isObject(object.lastUpdateTime)) + if (typeof object.lastUpdateTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime, long + 1); } if (object.uri != null) message.uri = String(object.uri); if (object.outputConfig != null) { - if (!$util.isObject(object.outputConfig)) + if (typeof object.outputConfig !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata.outputConfig: object expected"); message.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.fromObject(object.outputConfig, long + 1); } @@ -18169,13 +17621,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunningRecognizeMetadata.toObject = function toObject(message, options, q) { + LongRunningRecognizeMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; @@ -18184,16 +17632,16 @@ object.uri = ""; object.outputConfig = null; } - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) object.progressPercent = message.progressPercent; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options, q + 1); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options, q + 1); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; - if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) - object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options, q + 1); + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.cloud.speech.v1p1beta1.TranscriptOutputConfig.toObject(message.outputConfig, options); return object; }; @@ -18334,26 +17782,22 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer, q) { + StreamingRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.speechEventType); if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.encode(message.speechAdaptationInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 10, wireType 0 =*/80).int64(message.requestId); return writer; @@ -18369,7 +17813,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -18465,12 +17909,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (message.error != null && message.hasOwnProperty("error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -18479,7 +17923,7 @@ return "results." + error; } } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -18490,22 +17934,22 @@ case 4: break; } - if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) { + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) { var error = $root.google.protobuf.Duration.verify(message.speechEventTime, long + 1); if (error) return "speechEventTime." + error; } - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) { + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledTime, long + 1); if (error) return "totalBilledTime." + error; } - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) { + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.verify(message.speechAdaptationInfo, long + 1); if (error) return "speechAdaptationInfo." + error; } - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isInteger(message.requestId) && !(message.requestId && $util.isInteger(message.requestId.low) && $util.isInteger(message.requestId.high))) return "requestId: integer|Long expected"; return null; @@ -18522,15 +17966,13 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse(); if (object.error != null) { - if (!$util.isObject(object.error)) + if (typeof object.error !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -18539,7 +17981,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -18573,23 +18015,23 @@ break; } if (object.speechEventTime != null) { - if (!$util.isObject(object.speechEventTime)) + if (typeof object.speechEventTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.speechEventTime: object expected"); message.speechEventTime = $root.google.protobuf.Duration.fromObject(object.speechEventTime, long + 1); } if (object.totalBilledTime != null) { - if (!$util.isObject(object.totalBilledTime)) + if (typeof object.totalBilledTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.totalBilledTime: object expected"); message.totalBilledTime = $root.google.protobuf.Duration.fromObject(object.totalBilledTime, long + 1); } if (object.speechAdaptationInfo != null) { - if (!$util.isObject(object.speechAdaptationInfo)) + if (typeof object.speechAdaptationInfo !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.speechAdaptationInfo: object expected"); message.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.fromObject(object.speechAdaptationInfo, long + 1); } if (object.requestId != null) if ($util.Long) - message.requestId = $util.Long.fromValue(object.requestId, false); + (message.requestId = $util.Long.fromValue(object.requestId)).unsigned = false; else if (typeof object.requestId === "string") message.requestId = parseInt(object.requestId, 10); else if (typeof object.requestId === "number") @@ -18608,13 +18050,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options, q) { + StreamingRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -18626,29 +18064,27 @@ object.speechAdaptationInfo = null; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.requestId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.requestId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.requestId = options.longs === String ? "0" : 0; } - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); + object.results[j] = $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult.toObject(message.results[j], options); } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.totalBilledTime != null && Object.hasOwnProperty.call(message, "totalBilledTime")) - object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options, q + 1); - if (message.speechEventTime != null && Object.hasOwnProperty.call(message, "speechEventTime")) - object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options, q + 1); - if (message.speechAdaptationInfo != null && Object.hasOwnProperty.call(message, "speechAdaptationInfo")) - object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.requestId = typeof message.requestId === "number" ? BigInt(message.requestId) : $util.Long.fromBits(message.requestId.low >>> 0, message.requestId.high >>> 0, false).toBigInt(); - else if (typeof message.requestId === "number") + if (message.totalBilledTime != null && message.hasOwnProperty("totalBilledTime")) + object.totalBilledTime = $root.google.protobuf.Duration.toObject(message.totalBilledTime, options); + if (message.speechEventTime != null && message.hasOwnProperty("speechEventTime")) + object.speechEventTime = $root.google.protobuf.Duration.toObject(message.speechEventTime, options); + if (message.speechAdaptationInfo != null && message.hasOwnProperty("speechAdaptationInfo")) + object.speechAdaptationInfo = $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo.toObject(message.speechAdaptationInfo, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (typeof message.requestId === "number") object.requestId = options.longs === String ? String(message.requestId) : message.requestId; else object.requestId = options.longs === String ? $util.Long.prototype.toString.call(message.requestId) : options.longs === Number ? new $util.LongBits(message.requestId.low >>> 0, message.requestId.high >>> 0).toNumber() : message.requestId; @@ -18803,22 +18239,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer, q) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -18836,7 +18268,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -18928,7 +18360,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -18937,21 +18369,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -18968,8 +18400,6 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.StreamingRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -18980,7 +18410,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -18990,7 +18420,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndTime != null) { - if (!$util.isObject(object.resultEndTime)) + if (typeof object.resultEndTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.StreamingRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -19010,13 +18440,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options, q) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -19030,17 +18456,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -19155,20 +18581,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer, q) { + SpeechRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -19184,7 +18606,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -19268,7 +18690,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -19277,15 +18699,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) { + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) { var error = $root.google.protobuf.Duration.verify(message.resultEndTime, long + 1); if (error) return "resultEndTime." + error; } - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -19302,8 +18724,6 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19314,7 +18734,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -19322,7 +18742,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndTime != null) { - if (!$util.isObject(object.resultEndTime)) + if (typeof object.resultEndTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionResult.resultEndTime: object expected"); message.resultEndTime = $root.google.protobuf.Duration.fromObject(object.resultEndTime, long + 1); } @@ -19340,13 +18760,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options, q) { + SpeechRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -19358,13 +18774,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.resultEndTime != null && Object.hasOwnProperty.call(message, "resultEndTime")) - object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options, q + 1); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.resultEndTime != null && message.hasOwnProperty("resultEndTime")) + object.resultEndTime = $root.google.protobuf.Duration.toObject(message.resultEndTime, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -19470,20 +18886,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer, q) { + SpeechRecognitionAlternative.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v1p1beta1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -19497,7 +18909,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -19577,13 +18989,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && Object.hasOwnProperty.call(message, "words")) { + if (message.words != null && message.hasOwnProperty("words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -19606,8 +19018,6 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -19622,7 +19032,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (!$util.isObject(object.words[i])) + if (typeof object.words[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v1p1beta1.WordInfo.fromObject(object.words[i], long + 1); } @@ -19639,13 +19049,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { + SpeechRecognitionAlternative.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -19653,14 +19059,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v1p1beta1.WordInfo.toObject(message.words[j], options, q + 1); + object.words[j] = $root.google.cloud.speech.v1p1beta1.WordInfo.toObject(message.words[j], options); } return object; }; @@ -19792,17 +19198,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer, q) { + WordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -19824,7 +19226,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -19914,26 +19316,26 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) { + if (message.startTime != null && message.hasOwnProperty("startTime")) { var error = $root.google.protobuf.Duration.verify(message.startTime, long + 1); if (error) return "startTime." + error; } - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) { + if (message.endTime != null && message.hasOwnProperty("endTime")) { var error = $root.google.protobuf.Duration.verify(message.endTime, long + 1); if (error) return "endTime." + error; } - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.word != null && message.hasOwnProperty("word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) if (!$util.isInteger(message.speakerTag)) return "speakerTag: integer expected"; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -19950,20 +19352,18 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.WordInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.WordInfo(); if (object.startTime != null) { - if (!$util.isObject(object.startTime)) + if (typeof object.startTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo.startTime: object expected"); message.startTime = $root.google.protobuf.Duration.fromObject(object.startTime, long + 1); } if (object.endTime != null) { - if (!$util.isObject(object.endTime)) + if (typeof object.endTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.WordInfo.endTime: object expected"); message.endTime = $root.google.protobuf.Duration.fromObject(object.endTime, long + 1); } @@ -19987,13 +19387,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options, q) { + WordInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startTime = null; @@ -20003,17 +19399,17 @@ object.speakerTag = 0; object.speakerLabel = ""; } - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options, q + 1); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options, q + 1); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Duration.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Duration.toObject(message.endTime, options); + if (message.word != null && message.hasOwnProperty("word")) object.word = message.word; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerTag != null && Object.hasOwnProperty.call(message, "speakerTag")) + if (message.speakerTag != null && message.hasOwnProperty("speakerTag")) object.speakerTag = message.speakerTag; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -20109,13 +19505,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptationInfo.encode = function encode(message, writer, q) { + SpeechAdaptationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.adaptationTimeout); if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) @@ -20133,7 +19525,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -20207,10 +19599,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) + if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) if (typeof message.adaptationTimeout !== "boolean") return "adaptationTimeout: boolean expected"; - if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) + if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) if (!$util.isString(message.timeoutMessage)) return "timeoutMessage: string expected"; return null; @@ -20227,8 +19619,6 @@ SpeechAdaptationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20250,21 +19640,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptationInfo.toObject = function toObject(message, options, q) { + SpeechAdaptationInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.adaptationTimeout = false; object.timeoutMessage = ""; } - if (message.adaptationTimeout != null && Object.hasOwnProperty.call(message, "adaptationTimeout")) + if (message.adaptationTimeout != null && message.hasOwnProperty("adaptationTimeout")) object.adaptationTimeout = message.adaptationTimeout; - if (message.timeoutMessage != null && Object.hasOwnProperty.call(message, "timeoutMessage")) + if (message.timeoutMessage != null && message.hasOwnProperty("timeoutMessage")) object.timeoutMessage = message.timeoutMessage; return object; }; @@ -20461,20 +19847,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer, q) { + CustomClass.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) @@ -20486,9 +19868,9 @@ if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -20509,7 +19891,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -20650,13 +20032,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.items != null && Object.hasOwnProperty.call(message, "items")) { + if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -20665,19 +20047,19 @@ return "items." + error; } } - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: return "state: enum value expected"; @@ -20686,17 +20068,17 @@ case 4: break; } - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { + if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -20704,10 +20086,10 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; return null; @@ -20724,8 +20106,6 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CustomClass) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -20740,7 +20120,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (!$util.isObject(object.items[i])) + if (typeof object.items[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -20774,17 +20154,17 @@ break; } if (object.deleteTime != null) { - if (!$util.isObject(object.deleteTime)) + if (typeof object.deleteTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) + if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (!$util.isObject(object.annotations)) + if (typeof object.annotations !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -20809,13 +20189,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options, q) { + CustomClass.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -20834,29 +20210,29 @@ object.etag = ""; object.reconciling = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) object.customClassId = message.customClassId; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); + object.items[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem.toObject(message.items[j], options); } - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.speech.v1p1beta1.CustomClass.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v1p1beta1.CustomClass.State[message.state] : message.state; - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -20866,9 +20242,9 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; return object; }; @@ -20952,13 +20328,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer, q) { + ClassItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -20974,7 +20346,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -21044,7 +20416,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -21061,8 +20433,6 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CustomClass.ClassItem) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21082,17 +20452,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options, q) { + ClassItem.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -21308,18 +20674,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer, q) { + PhraseSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) @@ -21333,9 +20695,9 @@ if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.state); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -21356,7 +20718,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -21497,10 +20859,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { + if (message.phrases != null && message.hasOwnProperty("phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -21509,22 +20871,22 @@ return "phrases." + error; } } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: return "state: enum value expected"; @@ -21533,17 +20895,17 @@ case 4: break; } - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { + if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -21551,10 +20913,10 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; return null; @@ -21571,8 +20933,6 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.PhraseSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21585,7 +20945,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (!$util.isObject(object.phrases[i])) + if (typeof object.phrases[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -21621,17 +20981,17 @@ break; } if (object.deleteTime != null) { - if (!$util.isObject(object.deleteTime)) + if (typeof object.deleteTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) + if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (!$util.isObject(object.annotations)) + if (typeof object.annotations !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -21656,13 +21016,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options, q) { + PhraseSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -21681,29 +21037,29 @@ object.etag = ""; object.reconciling = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); + object.phrases[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase.toObject(message.phrases[j], options); } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.speech.v1p1beta1.PhraseSet.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v1p1beta1.PhraseSet.State[message.state] : message.state; - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -21713,9 +21069,9 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; return object; }; @@ -21808,13 +21164,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer, q) { + Phrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -21832,7 +21184,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -21906,10 +21258,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -21926,8 +21278,6 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.PhraseSet.Phrase) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -21949,21 +21299,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options, q) { + Phrase.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -22099,24 +21445,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer, q) { + SpeechAdaptation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.phraseSetReferences != null && message.phraseSetReferences.length) for (var i = 0; i < message.phraseSetReferences.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetReferences[i]); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.encode(message.abnfGrammar, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -22130,7 +21472,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -22218,7 +21560,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -22227,14 +21569,14 @@ return "phraseSets." + error; } } - if (message.phraseSetReferences != null && Object.hasOwnProperty.call(message, "phraseSetReferences")) { + if (message.phraseSetReferences != null && message.hasOwnProperty("phraseSetReferences")) { if (!Array.isArray(message.phraseSetReferences)) return "phraseSetReferences: array expected"; for (var i = 0; i < message.phraseSetReferences.length; ++i) if (!$util.isString(message.phraseSetReferences[i])) return "phraseSetReferences: string[] expected"; } - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -22243,7 +21585,7 @@ return "customClasses." + error; } } - if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) { + if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) { var error = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.verify(message.abnfGrammar, long + 1); if (error) return "abnfGrammar." + error; @@ -22262,8 +21604,6 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptation) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22274,7 +21614,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -22291,13 +21631,13 @@ throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClasses[i], long + 1); } } if (object.abnfGrammar != null) { - if (!$util.isObject(object.abnfGrammar)) + if (typeof object.abnfGrammar !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.abnfGrammar: object expected"); message.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.fromObject(object.abnfGrammar, long + 1); } @@ -22313,13 +21653,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options, q) { + SpeechAdaptation.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -22331,7 +21667,7 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options); } if (message.phraseSetReferences && message.phraseSetReferences.length) { object.phraseSetReferences = []; @@ -22341,10 +21677,10 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options); } - if (message.abnfGrammar != null && Object.hasOwnProperty.call(message, "abnfGrammar")) - object.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options, q + 1); + if (message.abnfGrammar != null && message.hasOwnProperty("abnfGrammar")) + object.abnfGrammar = $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar.toObject(message.abnfGrammar, options); return object; }; @@ -22428,13 +21764,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ABNFGrammar.encode = function encode(message, writer, q) { + ABNFGrammar.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.abnfStrings != null && message.abnfStrings.length) for (var i = 0; i < message.abnfStrings.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.abnfStrings[i]); @@ -22451,7 +21783,7 @@ * @returns {$protobuf.Writer} Writer */ ABNFGrammar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -22523,7 +21855,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.abnfStrings != null && Object.hasOwnProperty.call(message, "abnfStrings")) { + if (message.abnfStrings != null && message.hasOwnProperty("abnfStrings")) { if (!Array.isArray(message.abnfStrings)) return "abnfStrings: array expected"; for (var i = 0; i < message.abnfStrings.length; ++i) @@ -22544,8 +21876,6 @@ ABNFGrammar.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22570,13 +21900,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ABNFGrammar.toObject = function toObject(message, options, q) { + ABNFGrammar.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.abnfStrings = []; @@ -22674,16 +22000,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer, q) { + TranscriptNormalization.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -22697,7 +22019,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -22769,7 +22091,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { + if (message.entries != null && message.hasOwnProperty("entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -22792,8 +22114,6 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptNormalization) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -22804,7 +22124,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (!$util.isObject(object.entries[i])) + if (typeof object.entries[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -22821,20 +22141,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options, q) { + TranscriptNormalization.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); + object.entries[j] = $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.toObject(message.entries[j], options); } return object; }; @@ -22936,13 +22252,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer, q) { + Entry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -22962,7 +22274,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -23040,13 +22352,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -23063,8 +22375,6 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23088,24 +22398,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options, q) { + Entry.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) object.search = message.search; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) object.replace = message.replace; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -23194,7 +22500,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -23227,7 +22533,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -23260,7 +22566,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listPhraseSet = function listPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSet, $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse, request, callback); + return this.rpcCall(listPhraseSet, $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest, $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse, request, callback); }, "name", { value: "ListPhraseSet" }); /** @@ -23293,7 +22599,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); + return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest, $root.google.cloud.speech.v1p1beta1.PhraseSet, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -23326,7 +22632,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -23359,7 +22665,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.createCustomClass = function createCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return this.rpcCall(createCustomClass, $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -23392,7 +22698,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.getCustomClass = function getCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return this.rpcCall(getCustomClass, $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -23425,7 +22731,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest, $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse, request, callback); + return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest, $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -23458,7 +22764,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); + return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest, $root.google.cloud.speech.v1p1beta1.CustomClass, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -23491,7 +22797,7 @@ * @variation 1 */ Object.defineProperty(Adaptation.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -23578,19 +22884,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer, q) { + CreatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.phraseSetId); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -23604,7 +22906,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -23682,13 +22984,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v1p1beta1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; @@ -23707,8 +23009,6 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -23719,7 +23019,7 @@ if (object.phraseSetId != null) message.phraseSetId = String(object.phraseSetId); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -23735,25 +23035,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options, q) { + CreatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.phraseSetId = ""; object.phraseSet = null; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options, q + 1); + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options); return object; }; @@ -23848,17 +23144,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer, q) { + UpdatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -23872,7 +23164,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -23946,12 +23238,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v1p1beta1.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -23970,20 +23262,18 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -23999,22 +23289,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { + UpdatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; } - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSet, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -24100,13 +23386,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer, q) { + GetPhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -24122,7 +23404,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -24192,7 +23474,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -24209,8 +23491,6 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.GetPhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24230,17 +23510,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options, q) { + GetPhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -24345,13 +23621,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetRequest.encode = function encode(message, writer, q) { + ListPhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -24371,7 +23643,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -24449,13 +23721,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -24472,8 +23744,6 @@ ListPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListPhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24497,24 +23767,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetRequest.toObject = function toObject(message, options, q) { + ListPhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; return object; }; @@ -24611,16 +23877,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetResponse.encode = function encode(message, writer, q) { + ListPhraseSetResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -24636,7 +23898,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -24712,7 +23974,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -24721,7 +23983,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -24738,8 +24000,6 @@ ListPhraseSetResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListPhraseSetResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -24750,7 +24010,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.ListPhraseSetResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v1p1beta1.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -24769,13 +24029,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetResponse.toObject = function toObject(message, options, q) { + ListPhraseSetResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -24784,9 +24040,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v1p1beta1.PhraseSet.toObject(message.phraseSets[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -24873,13 +24129,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer, q) { + DeletePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -24895,7 +24147,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -24965,7 +24217,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -24982,8 +24234,6 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25003,17 +24253,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options, q) { + DeletePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -25118,19 +24364,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer, q) { + CreateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.customClassId); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -25144,7 +24386,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -25222,13 +24464,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v1p1beta1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; @@ -25247,8 +24489,6 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.CreateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25259,7 +24499,7 @@ if (object.customClassId != null) message.customClassId = String(object.customClassId); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClass, long + 1); } @@ -25275,25 +24515,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options, q) { + CreateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.customClassId = ""; object.customClass = null; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) object.customClassId = message.customClassId; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options, q + 1); + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options); return object; }; @@ -25388,17 +24624,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer, q) { + UpdateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -25412,7 +24644,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -25486,12 +24718,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v1p1beta1.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -25510,20 +24742,18 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest(); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -25539,22 +24769,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options, q) { + UpdateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; } - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClass, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -25640,13 +24866,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer, q) { + GetCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -25662,7 +24884,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -25732,7 +24954,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -25749,8 +24971,6 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.GetCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -25770,17 +24990,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options, q) { + GetCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -25885,13 +25101,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer, q) { + ListCustomClassesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -25911,7 +25123,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -25989,13 +25201,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -26012,8 +25224,6 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListCustomClassesRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26037,24 +25247,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options, q) { + ListCustomClassesRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; object.pageSize = 0; object.pageToken = ""; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; return object; }; @@ -26151,16 +25357,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer, q) { + ListCustomClassesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v1p1beta1.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -26176,7 +25378,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -26252,7 +25454,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -26261,7 +25463,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -26278,8 +25480,6 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.ListCustomClassesResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26290,7 +25490,7 @@ throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v1p1beta1.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v1p1beta1.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -26309,13 +25509,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options, q) { + ListCustomClassesResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -26324,9 +25520,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v1p1beta1.CustomClass.toObject(message.customClasses[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -26413,13 +25609,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer, q) { + DeleteCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -26435,7 +25627,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -26505,7 +25697,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -26522,8 +25714,6 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v1p1beta1.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -26543,17 +25733,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options, q) { + DeleteCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -26651,7 +25837,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createRecognizer = function createRecognizer(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createRecognizer, $root.google.cloud.speech.v2.CreateRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(createRecognizer, $root.google.cloud.speech.v2.CreateRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateRecognizer" }); /** @@ -26684,7 +25870,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listRecognizers = function listRecognizers(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listRecognizers, $root.google.cloud.speech.v2.ListRecognizersRequest, $root.google.cloud.speech.v2.ListRecognizersResponse, request, callback); + return this.rpcCall(listRecognizers, $root.google.cloud.speech.v2.ListRecognizersRequest, $root.google.cloud.speech.v2.ListRecognizersResponse, request, callback); }, "name", { value: "ListRecognizers" }); /** @@ -26717,7 +25903,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getRecognizer = function getRecognizer(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getRecognizer, $root.google.cloud.speech.v2.GetRecognizerRequest, $root.google.cloud.speech.v2.Recognizer, request, callback); + return this.rpcCall(getRecognizer, $root.google.cloud.speech.v2.GetRecognizerRequest, $root.google.cloud.speech.v2.Recognizer, request, callback); }, "name", { value: "GetRecognizer" }); /** @@ -26750,7 +25936,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateRecognizer = function updateRecognizer(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateRecognizer, $root.google.cloud.speech.v2.UpdateRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(updateRecognizer, $root.google.cloud.speech.v2.UpdateRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateRecognizer" }); /** @@ -26783,7 +25969,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deleteRecognizer = function deleteRecognizer(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteRecognizer, $root.google.cloud.speech.v2.DeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(deleteRecognizer, $root.google.cloud.speech.v2.DeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteRecognizer" }); /** @@ -26816,7 +26002,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeleteRecognizer = function undeleteRecognizer(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteRecognizer, $root.google.cloud.speech.v2.UndeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(undeleteRecognizer, $root.google.cloud.speech.v2.UndeleteRecognizerRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeleteRecognizer" }); /** @@ -26849,7 +26035,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.recognize = function recognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, recognize, $root.google.cloud.speech.v2.RecognizeRequest, $root.google.cloud.speech.v2.RecognizeResponse, request, callback); + return this.rpcCall(recognize, $root.google.cloud.speech.v2.RecognizeRequest, $root.google.cloud.speech.v2.RecognizeResponse, request, callback); }, "name", { value: "Recognize" }); /** @@ -26882,7 +26068,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.streamingRecognize = function streamingRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingRecognize, $root.google.cloud.speech.v2.StreamingRecognizeRequest, $root.google.cloud.speech.v2.StreamingRecognizeResponse, request, callback); + return this.rpcCall(streamingRecognize, $root.google.cloud.speech.v2.StreamingRecognizeRequest, $root.google.cloud.speech.v2.StreamingRecognizeResponse, request, callback); }, "name", { value: "StreamingRecognize" }); /** @@ -26915,7 +26101,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.batchRecognize = function batchRecognize(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, batchRecognize, $root.google.cloud.speech.v2.BatchRecognizeRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(batchRecognize, $root.google.cloud.speech.v2.BatchRecognizeRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "BatchRecognize" }); /** @@ -26948,7 +26134,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getConfig = function getConfig(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getConfig, $root.google.cloud.speech.v2.GetConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); + return this.rpcCall(getConfig, $root.google.cloud.speech.v2.GetConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); }, "name", { value: "GetConfig" }); /** @@ -26981,7 +26167,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateConfig = function updateConfig(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateConfig, $root.google.cloud.speech.v2.UpdateConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); + return this.rpcCall(updateConfig, $root.google.cloud.speech.v2.UpdateConfigRequest, $root.google.cloud.speech.v2.Config, request, callback); }, "name", { value: "UpdateConfig" }); /** @@ -27014,7 +26200,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createCustomClass = function createCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createCustomClass, $root.google.cloud.speech.v2.CreateCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(createCustomClass, $root.google.cloud.speech.v2.CreateCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateCustomClass" }); /** @@ -27047,7 +26233,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listCustomClasses = function listCustomClasses(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listCustomClasses, $root.google.cloud.speech.v2.ListCustomClassesRequest, $root.google.cloud.speech.v2.ListCustomClassesResponse, request, callback); + return this.rpcCall(listCustomClasses, $root.google.cloud.speech.v2.ListCustomClassesRequest, $root.google.cloud.speech.v2.ListCustomClassesResponse, request, callback); }, "name", { value: "ListCustomClasses" }); /** @@ -27080,7 +26266,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getCustomClass = function getCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getCustomClass, $root.google.cloud.speech.v2.GetCustomClassRequest, $root.google.cloud.speech.v2.CustomClass, request, callback); + return this.rpcCall(getCustomClass, $root.google.cloud.speech.v2.GetCustomClassRequest, $root.google.cloud.speech.v2.CustomClass, request, callback); }, "name", { value: "GetCustomClass" }); /** @@ -27113,7 +26299,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updateCustomClass = function updateCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateCustomClass, $root.google.cloud.speech.v2.UpdateCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(updateCustomClass, $root.google.cloud.speech.v2.UpdateCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateCustomClass" }); /** @@ -27146,7 +26332,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deleteCustomClass = function deleteCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteCustomClass, $root.google.cloud.speech.v2.DeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(deleteCustomClass, $root.google.cloud.speech.v2.DeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteCustomClass" }); /** @@ -27179,7 +26365,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeleteCustomClass = function undeleteCustomClass(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeleteCustomClass, $root.google.cloud.speech.v2.UndeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(undeleteCustomClass, $root.google.cloud.speech.v2.UndeleteCustomClassRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeleteCustomClass" }); /** @@ -27212,7 +26398,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.createPhraseSet = function createPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createPhraseSet, $root.google.cloud.speech.v2.CreatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(createPhraseSet, $root.google.cloud.speech.v2.CreatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreatePhraseSet" }); /** @@ -27245,7 +26431,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.listPhraseSets = function listPhraseSets(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listPhraseSets, $root.google.cloud.speech.v2.ListPhraseSetsRequest, $root.google.cloud.speech.v2.ListPhraseSetsResponse, request, callback); + return this.rpcCall(listPhraseSets, $root.google.cloud.speech.v2.ListPhraseSetsRequest, $root.google.cloud.speech.v2.ListPhraseSetsResponse, request, callback); }, "name", { value: "ListPhraseSets" }); /** @@ -27278,7 +26464,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.getPhraseSet = function getPhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getPhraseSet, $root.google.cloud.speech.v2.GetPhraseSetRequest, $root.google.cloud.speech.v2.PhraseSet, request, callback); + return this.rpcCall(getPhraseSet, $root.google.cloud.speech.v2.GetPhraseSetRequest, $root.google.cloud.speech.v2.PhraseSet, request, callback); }, "name", { value: "GetPhraseSet" }); /** @@ -27311,7 +26497,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.updatePhraseSet = function updatePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updatePhraseSet, $root.google.cloud.speech.v2.UpdatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(updatePhraseSet, $root.google.cloud.speech.v2.UpdatePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdatePhraseSet" }); /** @@ -27344,7 +26530,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.deletePhraseSet = function deletePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deletePhraseSet, $root.google.cloud.speech.v2.DeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(deletePhraseSet, $root.google.cloud.speech.v2.DeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeletePhraseSet" }); /** @@ -27377,7 +26563,7 @@ * @variation 1 */ Object.defineProperty(Speech.prototype.undeletePhraseSet = function undeletePhraseSet(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, undeletePhraseSet, $root.google.cloud.speech.v2.UndeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(undeletePhraseSet, $root.google.cloud.speech.v2.UndeletePhraseSetRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UndeletePhraseSet" }); /** @@ -27473,15 +26659,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRecognizerRequest.encode = function encode(message, writer, q) { + CreateRecognizerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) @@ -27501,7 +26683,7 @@ * @returns {$protobuf.Writer} Writer */ CreateRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -27583,18 +26765,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) { + if (message.recognizer != null && message.hasOwnProperty("recognizer")) { var error = $root.google.cloud.speech.v2.Recognizer.verify(message.recognizer, long + 1); if (error) return "recognizer." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) + if (message.recognizerId != null && message.hasOwnProperty("recognizerId")) if (!$util.isString(message.recognizerId)) return "recognizerId: string expected"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -27611,15 +26793,13 @@ CreateRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreateRecognizerRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CreateRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreateRecognizerRequest(); if (object.recognizer != null) { - if (!$util.isObject(object.recognizer)) + if (typeof object.recognizer !== "object") throw TypeError(".google.cloud.speech.v2.CreateRecognizerRequest.recognizer: object expected"); message.recognizer = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizer, long + 1); } @@ -27641,13 +26821,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateRecognizerRequest.toObject = function toObject(message, options, q) { + CreateRecognizerRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.recognizer = null; @@ -27655,13 +26831,13 @@ object.recognizerId = ""; object.parent = ""; } - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) + object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.recognizerId != null && Object.hasOwnProperty.call(message, "recognizerId")) + if (message.recognizerId != null && message.hasOwnProperty("recognizerId")) object.recognizerId = message.recognizerId; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; return object; }; @@ -27962,17 +27138,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer, q) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); if (message.method != null && Object.hasOwnProperty.call(message, "method")) @@ -27982,37 +27154,37 @@ if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.kmsKeyVersionName); if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) - $root.google.cloud.speech.v2.BatchRecognizeRequest.encode(message.batchRecognizeRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeRequest.encode(message.batchRecognizeRequest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) - $root.google.cloud.speech.v2.CreateRecognizerRequest.encode(message.createRecognizerRequest, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CreateRecognizerRequest.encode(message.createRecognizerRequest, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) - $root.google.cloud.speech.v2.UpdateRecognizerRequest.encode(message.updateRecognizerRequest, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UpdateRecognizerRequest.encode(message.updateRecognizerRequest, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) - $root.google.cloud.speech.v2.DeleteRecognizerRequest.encode(message.deleteRecognizerRequest, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.DeleteRecognizerRequest.encode(message.deleteRecognizerRequest, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) - $root.google.cloud.speech.v2.UndeleteRecognizerRequest.encode(message.undeleteRecognizerRequest, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UndeleteRecognizerRequest.encode(message.undeleteRecognizerRequest, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) - $root.google.cloud.speech.v2.CreateCustomClassRequest.encode(message.createCustomClassRequest, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CreateCustomClassRequest.encode(message.createCustomClassRequest, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) - $root.google.cloud.speech.v2.UpdateCustomClassRequest.encode(message.updateCustomClassRequest, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UpdateCustomClassRequest.encode(message.updateCustomClassRequest, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) - $root.google.cloud.speech.v2.DeleteCustomClassRequest.encode(message.deleteCustomClassRequest, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.DeleteCustomClassRequest.encode(message.deleteCustomClassRequest, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) - $root.google.cloud.speech.v2.UndeleteCustomClassRequest.encode(message.undeleteCustomClassRequest, writer.uint32(/* id 16, wireType 2 =*/130).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UndeleteCustomClassRequest.encode(message.undeleteCustomClassRequest, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) - $root.google.cloud.speech.v2.CreatePhraseSetRequest.encode(message.createPhraseSetRequest, writer.uint32(/* id 17, wireType 2 =*/138).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CreatePhraseSetRequest.encode(message.createPhraseSetRequest, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) - $root.google.cloud.speech.v2.UpdatePhraseSetRequest.encode(message.updatePhraseSetRequest, writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UpdatePhraseSetRequest.encode(message.updatePhraseSetRequest, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) - $root.google.cloud.speech.v2.DeletePhraseSetRequest.encode(message.deletePhraseSetRequest, writer.uint32(/* id 19, wireType 2 =*/154).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.DeletePhraseSetRequest.encode(message.deletePhraseSetRequest, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) - $root.google.cloud.speech.v2.UndeletePhraseSetRequest.encode(message.undeletePhraseSetRequest, writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UndeletePhraseSetRequest.encode(message.undeletePhraseSetRequest, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) - $root.google.cloud.speech.v2.UpdateConfigRequest.encode(message.updateConfigRequest, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.UpdateConfigRequest.encode(message.updateConfigRequest, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 22, wireType 0 =*/176).int32(message.progressPercent); if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) - $root.google.cloud.speech.v2.BatchRecognizeMetadata.encode(message.batchRecognizeMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeMetadata.encode(message.batchRecognizeMetadata, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; @@ -28026,7 +27198,7 @@ * @returns {$protobuf.Writer} Writer */ OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -28181,29 +27353,29 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + if (message.resource != null && message.hasOwnProperty("resource")) if (!$util.isString(message.resource)) return "resource: string expected"; - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && message.hasOwnProperty("method")) if (!$util.isString(message.method)) return "method: string expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; - if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) { + if (message.batchRecognizeRequest != null && message.hasOwnProperty("batchRecognizeRequest")) { properties.request = 1; { var error = $root.google.cloud.speech.v2.BatchRecognizeRequest.verify(message.batchRecognizeRequest, long + 1); @@ -28211,7 +27383,7 @@ return "batchRecognizeRequest." + error; } } - if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) { + if (message.createRecognizerRequest != null && message.hasOwnProperty("createRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28221,7 +27393,7 @@ return "createRecognizerRequest." + error; } } - if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) { + if (message.updateRecognizerRequest != null && message.hasOwnProperty("updateRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28231,7 +27403,7 @@ return "updateRecognizerRequest." + error; } } - if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) { + if (message.deleteRecognizerRequest != null && message.hasOwnProperty("deleteRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28241,7 +27413,7 @@ return "deleteRecognizerRequest." + error; } } - if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) { + if (message.undeleteRecognizerRequest != null && message.hasOwnProperty("undeleteRecognizerRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28251,7 +27423,7 @@ return "undeleteRecognizerRequest." + error; } } - if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) { + if (message.createCustomClassRequest != null && message.hasOwnProperty("createCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28261,7 +27433,7 @@ return "createCustomClassRequest." + error; } } - if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) { + if (message.updateCustomClassRequest != null && message.hasOwnProperty("updateCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28271,7 +27443,7 @@ return "updateCustomClassRequest." + error; } } - if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) { + if (message.deleteCustomClassRequest != null && message.hasOwnProperty("deleteCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28281,7 +27453,7 @@ return "deleteCustomClassRequest." + error; } } - if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) { + if (message.undeleteCustomClassRequest != null && message.hasOwnProperty("undeleteCustomClassRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28291,7 +27463,7 @@ return "undeleteCustomClassRequest." + error; } } - if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) { + if (message.createPhraseSetRequest != null && message.hasOwnProperty("createPhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28301,7 +27473,7 @@ return "createPhraseSetRequest." + error; } } - if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) { + if (message.updatePhraseSetRequest != null && message.hasOwnProperty("updatePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28311,7 +27483,7 @@ return "updatePhraseSetRequest." + error; } } - if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) { + if (message.deletePhraseSetRequest != null && message.hasOwnProperty("deletePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28321,7 +27493,7 @@ return "deletePhraseSetRequest." + error; } } - if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) { + if (message.undeletePhraseSetRequest != null && message.hasOwnProperty("undeletePhraseSetRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28331,7 +27503,7 @@ return "undeletePhraseSetRequest." + error; } } - if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) { + if (message.updateConfigRequest != null && message.hasOwnProperty("updateConfigRequest")) { if (properties.request === 1) return "request: multiple values"; properties.request = 1; @@ -28341,10 +27513,10 @@ return "updateConfigRequest." + error; } } - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) { + if (message.batchRecognizeMetadata != null && message.hasOwnProperty("batchRecognizeMetadata")) { properties.metadata = 1; { var error = $root.google.cloud.speech.v2.BatchRecognizeMetadata.verify(message.batchRecognizeMetadata, long + 1); @@ -28366,20 +27538,18 @@ OperationMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.OperationMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.OperationMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.OperationMetadata(); if (object.createTime != null) { - if (!$util.isObject(object.createTime)) + if (typeof object.createTime !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (!$util.isObject(object.updateTime)) + if (typeof object.updateTime !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } @@ -28392,79 +27562,79 @@ if (object.kmsKeyVersionName != null) message.kmsKeyVersionName = String(object.kmsKeyVersionName); if (object.batchRecognizeRequest != null) { - if (!$util.isObject(object.batchRecognizeRequest)) + if (typeof object.batchRecognizeRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.batchRecognizeRequest: object expected"); message.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.fromObject(object.batchRecognizeRequest, long + 1); } if (object.createRecognizerRequest != null) { - if (!$util.isObject(object.createRecognizerRequest)) + if (typeof object.createRecognizerRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.createRecognizerRequest: object expected"); message.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.fromObject(object.createRecognizerRequest, long + 1); } if (object.updateRecognizerRequest != null) { - if (!$util.isObject(object.updateRecognizerRequest)) + if (typeof object.updateRecognizerRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateRecognizerRequest: object expected"); message.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.fromObject(object.updateRecognizerRequest, long + 1); } if (object.deleteRecognizerRequest != null) { - if (!$util.isObject(object.deleteRecognizerRequest)) + if (typeof object.deleteRecognizerRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.deleteRecognizerRequest: object expected"); message.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.fromObject(object.deleteRecognizerRequest, long + 1); } if (object.undeleteRecognizerRequest != null) { - if (!$util.isObject(object.undeleteRecognizerRequest)) + if (typeof object.undeleteRecognizerRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeleteRecognizerRequest: object expected"); message.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.fromObject(object.undeleteRecognizerRequest, long + 1); } if (object.createCustomClassRequest != null) { - if (!$util.isObject(object.createCustomClassRequest)) + if (typeof object.createCustomClassRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.createCustomClassRequest: object expected"); message.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.fromObject(object.createCustomClassRequest, long + 1); } if (object.updateCustomClassRequest != null) { - if (!$util.isObject(object.updateCustomClassRequest)) + if (typeof object.updateCustomClassRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateCustomClassRequest: object expected"); message.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.fromObject(object.updateCustomClassRequest, long + 1); } if (object.deleteCustomClassRequest != null) { - if (!$util.isObject(object.deleteCustomClassRequest)) + if (typeof object.deleteCustomClassRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.deleteCustomClassRequest: object expected"); message.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.fromObject(object.deleteCustomClassRequest, long + 1); } if (object.undeleteCustomClassRequest != null) { - if (!$util.isObject(object.undeleteCustomClassRequest)) + if (typeof object.undeleteCustomClassRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeleteCustomClassRequest: object expected"); message.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.fromObject(object.undeleteCustomClassRequest, long + 1); } if (object.createPhraseSetRequest != null) { - if (!$util.isObject(object.createPhraseSetRequest)) + if (typeof object.createPhraseSetRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.createPhraseSetRequest: object expected"); message.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.fromObject(object.createPhraseSetRequest, long + 1); } if (object.updatePhraseSetRequest != null) { - if (!$util.isObject(object.updatePhraseSetRequest)) + if (typeof object.updatePhraseSetRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.updatePhraseSetRequest: object expected"); message.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.fromObject(object.updatePhraseSetRequest, long + 1); } if (object.deletePhraseSetRequest != null) { - if (!$util.isObject(object.deletePhraseSetRequest)) + if (typeof object.deletePhraseSetRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.deletePhraseSetRequest: object expected"); message.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.fromObject(object.deletePhraseSetRequest, long + 1); } if (object.undeletePhraseSetRequest != null) { - if (!$util.isObject(object.undeletePhraseSetRequest)) + if (typeof object.undeletePhraseSetRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.undeletePhraseSetRequest: object expected"); message.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.fromObject(object.undeletePhraseSetRequest, long + 1); } if (object.updateConfigRequest != null) { - if (!$util.isObject(object.updateConfigRequest)) + if (typeof object.updateConfigRequest !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.updateConfigRequest: object expected"); message.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.fromObject(object.updateConfigRequest, long + 1); } if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.batchRecognizeMetadata != null) { - if (!$util.isObject(object.batchRecognizeMetadata)) + if (typeof object.batchRecognizeMetadata !== "object") throw TypeError(".google.cloud.speech.v2.OperationMetadata.batchRecognizeMetadata: object expected"); message.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.fromObject(object.batchRecognizeMetadata, long + 1); } @@ -28480,13 +27650,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options, q) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.createTime = null; @@ -28497,92 +27663,92 @@ object.kmsKeyVersionName = ""; object.progressPercent = 0; } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; - if (message.method != null && Object.hasOwnProperty.call(message, "method")) + if (message.method != null && message.hasOwnProperty("method")) object.method = message.method; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.batchRecognizeRequest != null && Object.hasOwnProperty.call(message, "batchRecognizeRequest")) { - object.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.toObject(message.batchRecognizeRequest, options, q + 1); + if (message.batchRecognizeRequest != null && message.hasOwnProperty("batchRecognizeRequest")) { + object.batchRecognizeRequest = $root.google.cloud.speech.v2.BatchRecognizeRequest.toObject(message.batchRecognizeRequest, options); if (options.oneofs) object.request = "batchRecognizeRequest"; } - if (message.createRecognizerRequest != null && Object.hasOwnProperty.call(message, "createRecognizerRequest")) { - object.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.toObject(message.createRecognizerRequest, options, q + 1); + if (message.createRecognizerRequest != null && message.hasOwnProperty("createRecognizerRequest")) { + object.createRecognizerRequest = $root.google.cloud.speech.v2.CreateRecognizerRequest.toObject(message.createRecognizerRequest, options); if (options.oneofs) object.request = "createRecognizerRequest"; } - if (message.updateRecognizerRequest != null && Object.hasOwnProperty.call(message, "updateRecognizerRequest")) { - object.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.toObject(message.updateRecognizerRequest, options, q + 1); + if (message.updateRecognizerRequest != null && message.hasOwnProperty("updateRecognizerRequest")) { + object.updateRecognizerRequest = $root.google.cloud.speech.v2.UpdateRecognizerRequest.toObject(message.updateRecognizerRequest, options); if (options.oneofs) object.request = "updateRecognizerRequest"; } - if (message.deleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "deleteRecognizerRequest")) { - object.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.toObject(message.deleteRecognizerRequest, options, q + 1); + if (message.deleteRecognizerRequest != null && message.hasOwnProperty("deleteRecognizerRequest")) { + object.deleteRecognizerRequest = $root.google.cloud.speech.v2.DeleteRecognizerRequest.toObject(message.deleteRecognizerRequest, options); if (options.oneofs) object.request = "deleteRecognizerRequest"; } - if (message.undeleteRecognizerRequest != null && Object.hasOwnProperty.call(message, "undeleteRecognizerRequest")) { - object.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.toObject(message.undeleteRecognizerRequest, options, q + 1); + if (message.undeleteRecognizerRequest != null && message.hasOwnProperty("undeleteRecognizerRequest")) { + object.undeleteRecognizerRequest = $root.google.cloud.speech.v2.UndeleteRecognizerRequest.toObject(message.undeleteRecognizerRequest, options); if (options.oneofs) object.request = "undeleteRecognizerRequest"; } - if (message.createCustomClassRequest != null && Object.hasOwnProperty.call(message, "createCustomClassRequest")) { - object.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.toObject(message.createCustomClassRequest, options, q + 1); + if (message.createCustomClassRequest != null && message.hasOwnProperty("createCustomClassRequest")) { + object.createCustomClassRequest = $root.google.cloud.speech.v2.CreateCustomClassRequest.toObject(message.createCustomClassRequest, options); if (options.oneofs) object.request = "createCustomClassRequest"; } - if (message.updateCustomClassRequest != null && Object.hasOwnProperty.call(message, "updateCustomClassRequest")) { - object.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.toObject(message.updateCustomClassRequest, options, q + 1); + if (message.updateCustomClassRequest != null && message.hasOwnProperty("updateCustomClassRequest")) { + object.updateCustomClassRequest = $root.google.cloud.speech.v2.UpdateCustomClassRequest.toObject(message.updateCustomClassRequest, options); if (options.oneofs) object.request = "updateCustomClassRequest"; } - if (message.deleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "deleteCustomClassRequest")) { - object.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.toObject(message.deleteCustomClassRequest, options, q + 1); + if (message.deleteCustomClassRequest != null && message.hasOwnProperty("deleteCustomClassRequest")) { + object.deleteCustomClassRequest = $root.google.cloud.speech.v2.DeleteCustomClassRequest.toObject(message.deleteCustomClassRequest, options); if (options.oneofs) object.request = "deleteCustomClassRequest"; } - if (message.undeleteCustomClassRequest != null && Object.hasOwnProperty.call(message, "undeleteCustomClassRequest")) { - object.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.toObject(message.undeleteCustomClassRequest, options, q + 1); + if (message.undeleteCustomClassRequest != null && message.hasOwnProperty("undeleteCustomClassRequest")) { + object.undeleteCustomClassRequest = $root.google.cloud.speech.v2.UndeleteCustomClassRequest.toObject(message.undeleteCustomClassRequest, options); if (options.oneofs) object.request = "undeleteCustomClassRequest"; } - if (message.createPhraseSetRequest != null && Object.hasOwnProperty.call(message, "createPhraseSetRequest")) { - object.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.toObject(message.createPhraseSetRequest, options, q + 1); + if (message.createPhraseSetRequest != null && message.hasOwnProperty("createPhraseSetRequest")) { + object.createPhraseSetRequest = $root.google.cloud.speech.v2.CreatePhraseSetRequest.toObject(message.createPhraseSetRequest, options); if (options.oneofs) object.request = "createPhraseSetRequest"; } - if (message.updatePhraseSetRequest != null && Object.hasOwnProperty.call(message, "updatePhraseSetRequest")) { - object.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.toObject(message.updatePhraseSetRequest, options, q + 1); + if (message.updatePhraseSetRequest != null && message.hasOwnProperty("updatePhraseSetRequest")) { + object.updatePhraseSetRequest = $root.google.cloud.speech.v2.UpdatePhraseSetRequest.toObject(message.updatePhraseSetRequest, options); if (options.oneofs) object.request = "updatePhraseSetRequest"; } - if (message.deletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "deletePhraseSetRequest")) { - object.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.toObject(message.deletePhraseSetRequest, options, q + 1); + if (message.deletePhraseSetRequest != null && message.hasOwnProperty("deletePhraseSetRequest")) { + object.deletePhraseSetRequest = $root.google.cloud.speech.v2.DeletePhraseSetRequest.toObject(message.deletePhraseSetRequest, options); if (options.oneofs) object.request = "deletePhraseSetRequest"; } - if (message.undeletePhraseSetRequest != null && Object.hasOwnProperty.call(message, "undeletePhraseSetRequest")) { - object.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.toObject(message.undeletePhraseSetRequest, options, q + 1); + if (message.undeletePhraseSetRequest != null && message.hasOwnProperty("undeletePhraseSetRequest")) { + object.undeletePhraseSetRequest = $root.google.cloud.speech.v2.UndeletePhraseSetRequest.toObject(message.undeletePhraseSetRequest, options); if (options.oneofs) object.request = "undeletePhraseSetRequest"; } - if (message.updateConfigRequest != null && Object.hasOwnProperty.call(message, "updateConfigRequest")) { - object.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.toObject(message.updateConfigRequest, options, q + 1); + if (message.updateConfigRequest != null && message.hasOwnProperty("updateConfigRequest")) { + object.updateConfigRequest = $root.google.cloud.speech.v2.UpdateConfigRequest.toObject(message.updateConfigRequest, options); if (options.oneofs) object.request = "updateConfigRequest"; } - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) object.progressPercent = message.progressPercent; - if (message.batchRecognizeMetadata != null && Object.hasOwnProperty.call(message, "batchRecognizeMetadata")) { - object.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.toObject(message.batchRecognizeMetadata, options, q + 1); + if (message.batchRecognizeMetadata != null && message.hasOwnProperty("batchRecognizeMetadata")) { + object.batchRecognizeMetadata = $root.google.cloud.speech.v2.BatchRecognizeMetadata.toObject(message.batchRecognizeMetadata, options); if (options.oneofs) object.metadata = "batchRecognizeMetadata"; } @@ -28698,13 +27864,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRecognizersRequest.encode = function encode(message, writer, q) { + ListRecognizersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -28726,7 +27888,7 @@ * @returns {$protobuf.Writer} Writer */ ListRecognizersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -28808,16 +27970,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -28834,8 +27996,6 @@ ListRecognizersRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListRecognizersRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListRecognizersRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -28861,13 +28021,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRecognizersRequest.toObject = function toObject(message, options, q) { + ListRecognizersRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -28875,13 +28031,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -28978,16 +28134,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRecognizersResponse.encode = function encode(message, writer, q) { + ListRecognizersResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.recognizers != null && message.recognizers.length) for (var i = 0; i < message.recognizers.length; ++i) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -29003,7 +28155,7 @@ * @returns {$protobuf.Writer} Writer */ ListRecognizersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -29079,7 +28231,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizers != null && Object.hasOwnProperty.call(message, "recognizers")) { + if (message.recognizers != null && message.hasOwnProperty("recognizers")) { if (!Array.isArray(message.recognizers)) return "recognizers: array expected"; for (var i = 0; i < message.recognizers.length; ++i) { @@ -29088,7 +28240,7 @@ return "recognizers." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -29105,8 +28257,6 @@ ListRecognizersResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListRecognizersResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29117,7 +28267,7 @@ throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse.recognizers: array expected"); message.recognizers = []; for (var i = 0; i < object.recognizers.length; ++i) { - if (!$util.isObject(object.recognizers[i])) + if (typeof object.recognizers[i] !== "object") throw TypeError(".google.cloud.speech.v2.ListRecognizersResponse.recognizers: object expected"); message.recognizers[i] = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizers[i], long + 1); } @@ -29136,13 +28286,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRecognizersResponse.toObject = function toObject(message, options, q) { + ListRecognizersResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.recognizers = []; @@ -29151,9 +28297,9 @@ if (message.recognizers && message.recognizers.length) { object.recognizers = []; for (var j = 0; j < message.recognizers.length; ++j) - object.recognizers[j] = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizers[j], options, q + 1); + object.recognizers[j] = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizers[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -29240,13 +28386,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRecognizerRequest.encode = function encode(message, writer, q) { + GetRecognizerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -29262,7 +28404,7 @@ * @returns {$protobuf.Writer} Writer */ GetRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -29332,7 +28474,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -29349,8 +28491,6 @@ GetRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetRecognizerRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.GetRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29370,17 +28510,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRecognizerRequest.toObject = function toObject(message, options, q) { + GetRecognizerRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -29485,17 +28621,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateRecognizerRequest.encode = function encode(message, writer, q) { + UpdateRecognizerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.Recognizer.encode(message.recognizer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -29511,7 +28643,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -29589,17 +28721,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) { + if (message.recognizer != null && message.hasOwnProperty("recognizer")) { var error = $root.google.cloud.speech.v2.Recognizer.verify(message.recognizer, long + 1); if (error) return "recognizer." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -29616,20 +28748,18 @@ UpdateRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateRecognizerRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateRecognizerRequest(); if (object.recognizer != null) { - if (!$util.isObject(object.recognizer)) + if (typeof object.recognizer !== "object") throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest.recognizer: object expected"); message.recognizer = $root.google.cloud.speech.v2.Recognizer.fromObject(object.recognizer, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v2.UpdateRecognizerRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -29647,24 +28777,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateRecognizerRequest.toObject = function toObject(message, options, q) { + UpdateRecognizerRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.recognizer = null; object.updateMask = null; object.validateOnly = false; } - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) - object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) + object.recognizer = $root.google.cloud.speech.v2.Recognizer.toObject(message.recognizer, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -29778,13 +28904,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteRecognizerRequest.encode = function encode(message, writer, q) { + DeleteRecognizerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -29806,7 +28928,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -29888,16 +29010,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -29914,8 +29036,6 @@ DeleteRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeleteRecognizerRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.DeleteRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -29941,13 +29061,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteRecognizerRequest.toObject = function toObject(message, options, q) { + DeleteRecognizerRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -29955,13 +29071,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -30066,13 +29182,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteRecognizerRequest.encode = function encode(message, writer, q) { + UndeleteRecognizerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -30092,7 +29204,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteRecognizerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -30170,13 +29282,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -30193,8 +29305,6 @@ UndeleteRecognizerRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeleteRecognizerRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UndeleteRecognizerRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30218,24 +29328,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteRecognizerRequest.toObject = function toObject(message, options, q) { + UndeleteRecognizerRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; }; @@ -30459,13 +29565,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Recognizer.encode = function encode(message, writer, q) { + Recognizer.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) @@ -30475,24 +29577,24 @@ if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.model); if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.defaultRecognitionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.defaultRecognitionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) writer.uint32(/* id 13, wireType 0 =*/104).bool(message.reconciling); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.kmsKeyName); if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) @@ -30513,7 +29615,7 @@ * @returns {$protobuf.Writer} Writer */ Recognizer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -30666,31 +29768,31 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.languageCodes != null && Object.hasOwnProperty.call(message, "languageCodes")) { + if (message.languageCodes != null && message.hasOwnProperty("languageCodes")) { if (!Array.isArray(message.languageCodes)) return "languageCodes: array expected"; for (var i = 0; i < message.languageCodes.length; ++i) if (!$util.isString(message.languageCodes[i])) return "languageCodes: string[] expected"; } - if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) { + if (message.defaultRecognitionConfig != null && message.hasOwnProperty("defaultRecognitionConfig")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.defaultRecognitionConfig, long + 1); if (error) return "defaultRecognitionConfig." + error; } - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { + if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -30698,7 +29800,7 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: return "state: enum value expected"; @@ -30707,36 +29809,36 @@ case 4: break; } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -30753,8 +29855,6 @@ Recognizer.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.Recognizer) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.Recognizer: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -30776,12 +29876,12 @@ message.languageCodes[i] = String(object.languageCodes[i]); } if (object.defaultRecognitionConfig != null) { - if (!$util.isObject(object.defaultRecognitionConfig)) + if (typeof object.defaultRecognitionConfig !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.defaultRecognitionConfig: object expected"); message.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.defaultRecognitionConfig, long + 1); } if (object.annotations) { - if (!$util.isObject(object.annotations)) + if (typeof object.annotations !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -30811,22 +29911,22 @@ break; } if (object.createTime != null) { - if (!$util.isObject(object.createTime)) + if (typeof object.createTime !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (!$util.isObject(object.updateTime)) + if (typeof object.updateTime !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (!$util.isObject(object.deleteTime)) + if (typeof object.deleteTime !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) + if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.speech.v2.Recognizer.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } @@ -30850,13 +29950,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Recognizer.toObject = function toObject(message, options, q) { + Recognizer.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languageCodes = []; @@ -30878,16 +29974,16 @@ object.kmsKeyName = ""; object.kmsKeyVersionName = ""; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) object.model = message.model; - if (message.defaultRecognitionConfig != null && Object.hasOwnProperty.call(message, "defaultRecognitionConfig")) - object.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.defaultRecognitionConfig, options, q + 1); + if (message.defaultRecognitionConfig != null && message.hasOwnProperty("defaultRecognitionConfig")) + object.defaultRecognitionConfig = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.defaultRecognitionConfig, options); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -30897,23 +29993,23 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.Recognizer.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.Recognizer.State[message.state] : message.state; - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; if (message.languageCodes && message.languageCodes.length) { object.languageCodes = []; @@ -31012,13 +30108,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutoDetectDecodingConfig.encode = function encode(message, writer, q) { + AutoDetectDecodingConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -31032,7 +30124,7 @@ * @returns {$protobuf.Writer} Writer */ AutoDetectDecodingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -31112,6 +30204,10 @@ AutoDetectDecodingConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.AutoDetectDecodingConfig) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.AutoDetectDecodingConfig(); }; @@ -31228,13 +30324,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExplicitDecodingConfig.encode = function encode(message, writer, q) { + ExplicitDecodingConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) @@ -31254,7 +30346,7 @@ * @returns {$protobuf.Writer} Writer */ ExplicitDecodingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -31332,7 +30424,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) switch (message.encoding) { default: return "encoding: enum value expected"; @@ -31351,10 +30443,10 @@ case 12: break; } - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) if (!$util.isInteger(message.sampleRateHertz)) return "sampleRateHertz: integer expected"; - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) if (!$util.isInteger(message.audioChannelCount)) return "audioChannelCount: integer expected"; return null; @@ -31371,8 +30463,6 @@ ExplicitDecodingConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ExplicitDecodingConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ExplicitDecodingConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31454,24 +30544,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExplicitDecodingConfig.toObject = function toObject(message, options, q) { + ExplicitDecodingConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.encoding = options.enums === String ? "AUDIO_ENCODING_UNSPECIFIED" : 0; object.sampleRateHertz = 0; object.audioChannelCount = 0; } - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + if (message.encoding != null && message.hasOwnProperty("encoding")) object.encoding = options.enums === String ? $root.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding[message.encoding] === undefined ? message.encoding : $root.google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding[message.encoding] : message.encoding; - if (message.sampleRateHertz != null && Object.hasOwnProperty.call(message, "sampleRateHertz")) + if (message.sampleRateHertz != null && message.hasOwnProperty("sampleRateHertz")) object.sampleRateHertz = message.sampleRateHertz; - if (message.audioChannelCount != null && Object.hasOwnProperty.call(message, "audioChannelCount")) + if (message.audioChannelCount != null && message.hasOwnProperty("audioChannelCount")) object.audioChannelCount = message.audioChannelCount; return object; }; @@ -31603,13 +30689,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeakerDiarizationConfig.encode = function encode(message, writer, q) { + SpeakerDiarizationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minSpeakerCount); if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) @@ -31627,7 +30709,7 @@ * @returns {$protobuf.Writer} Writer */ SpeakerDiarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -31701,10 +30783,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) if (!$util.isInteger(message.minSpeakerCount)) return "minSpeakerCount: integer expected"; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) if (!$util.isInteger(message.maxSpeakerCount)) return "maxSpeakerCount: integer expected"; return null; @@ -31721,8 +30803,6 @@ SpeakerDiarizationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeakerDiarizationConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.SpeakerDiarizationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31744,21 +30824,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeakerDiarizationConfig.toObject = function toObject(message, options, q) { + SpeakerDiarizationConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.minSpeakerCount = 0; object.maxSpeakerCount = 0; } - if (message.minSpeakerCount != null && Object.hasOwnProperty.call(message, "minSpeakerCount")) + if (message.minSpeakerCount != null && message.hasOwnProperty("minSpeakerCount")) object.minSpeakerCount = message.minSpeakerCount; - if (message.maxSpeakerCount != null && Object.hasOwnProperty.call(message, "maxSpeakerCount")) + if (message.maxSpeakerCount != null && message.hasOwnProperty("maxSpeakerCount")) object.maxSpeakerCount = message.maxSpeakerCount; return object; }; @@ -31845,13 +30921,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomPromptConfig.encode = function encode(message, writer, q) { + CustomPromptConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.customPrompt); return writer; @@ -31867,7 +30939,7 @@ * @returns {$protobuf.Writer} Writer */ CustomPromptConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -31937,7 +31009,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) + if (message.customPrompt != null && message.hasOwnProperty("customPrompt")) if (!$util.isString(message.customPrompt)) return "customPrompt: string expected"; return null; @@ -31954,8 +31026,6 @@ CustomPromptConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomPromptConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CustomPromptConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -31975,17 +31045,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomPromptConfig.toObject = function toObject(message, options, q) { + CustomPromptConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.customPrompt = ""; - if (message.customPrompt != null && Object.hasOwnProperty.call(message, "customPrompt")) + if (message.customPrompt != null && message.hasOwnProperty("customPrompt")) object.customPrompt = message.customPrompt; return object; }; @@ -32153,13 +31219,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionFeatures.encode = function encode(message, writer, q) { + RecognitionFeatures.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.profanityFilter); if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) @@ -32169,7 +31231,7 @@ if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableAutomaticPunctuation); if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - $root.google.cloud.speech.v2.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeakerDiarizationConfig.encode(message.diarizationConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.enableSpokenPunctuation); if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) @@ -32179,7 +31241,7 @@ if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) writer.uint32(/* id 17, wireType 0 =*/136).int32(message.multiChannelMode); if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) - $root.google.cloud.speech.v2.CustomPromptConfig.encode(message.customPromptConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomPromptConfig.encode(message.customPromptConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -32193,7 +31255,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -32299,25 +31361,25 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) if (typeof message.profanityFilter !== "boolean") return "profanityFilter: boolean expected"; - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) if (typeof message.enableWordTimeOffsets !== "boolean") return "enableWordTimeOffsets: boolean expected"; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) if (typeof message.enableWordConfidence !== "boolean") return "enableWordConfidence: boolean expected"; - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) if (typeof message.enableAutomaticPunctuation !== "boolean") return "enableAutomaticPunctuation: boolean expected"; - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) if (typeof message.enableSpokenPunctuation !== "boolean") return "enableSpokenPunctuation: boolean expected"; - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) if (typeof message.enableSpokenEmojis !== "boolean") return "enableSpokenEmojis: boolean expected"; - if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) + if (message.multiChannelMode != null && message.hasOwnProperty("multiChannelMode")) switch (message.multiChannelMode) { default: return "multiChannelMode: enum value expected"; @@ -32325,15 +31387,15 @@ case 1: break; } - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) { + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) { var error = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.verify(message.diarizationConfig, long + 1); if (error) return "diarizationConfig." + error; } - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) if (!$util.isInteger(message.maxAlternatives)) return "maxAlternatives: integer expected"; - if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) { + if (message.customPromptConfig != null && message.hasOwnProperty("customPromptConfig")) { var error = $root.google.cloud.speech.v2.CustomPromptConfig.verify(message.customPromptConfig, long + 1); if (error) return "customPromptConfig." + error; @@ -32352,8 +31414,6 @@ RecognitionFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionFeatures) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognitionFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32388,14 +31448,14 @@ break; } if (object.diarizationConfig != null) { - if (!$util.isObject(object.diarizationConfig)) + if (typeof object.diarizationConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionFeatures.diarizationConfig: object expected"); message.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.fromObject(object.diarizationConfig, long + 1); } if (object.maxAlternatives != null) message.maxAlternatives = object.maxAlternatives | 0; if (object.customPromptConfig != null) { - if (!$util.isObject(object.customPromptConfig)) + if (typeof object.customPromptConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionFeatures.customPromptConfig: object expected"); message.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.fromObject(object.customPromptConfig, long + 1); } @@ -32411,13 +31471,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionFeatures.toObject = function toObject(message, options, q) { + RecognitionFeatures.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.profanityFilter = false; @@ -32431,26 +31487,26 @@ object.multiChannelMode = options.enums === String ? "MULTI_CHANNEL_MODE_UNSPECIFIED" : 0; object.customPromptConfig = null; } - if (message.profanityFilter != null && Object.hasOwnProperty.call(message, "profanityFilter")) + if (message.profanityFilter != null && message.hasOwnProperty("profanityFilter")) object.profanityFilter = message.profanityFilter; - if (message.enableWordTimeOffsets != null && Object.hasOwnProperty.call(message, "enableWordTimeOffsets")) + if (message.enableWordTimeOffsets != null && message.hasOwnProperty("enableWordTimeOffsets")) object.enableWordTimeOffsets = message.enableWordTimeOffsets; - if (message.enableWordConfidence != null && Object.hasOwnProperty.call(message, "enableWordConfidence")) + if (message.enableWordConfidence != null && message.hasOwnProperty("enableWordConfidence")) object.enableWordConfidence = message.enableWordConfidence; - if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; - if (message.diarizationConfig != null && Object.hasOwnProperty.call(message, "diarizationConfig")) - object.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options, q + 1); - if (message.enableSpokenPunctuation != null && Object.hasOwnProperty.call(message, "enableSpokenPunctuation")) + if (message.diarizationConfig != null && message.hasOwnProperty("diarizationConfig")) + object.diarizationConfig = $root.google.cloud.speech.v2.SpeakerDiarizationConfig.toObject(message.diarizationConfig, options); + if (message.enableSpokenPunctuation != null && message.hasOwnProperty("enableSpokenPunctuation")) object.enableSpokenPunctuation = message.enableSpokenPunctuation; - if (message.enableSpokenEmojis != null && Object.hasOwnProperty.call(message, "enableSpokenEmojis")) + if (message.enableSpokenEmojis != null && message.hasOwnProperty("enableSpokenEmojis")) object.enableSpokenEmojis = message.enableSpokenEmojis; - if (message.maxAlternatives != null && Object.hasOwnProperty.call(message, "maxAlternatives")) + if (message.maxAlternatives != null && message.hasOwnProperty("maxAlternatives")) object.maxAlternatives = message.maxAlternatives; - if (message.multiChannelMode != null && Object.hasOwnProperty.call(message, "multiChannelMode")) + if (message.multiChannelMode != null && message.hasOwnProperty("multiChannelMode")) object.multiChannelMode = options.enums === String ? $root.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode[message.multiChannelMode] === undefined ? message.multiChannelMode : $root.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode[message.multiChannelMode] : message.multiChannelMode; - if (message.customPromptConfig != null && Object.hasOwnProperty.call(message, "customPromptConfig")) - object.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.toObject(message.customPromptConfig, options, q + 1); + if (message.customPromptConfig != null && message.hasOwnProperty("customPromptConfig")) + object.customPromptConfig = $root.google.cloud.speech.v2.CustomPromptConfig.toObject(message.customPromptConfig, options); return object; }; @@ -32551,16 +31607,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranscriptNormalization.encode = function encode(message, writer, q) { + TranscriptNormalization.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.entries != null && message.entries.length) for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.speech.v2.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.TranscriptNormalization.Entry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -32574,7 +31626,7 @@ * @returns {$protobuf.Writer} Writer */ TranscriptNormalization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -32646,7 +31698,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.entries != null && Object.hasOwnProperty.call(message, "entries")) { + if (message.entries != null && message.hasOwnProperty("entries")) { if (!Array.isArray(message.entries)) return "entries: array expected"; for (var i = 0; i < message.entries.length; ++i) { @@ -32669,8 +31721,6 @@ TranscriptNormalization.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranscriptNormalization) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.TranscriptNormalization: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32681,7 +31731,7 @@ throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.entries: array expected"); message.entries = []; for (var i = 0; i < object.entries.length; ++i) { - if (!$util.isObject(object.entries[i])) + if (typeof object.entries[i] !== "object") throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.entries: object expected"); message.entries[i] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.fromObject(object.entries[i], long + 1); } @@ -32698,20 +31748,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranscriptNormalization.toObject = function toObject(message, options, q) { + TranscriptNormalization.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.entries = []; if (message.entries && message.entries.length) { object.entries = []; for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.toObject(message.entries[j], options, q + 1); + object.entries[j] = $root.google.cloud.speech.v2.TranscriptNormalization.Entry.toObject(message.entries[j], options); } return object; }; @@ -32813,13 +31859,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer, q) { + Entry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.search != null && Object.hasOwnProperty.call(message, "search")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.search); if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) @@ -32839,7 +31881,7 @@ * @returns {$protobuf.Writer} Writer */ Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -32917,13 +31959,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) if (!$util.isString(message.search)) return "search: string expected"; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) if (!$util.isString(message.replace)) return "replace: string expected"; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) if (typeof message.caseSensitive !== "boolean") return "caseSensitive: boolean expected"; return null; @@ -32940,8 +31982,6 @@ Entry.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranscriptNormalization.Entry) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.TranscriptNormalization.Entry: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -32965,24 +32005,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options, q) { + Entry.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.search = ""; object.replace = ""; object.caseSensitive = false; } - if (message.search != null && Object.hasOwnProperty.call(message, "search")) + if (message.search != null && message.hasOwnProperty("search")) object.search = message.search; - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + if (message.replace != null && message.hasOwnProperty("replace")) object.replace = message.replace; - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) object.caseSensitive = message.caseSensitive; return object; }; @@ -33072,13 +32108,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationConfig.encode = function encode(message, writer, q) { + TranslationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetLanguage); return writer; @@ -33094,7 +32126,7 @@ * @returns {$protobuf.Writer} Writer */ TranslationConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -33164,7 +32196,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) + if (message.targetLanguage != null && message.hasOwnProperty("targetLanguage")) if (!$util.isString(message.targetLanguage)) return "targetLanguage: string expected"; return null; @@ -33181,8 +32213,6 @@ TranslationConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.TranslationConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.TranslationConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33202,17 +32232,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationConfig.toObject = function toObject(message, options, q) { + TranslationConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.targetLanguage = ""; - if (message.targetLanguage != null && Object.hasOwnProperty.call(message, "targetLanguage")) + if (message.targetLanguage != null && message.hasOwnProperty("targetLanguage")) object.targetLanguage = message.targetLanguage; return object; }; @@ -33310,19 +32336,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechAdaptation.encode = function encode(message, writer, q) { + SpeechAdaptation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -33336,7 +32358,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechAdaptation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -33414,7 +32436,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -33423,7 +32445,7 @@ return "phraseSets." + error; } } - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -33446,8 +32468,6 @@ SpeechAdaptation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechAdaptation) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.SpeechAdaptation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33458,7 +32478,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -33468,7 +32488,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -33485,13 +32505,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechAdaptation.toObject = function toObject(message, options, q) { + SpeechAdaptation.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.phraseSets = []; @@ -33500,12 +32516,12 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.toObject(message.phraseSets[j], options); } if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options); } return object; }; @@ -33612,17 +32628,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdaptationPhraseSet.encode = function encode(message, writer, q) { + AdaptationPhraseSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.phraseSet); if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.inlinePhraseSet, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.inlinePhraseSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -33636,7 +32648,7 @@ * @returns {$protobuf.Writer} Writer */ AdaptationPhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -33711,12 +32723,12 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { properties.value = 1; if (!$util.isString(message.phraseSet)) return "phraseSet: string expected"; } - if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) { + if (message.inlinePhraseSet != null && message.hasOwnProperty("inlinePhraseSet")) { if (properties.value === 1) return "value: multiple values"; properties.value = 1; @@ -33740,8 +32752,6 @@ AdaptationPhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -33750,7 +32760,7 @@ if (object.phraseSet != null) message.phraseSet = String(object.phraseSet); if (object.inlinePhraseSet != null) { - if (!$util.isObject(object.inlinePhraseSet)) + if (typeof object.inlinePhraseSet !== "object") throw TypeError(".google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet.inlinePhraseSet: object expected"); message.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.inlinePhraseSet, long + 1); } @@ -33766,21 +32776,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdaptationPhraseSet.toObject = function toObject(message, options, q) { + AdaptationPhraseSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { object.phraseSet = message.phraseSet; if (options.oneofs) object.value = "phraseSet"; } - if (message.inlinePhraseSet != null && Object.hasOwnProperty.call(message, "inlinePhraseSet")) { - object.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.inlinePhraseSet, options, q + 1); + if (message.inlinePhraseSet != null && message.hasOwnProperty("inlinePhraseSet")) { + object.inlinePhraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.inlinePhraseSet, options); if (options.oneofs) object.value = "inlinePhraseSet"; } @@ -33881,13 +32887,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DenoiserConfig.encode = function encode(message, writer, q) { + DenoiserConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.denoiseAudio); if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) @@ -33905,7 +32907,7 @@ * @returns {$protobuf.Writer} Writer */ DenoiserConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -33979,10 +32981,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) + if (message.denoiseAudio != null && message.hasOwnProperty("denoiseAudio")) if (typeof message.denoiseAudio !== "boolean") return "denoiseAudio: boolean expected"; - if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) + if (message.snrThreshold != null && message.hasOwnProperty("snrThreshold")) if (typeof message.snrThreshold !== "number") return "snrThreshold: number expected"; return null; @@ -33999,8 +33001,6 @@ DenoiserConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DenoiserConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.DenoiserConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34022,21 +33022,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DenoiserConfig.toObject = function toObject(message, options, q) { + DenoiserConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.denoiseAudio = false; object.snrThreshold = 0; } - if (message.denoiseAudio != null && Object.hasOwnProperty.call(message, "denoiseAudio")) + if (message.denoiseAudio != null && message.hasOwnProperty("denoiseAudio")) object.denoiseAudio = message.denoiseAudio; - if (message.snrThreshold != null && Object.hasOwnProperty.call(message, "snrThreshold")) + if (message.snrThreshold != null && message.hasOwnProperty("snrThreshold")) object.snrThreshold = options.json && !isFinite(message.snrThreshold) ? String(message.snrThreshold) : message.snrThreshold; return object; }; @@ -34210,32 +33206,28 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionConfig.encode = function encode(message, writer, q) { + RecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.cloud.speech.v2.RecognitionFeatures.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionFeatures.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - $root.google.cloud.speech.v2.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechAdaptation.encode(message.adaptation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) - $root.google.cloud.speech.v2.AutoDetectDecodingConfig.encode(message.autoDecodingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.AutoDetectDecodingConfig.encode(message.autoDecodingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) - $root.google.cloud.speech.v2.ExplicitDecodingConfig.encode(message.explicitDecodingConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.ExplicitDecodingConfig.encode(message.explicitDecodingConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.model); if (message.languageCodes != null && message.languageCodes.length) for (var i = 0; i < message.languageCodes.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCodes[i]); if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - $root.google.cloud.speech.v2.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.TranscriptNormalization.encode(message.transcriptNormalization, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) - $root.google.cloud.speech.v2.TranslationConfig.encode(message.translationConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.TranslationConfig.encode(message.translationConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) - $root.google.cloud.speech.v2.DenoiserConfig.encode(message.denoiserConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.DenoiserConfig.encode(message.denoiserConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); return writer; }; @@ -34249,7 +33241,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -34354,7 +33346,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) { + if (message.autoDecodingConfig != null && message.hasOwnProperty("autoDecodingConfig")) { properties.decodingConfig = 1; { var error = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.verify(message.autoDecodingConfig, long + 1); @@ -34362,7 +33354,7 @@ return "autoDecodingConfig." + error; } } - if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) { + if (message.explicitDecodingConfig != null && message.hasOwnProperty("explicitDecodingConfig")) { if (properties.decodingConfig === 1) return "decodingConfig: multiple values"; properties.decodingConfig = 1; @@ -34372,37 +33364,37 @@ return "explicitDecodingConfig." + error; } } - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) if (!$util.isString(message.model)) return "model: string expected"; - if (message.languageCodes != null && Object.hasOwnProperty.call(message, "languageCodes")) { + if (message.languageCodes != null && message.hasOwnProperty("languageCodes")) { if (!Array.isArray(message.languageCodes)) return "languageCodes: array expected"; for (var i = 0; i < message.languageCodes.length; ++i) if (!$util.isString(message.languageCodes[i])) return "languageCodes: string[] expected"; } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.cloud.speech.v2.RecognitionFeatures.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) { + if (message.adaptation != null && message.hasOwnProperty("adaptation")) { var error = $root.google.cloud.speech.v2.SpeechAdaptation.verify(message.adaptation, long + 1); if (error) return "adaptation." + error; } - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) { + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) { var error = $root.google.cloud.speech.v2.TranscriptNormalization.verify(message.transcriptNormalization, long + 1); if (error) return "transcriptNormalization." + error; } - if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) { + if (message.translationConfig != null && message.hasOwnProperty("translationConfig")) { var error = $root.google.cloud.speech.v2.TranslationConfig.verify(message.translationConfig, long + 1); if (error) return "translationConfig." + error; } - if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) { + if (message.denoiserConfig != null && message.hasOwnProperty("denoiserConfig")) { var error = $root.google.cloud.speech.v2.DenoiserConfig.verify(message.denoiserConfig, long + 1); if (error) return "denoiserConfig." + error; @@ -34421,20 +33413,18 @@ RecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.RecognitionConfig(); if (object.autoDecodingConfig != null) { - if (!$util.isObject(object.autoDecodingConfig)) + if (typeof object.autoDecodingConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.autoDecodingConfig: object expected"); message.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.fromObject(object.autoDecodingConfig, long + 1); } if (object.explicitDecodingConfig != null) { - if (!$util.isObject(object.explicitDecodingConfig)) + if (typeof object.explicitDecodingConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.explicitDecodingConfig: object expected"); message.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.fromObject(object.explicitDecodingConfig, long + 1); } @@ -34448,27 +33438,27 @@ message.languageCodes[i] = String(object.languageCodes[i]); } if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.features: object expected"); message.features = $root.google.cloud.speech.v2.RecognitionFeatures.fromObject(object.features, long + 1); } if (object.adaptation != null) { - if (!$util.isObject(object.adaptation)) + if (typeof object.adaptation !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.adaptation: object expected"); message.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.fromObject(object.adaptation, long + 1); } if (object.transcriptNormalization != null) { - if (!$util.isObject(object.transcriptNormalization)) + if (typeof object.transcriptNormalization !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.transcriptNormalization: object expected"); message.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.fromObject(object.transcriptNormalization, long + 1); } if (object.translationConfig != null) { - if (!$util.isObject(object.translationConfig)) + if (typeof object.translationConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.translationConfig: object expected"); message.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.fromObject(object.translationConfig, long + 1); } if (object.denoiserConfig != null) { - if (!$util.isObject(object.denoiserConfig)) + if (typeof object.denoiserConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionConfig.denoiserConfig: object expected"); message.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.fromObject(object.denoiserConfig, long + 1); } @@ -34484,13 +33474,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionConfig.toObject = function toObject(message, options, q) { + RecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.languageCodes = []; @@ -34502,33 +33488,33 @@ object.translationConfig = null; object.denoiserConfig = null; } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.cloud.speech.v2.RecognitionFeatures.toObject(message.features, options, q + 1); - if (message.adaptation != null && Object.hasOwnProperty.call(message, "adaptation")) - object.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.toObject(message.adaptation, options, q + 1); - if (message.autoDecodingConfig != null && Object.hasOwnProperty.call(message, "autoDecodingConfig")) { - object.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.toObject(message.autoDecodingConfig, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.cloud.speech.v2.RecognitionFeatures.toObject(message.features, options); + if (message.adaptation != null && message.hasOwnProperty("adaptation")) + object.adaptation = $root.google.cloud.speech.v2.SpeechAdaptation.toObject(message.adaptation, options); + if (message.autoDecodingConfig != null && message.hasOwnProperty("autoDecodingConfig")) { + object.autoDecodingConfig = $root.google.cloud.speech.v2.AutoDetectDecodingConfig.toObject(message.autoDecodingConfig, options); if (options.oneofs) object.decodingConfig = "autoDecodingConfig"; } - if (message.explicitDecodingConfig != null && Object.hasOwnProperty.call(message, "explicitDecodingConfig")) { - object.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.toObject(message.explicitDecodingConfig, options, q + 1); + if (message.explicitDecodingConfig != null && message.hasOwnProperty("explicitDecodingConfig")) { + object.explicitDecodingConfig = $root.google.cloud.speech.v2.ExplicitDecodingConfig.toObject(message.explicitDecodingConfig, options); if (options.oneofs) object.decodingConfig = "explicitDecodingConfig"; } - if (message.model != null && Object.hasOwnProperty.call(message, "model")) + if (message.model != null && message.hasOwnProperty("model")) object.model = message.model; if (message.languageCodes && message.languageCodes.length) { object.languageCodes = []; for (var j = 0; j < message.languageCodes.length; ++j) object.languageCodes[j] = message.languageCodes[j]; } - if (message.transcriptNormalization != null && Object.hasOwnProperty.call(message, "transcriptNormalization")) - object.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.toObject(message.transcriptNormalization, options, q + 1); - if (message.translationConfig != null && Object.hasOwnProperty.call(message, "translationConfig")) - object.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.toObject(message.translationConfig, options, q + 1); - if (message.denoiserConfig != null && Object.hasOwnProperty.call(message, "denoiserConfig")) - object.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.toObject(message.denoiserConfig, options, q + 1); + if (message.transcriptNormalization != null && message.hasOwnProperty("transcriptNormalization")) + object.transcriptNormalization = $root.google.cloud.speech.v2.TranscriptNormalization.toObject(message.transcriptNormalization, options); + if (message.translationConfig != null && message.hasOwnProperty("translationConfig")) + object.translationConfig = $root.google.cloud.speech.v2.TranslationConfig.toObject(message.translationConfig, options); + if (message.denoiserConfig != null && message.hasOwnProperty("denoiserConfig")) + object.denoiserConfig = $root.google.cloud.speech.v2.DenoiserConfig.toObject(message.denoiserConfig, options); return object; }; @@ -34664,15 +33650,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeRequest.encode = function encode(message, writer, q) { + RecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recognizer); if (message.content != null && Object.hasOwnProperty.call(message, "content")) @@ -34680,7 +33662,7 @@ if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.uri); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -34694,7 +33676,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -34781,25 +33763,25 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { + if (message.configMask != null && message.hasOwnProperty("configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { properties.audioSource = 1; if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) return "content: buffer expected"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { if (properties.audioSource === 1) return "audioSource: multiple values"; properties.audioSource = 1; @@ -34820,8 +33802,6 @@ RecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -34830,12 +33810,12 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v2.RecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (!$util.isObject(object.configMask)) + if (typeof object.configMask !== "object") throw TypeError(".google.cloud.speech.v2.RecognizeRequest.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -34858,35 +33838,31 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeRequest.toObject = function toObject(message, options, q) { + RecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.recognizer = ""; object.configMask = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); + if (message.recognizer != null && message.hasOwnProperty("recognizer")) object.recognizer = message.recognizer; - if (message.content != null && Object.hasOwnProperty.call(message, "content")) { + if (message.content != null && message.hasOwnProperty("content")) { object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; if (options.oneofs) object.audioSource = "content"; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; } - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); + if (message.configMask != null && message.hasOwnProperty("configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); return object; }; @@ -34999,15 +33975,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionResponseMetadata.encode = function encode(message, writer, q) { + RecognitionResponseMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.requestId); if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) @@ -35025,7 +33997,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionResponseMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -35104,15 +34076,15 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) { + if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledDuration, long + 1); if (error) return "totalBilledDuration." + error; } - if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) { + if (message.prompt != null && message.hasOwnProperty("prompt")) { properties._prompt = 1; if (!$util.isString(message.prompt)) return "prompt: string expected"; @@ -35131,8 +34103,6 @@ RecognitionResponseMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionResponseMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognitionResponseMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35141,7 +34111,7 @@ if (object.requestId != null) message.requestId = String(object.requestId); if (object.totalBilledDuration != null) { - if (!$util.isObject(object.totalBilledDuration)) + if (typeof object.totalBilledDuration !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionResponseMetadata.totalBilledDuration: object expected"); message.totalBilledDuration = $root.google.protobuf.Duration.fromObject(object.totalBilledDuration, long + 1); } @@ -35159,23 +34129,19 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionResponseMetadata.toObject = function toObject(message, options, q) { + RecognitionResponseMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.totalBilledDuration = null; object.requestId = ""; } - if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options, q + 1); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) + object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; - if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) { + if (message.prompt != null && message.hasOwnProperty("prompt")) { object.prompt = message.prompt; if (options.oneofs) object._prompt = "prompt"; @@ -35284,20 +34250,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionAlternative.encode = function encode(message, writer, q) { + SpeechRecognitionAlternative.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.transcript); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); if (message.words != null && message.words.length) for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.speech.v2.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -35311,7 +34273,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionAlternative.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -35391,13 +34353,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) if (!$util.isString(message.transcript)) return "transcript: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.words != null && Object.hasOwnProperty.call(message, "words")) { + if (message.words != null && message.hasOwnProperty("words")) { if (!Array.isArray(message.words)) return "words: array expected"; for (var i = 0; i < message.words.length; ++i) { @@ -35420,8 +34382,6 @@ SpeechRecognitionAlternative.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechRecognitionAlternative) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -35436,7 +34396,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative.words: array expected"); message.words = []; for (var i = 0; i < object.words.length; ++i) { - if (!$util.isObject(object.words[i])) + if (typeof object.words[i] !== "object") throw TypeError(".google.cloud.speech.v2.SpeechRecognitionAlternative.words: object expected"); message.words[i] = $root.google.cloud.speech.v2.WordInfo.fromObject(object.words[i], long + 1); } @@ -35453,13 +34413,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionAlternative.toObject = function toObject(message, options, q) { + SpeechRecognitionAlternative.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.words = []; @@ -35467,14 +34423,14 @@ object.transcript = ""; object.confidence = 0; } - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + if (message.transcript != null && message.hasOwnProperty("transcript")) object.transcript = message.transcript; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; if (message.words && message.words.length) { object.words = []; for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.speech.v2.WordInfo.toObject(message.words[j], options, q + 1); + object.words[j] = $root.google.cloud.speech.v2.WordInfo.toObject(message.words[j], options); } return object; }; @@ -35597,17 +34553,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WordInfo.encode = function encode(message, writer, q) { + WordInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.word != null && Object.hasOwnProperty.call(message, "word")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) @@ -35627,7 +34579,7 @@ * @returns {$protobuf.Writer} Writer */ WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -35713,23 +34665,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) { + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { var error = $root.google.protobuf.Duration.verify(message.startOffset, long + 1); if (error) return "startOffset." + error; } - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) { + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { var error = $root.google.protobuf.Duration.verify(message.endOffset, long + 1); if (error) return "endOffset." + error; } - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.word != null && message.hasOwnProperty("word")) if (!$util.isString(message.word)) return "word: string expected"; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) if (typeof message.confidence !== "number") return "confidence: number expected"; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) if (!$util.isString(message.speakerLabel)) return "speakerLabel: string expected"; return null; @@ -35746,20 +34698,18 @@ WordInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.WordInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.WordInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.WordInfo(); if (object.startOffset != null) { - if (!$util.isObject(object.startOffset)) + if (typeof object.startOffset !== "object") throw TypeError(".google.cloud.speech.v2.WordInfo.startOffset: object expected"); message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset, long + 1); } if (object.endOffset != null) { - if (!$util.isObject(object.endOffset)) + if (typeof object.endOffset !== "object") throw TypeError(".google.cloud.speech.v2.WordInfo.endOffset: object expected"); message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset, long + 1); } @@ -35781,13 +34731,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WordInfo.toObject = function toObject(message, options, q) { + WordInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.startOffset = null; @@ -35796,15 +34742,15 @@ object.confidence = 0; object.speakerLabel = ""; } - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options, q + 1); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options, q + 1); - if (message.word != null && Object.hasOwnProperty.call(message, "word")) + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) object.word = message.word; - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.speakerLabel != null && Object.hasOwnProperty.call(message, "speakerLabel")) + if (message.speakerLabel != null && message.hasOwnProperty("speakerLabel")) object.speakerLabel = message.speakerLabel; return object; }; @@ -35919,20 +34865,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechRecognitionResult.encode = function encode(message, writer, q) { + SpeechRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.channelTag); if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageCode); return writer; @@ -35948,7 +34890,7 @@ * @returns {$protobuf.Writer} Writer */ SpeechRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -36032,7 +34974,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -36041,15 +34983,15 @@ return "alternatives." + error; } } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) { + if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) { var error = $root.google.protobuf.Duration.verify(message.resultEndOffset, long + 1); if (error) return "resultEndOffset." + error; } - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -36066,8 +35008,6 @@ SpeechRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SpeechRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36078,7 +35018,7 @@ throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -36086,7 +35026,7 @@ if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.resultEndOffset != null) { - if (!$util.isObject(object.resultEndOffset)) + if (typeof object.resultEndOffset !== "object") throw TypeError(".google.cloud.speech.v2.SpeechRecognitionResult.resultEndOffset: object expected"); message.resultEndOffset = $root.google.protobuf.Duration.fromObject(object.resultEndOffset, long + 1); } @@ -36104,13 +35044,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechRecognitionResult.toObject = function toObject(message, options, q) { + SpeechRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -36122,13 +35058,13 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options, q + 1); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) + object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -36225,18 +35161,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognizeResponse.encode = function encode(message, writer, q) { + RecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -36250,7 +35182,7 @@ * @returns {$protobuf.Writer} Writer */ RecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -36326,7 +35258,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -36335,7 +35267,7 @@ return "results." + error; } } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -36354,8 +35286,6 @@ RecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36366,13 +35296,13 @@ throw TypeError(".google.cloud.speech.v2.RecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v2.RecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v2.RecognizeResponse.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -36388,24 +35318,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognizeResponse.toObject = function toObject(message, options, q) { + RecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; if (options.defaults) object.metadata = null; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options); } return object; }; @@ -36519,19 +35445,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionFeatures.encode = function encode(message, writer, q) { + StreamingRecognitionFeatures.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableVoiceActivityEvents); if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.interimResults); if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.encode(message.voiceActivityTimeout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.endpointingSensitivity); return writer; @@ -36547,7 +35469,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -36629,18 +35551,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) if (typeof message.enableVoiceActivityEvents !== "boolean") return "enableVoiceActivityEvents: boolean expected"; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) if (typeof message.interimResults !== "boolean") return "interimResults: boolean expected"; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) { + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) { var error = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.verify(message.voiceActivityTimeout, long + 1); if (error) return "voiceActivityTimeout." + error; } - if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) + if (message.endpointingSensitivity != null && message.hasOwnProperty("endpointingSensitivity")) switch (message.endpointingSensitivity) { default: return "endpointingSensitivity: enum value expected"; @@ -36664,8 +35586,6 @@ StreamingRecognitionFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionFeatures) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -36676,7 +35596,7 @@ if (object.interimResults != null) message.interimResults = Boolean(object.interimResults); if (object.voiceActivityTimeout != null) { - if (!$util.isObject(object.voiceActivityTimeout)) + if (typeof object.voiceActivityTimeout !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.voiceActivityTimeout: object expected"); message.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.fromObject(object.voiceActivityTimeout, long + 1); } @@ -36716,13 +35636,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionFeatures.toObject = function toObject(message, options, q) { + StreamingRecognitionFeatures.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.enableVoiceActivityEvents = false; @@ -36730,13 +35646,13 @@ object.voiceActivityTimeout = null; object.endpointingSensitivity = options.enums === String ? "ENDPOINTING_SENSITIVITY_UNSPECIFIED" : 0; } - if (message.enableVoiceActivityEvents != null && Object.hasOwnProperty.call(message, "enableVoiceActivityEvents")) + if (message.enableVoiceActivityEvents != null && message.hasOwnProperty("enableVoiceActivityEvents")) object.enableVoiceActivityEvents = message.enableVoiceActivityEvents; - if (message.interimResults != null && Object.hasOwnProperty.call(message, "interimResults")) + if (message.interimResults != null && message.hasOwnProperty("interimResults")) object.interimResults = message.interimResults; - if (message.voiceActivityTimeout != null && Object.hasOwnProperty.call(message, "voiceActivityTimeout")) - object.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options, q + 1); - if (message.endpointingSensitivity != null && Object.hasOwnProperty.call(message, "endpointingSensitivity")) + if (message.voiceActivityTimeout != null && message.hasOwnProperty("voiceActivityTimeout")) + object.voiceActivityTimeout = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.toObject(message.voiceActivityTimeout, options); + if (message.endpointingSensitivity != null && message.hasOwnProperty("endpointingSensitivity")) object.endpointingSensitivity = options.enums === String ? $root.google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity[message.endpointingSensitivity] === undefined ? message.endpointingSensitivity : $root.google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity[message.endpointingSensitivity] : message.endpointingSensitivity; return object; }; @@ -36829,17 +35745,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoiceActivityTimeout.encode = function encode(message, writer, q) { + VoiceActivityTimeout.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechStartTimeout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEndTimeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -36853,7 +35765,7 @@ * @returns {$protobuf.Writer} Writer */ VoiceActivityTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -36927,12 +35839,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) { + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechStartTimeout, long + 1); if (error) return "speechStartTimeout." + error; } - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) { + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) { var error = $root.google.protobuf.Duration.verify(message.speechEndTimeout, long + 1); if (error) return "speechEndTimeout." + error; @@ -36951,20 +35863,18 @@ VoiceActivityTimeout.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout(); if (object.speechStartTimeout != null) { - if (!$util.isObject(object.speechStartTimeout)) + if (typeof object.speechStartTimeout !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.speechStartTimeout: object expected"); message.speechStartTimeout = $root.google.protobuf.Duration.fromObject(object.speechStartTimeout, long + 1); } if (object.speechEndTimeout != null) { - if (!$util.isObject(object.speechEndTimeout)) + if (typeof object.speechEndTimeout !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout.speechEndTimeout: object expected"); message.speechEndTimeout = $root.google.protobuf.Duration.fromObject(object.speechEndTimeout, long + 1); } @@ -36980,22 +35890,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VoiceActivityTimeout.toObject = function toObject(message, options, q) { + VoiceActivityTimeout.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.speechStartTimeout = null; object.speechEndTimeout = null; } - if (message.speechStartTimeout != null && Object.hasOwnProperty.call(message, "speechStartTimeout")) - object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options, q + 1); - if (message.speechEndTimeout != null && Object.hasOwnProperty.call(message, "speechEndTimeout")) - object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options, q + 1); + if (message.speechStartTimeout != null && message.hasOwnProperty("speechStartTimeout")) + object.speechStartTimeout = $root.google.protobuf.Duration.toObject(message.speechStartTimeout, options); + if (message.speechEndTimeout != null && message.hasOwnProperty("speechEndTimeout")) + object.speechEndTimeout = $root.google.protobuf.Duration.toObject(message.speechEndTimeout, options); return object; }; @@ -37120,19 +36026,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionConfig.encode = function encode(message, writer, q) { + StreamingRecognitionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) - $root.google.cloud.speech.v2.StreamingRecognitionFeatures.encode(message.streamingFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionFeatures.encode(message.streamingFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -37146,7 +36048,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -37224,17 +36126,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { + if (message.configMask != null && message.hasOwnProperty("configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) { + if (message.streamingFeatures != null && message.hasOwnProperty("streamingFeatures")) { var error = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.verify(message.streamingFeatures, long + 1); if (error) return "streamingFeatures." + error; @@ -37253,25 +36155,23 @@ StreamingRecognitionConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.StreamingRecognitionConfig(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (!$util.isObject(object.configMask)) + if (typeof object.configMask !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } if (object.streamingFeatures != null) { - if (!$util.isObject(object.streamingFeatures)) + if (typeof object.streamingFeatures !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionConfig.streamingFeatures: object expected"); message.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.fromObject(object.streamingFeatures, long + 1); } @@ -37287,25 +36187,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionConfig.toObject = function toObject(message, options, q) { + StreamingRecognitionConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.streamingFeatures = null; object.configMask = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.streamingFeatures != null && Object.hasOwnProperty.call(message, "streamingFeatures")) - object.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.toObject(message.streamingFeatures, options, q + 1); - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); + if (message.streamingFeatures != null && message.hasOwnProperty("streamingFeatures")) + object.streamingFeatures = $root.google.cloud.speech.v2.StreamingRecognitionFeatures.toObject(message.streamingFeatures, options); + if (message.configMask != null && message.hasOwnProperty("configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); return object; }; @@ -37423,19 +36319,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeRequest.encode = function encode(message, writer, q) { + StreamingRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recognizer); if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.audio); if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) - $root.google.cloud.speech.v2.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionConfig.encode(message.streamingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -37449,7 +36341,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -37528,10 +36420,10 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { properties.streamingRequest = 1; { var error = $root.google.cloud.speech.v2.StreamingRecognitionConfig.verify(message.streamingConfig, long + 1); @@ -37539,7 +36431,7 @@ return "streamingConfig." + error; } } - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { if (properties.streamingRequest === 1) return "streamingRequest: multiple values"; properties.streamingRequest = 1; @@ -37560,8 +36452,6 @@ StreamingRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37570,7 +36460,7 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.streamingConfig != null) { - if (!$util.isObject(object.streamingConfig)) + if (typeof object.streamingConfig !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognizeRequest.streamingConfig: object expected"); message.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.fromObject(object.streamingConfig, long + 1); } @@ -37591,25 +36481,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeRequest.toObject = function toObject(message, options, q) { + StreamingRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.recognizer = ""; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) object.recognizer = message.recognizer; - if (message.audio != null && Object.hasOwnProperty.call(message, "audio")) { + if (message.audio != null && message.hasOwnProperty("audio")) { object.audio = options.bytes === String ? $util.base64.encode(message.audio, 0, message.audio.length) : options.bytes === Array ? Array.prototype.slice.call(message.audio) : message.audio; if (options.oneofs) object.streamingRequest = "audio"; } - if (message.streamingConfig != null && Object.hasOwnProperty.call(message, "streamingConfig")) { - object.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.toObject(message.streamingConfig, options, q + 1); + if (message.streamingConfig != null && message.hasOwnProperty("streamingConfig")) { + object.streamingConfig = $root.google.cloud.speech.v2.StreamingRecognitionConfig.toObject(message.streamingConfig, options); if (options.oneofs) object.streamingRequest = "streamingConfig"; } @@ -37744,24 +36630,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeRequest.encode = function encode(message, writer, q) { + BatchRecognizeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.recognizer); if (message.files != null && message.files.length) for (var i = 0; i < message.files.length; ++i) - $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) - $root.google.cloud.speech.v2.RecognitionOutputConfig.encode(message.recognitionOutputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionOutputConfig.encode(message.recognitionOutputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.processingStrategy); return writer; @@ -37777,7 +36659,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -37869,20 +36751,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) if (!$util.isString(message.recognizer)) return "recognizer: string expected"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { + if (message.configMask != null && message.hasOwnProperty("configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; } - if (message.files != null && Object.hasOwnProperty.call(message, "files")) { + if (message.files != null && message.hasOwnProperty("files")) { if (!Array.isArray(message.files)) return "files: array expected"; for (var i = 0; i < message.files.length; ++i) { @@ -37891,12 +36773,12 @@ return "files." + error; } } - if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) { + if (message.recognitionOutputConfig != null && message.hasOwnProperty("recognitionOutputConfig")) { var error = $root.google.cloud.speech.v2.RecognitionOutputConfig.verify(message.recognitionOutputConfig, long + 1); if (error) return "recognitionOutputConfig." + error; } - if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) + if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) switch (message.processingStrategy) { default: return "processingStrategy: enum value expected"; @@ -37918,8 +36800,6 @@ BatchRecognizeRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -37928,12 +36808,12 @@ if (object.recognizer != null) message.recognizer = String(object.recognizer); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (!$util.isObject(object.configMask)) + if (typeof object.configMask !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -37942,13 +36822,13 @@ throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.files: array expected"); message.files = []; for (var i = 0; i < object.files.length; ++i) { - if (!$util.isObject(object.files[i])) + if (typeof object.files[i] !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.files: object expected"); message.files[i] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.fromObject(object.files[i], long + 1); } } if (object.recognitionOutputConfig != null) { - if (!$util.isObject(object.recognitionOutputConfig)) + if (typeof object.recognitionOutputConfig !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.recognitionOutputConfig: object expected"); message.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.fromObject(object.recognitionOutputConfig, long + 1); } @@ -37980,13 +36860,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeRequest.toObject = function toObject(message, options, q) { + BatchRecognizeRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.files = []; @@ -37997,20 +36873,20 @@ object.recognitionOutputConfig = null; object.processingStrategy = options.enums === String ? "PROCESSING_STRATEGY_UNSPECIFIED" : 0; } - if (message.recognizer != null && Object.hasOwnProperty.call(message, "recognizer")) + if (message.recognizer != null && message.hasOwnProperty("recognizer")) object.recognizer = message.recognizer; if (message.files && message.files.length) { object.files = []; for (var j = 0; j < message.files.length; ++j) - object.files[j] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.toObject(message.files[j], options, q + 1); - } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); - if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) - object.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.toObject(message.recognitionOutputConfig, options, q + 1); - if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) + object.files[j] = $root.google.cloud.speech.v2.BatchRecognizeFileMetadata.toObject(message.files[j], options); + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); + if (message.configMask != null && message.hasOwnProperty("configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); + if (message.recognitionOutputConfig != null && message.hasOwnProperty("recognitionOutputConfig")) + object.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.toObject(message.recognitionOutputConfig, options); + if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) object.processingStrategy = options.enums === String ? $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] === undefined ? message.processingStrategy : $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] : message.processingStrategy; return object; }; @@ -38111,13 +36987,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsOutputConfig.encode = function encode(message, writer, q) { + GcsOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; @@ -38133,7 +37005,7 @@ * @returns {$protobuf.Writer} Writer */ GcsOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -38203,7 +37075,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -38220,8 +37092,6 @@ GcsOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GcsOutputConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.GcsOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -38241,17 +37111,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsOutputConfig.toObject = function toObject(message, options, q) { + GcsOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.uri = ""; - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; return object; }; @@ -38329,13 +37195,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineOutputConfig.encode = function encode(message, writer, q) { + InlineOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -38349,7 +37211,7 @@ * @returns {$protobuf.Writer} Writer */ InlineOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -38429,6 +37291,10 @@ InlineOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.InlineOutputConfig) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.InlineOutputConfig(); }; @@ -38518,13 +37384,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NativeOutputFileFormatConfig.encode = function encode(message, writer, q) { + NativeOutputFileFormatConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -38538,7 +37400,7 @@ * @returns {$protobuf.Writer} Writer */ NativeOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -38618,6 +37480,10 @@ NativeOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.NativeOutputFileFormatConfig) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.NativeOutputFileFormatConfig(); }; @@ -38707,13 +37573,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VttOutputFileFormatConfig.encode = function encode(message, writer, q) { + VttOutputFileFormatConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -38727,7 +37589,7 @@ * @returns {$protobuf.Writer} Writer */ VttOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -38807,6 +37669,10 @@ VttOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.VttOutputFileFormatConfig) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.VttOutputFileFormatConfig(); }; @@ -38896,13 +37762,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SrtOutputFileFormatConfig.encode = function encode(message, writer, q) { + SrtOutputFileFormatConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -38916,7 +37778,7 @@ * @returns {$protobuf.Writer} Writer */ SrtOutputFileFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -38996,6 +37858,10 @@ SrtOutputFileFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.SrtOutputFileFormatConfig) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.cloud.speech.v2.SrtOutputFileFormatConfig(); }; @@ -39112,19 +37978,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OutputFormatConfig.encode = function encode(message, writer, q) { + OutputFormatConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.native != null && Object.hasOwnProperty.call(message, "native")) - $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.encode(message.native, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.encode(message.native, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) - $root.google.cloud.speech.v2.VttOutputFileFormatConfig.encode(message.vtt, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.VttOutputFileFormatConfig.encode(message.vtt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) - $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.encode(message.srt, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.encode(message.srt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -39138,7 +38000,7 @@ * @returns {$protobuf.Writer} Writer */ OutputFormatConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -39216,17 +38078,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.native != null && Object.hasOwnProperty.call(message, "native")) { + if (message.native != null && message.hasOwnProperty("native")) { var error = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.verify(message.native, long + 1); if (error) return "native." + error; } - if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) { + if (message.vtt != null && message.hasOwnProperty("vtt")) { var error = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.verify(message.vtt, long + 1); if (error) return "vtt." + error; } - if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) { + if (message.srt != null && message.hasOwnProperty("srt")) { var error = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.verify(message.srt, long + 1); if (error) return "srt." + error; @@ -39245,25 +38107,23 @@ OutputFormatConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.OutputFormatConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.OutputFormatConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.OutputFormatConfig(); if (object.native != null) { - if (!$util.isObject(object.native)) + if (typeof object.native !== "object") throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.native: object expected"); message.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.fromObject(object.native, long + 1); } if (object.vtt != null) { - if (!$util.isObject(object.vtt)) + if (typeof object.vtt !== "object") throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.vtt: object expected"); message.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.fromObject(object.vtt, long + 1); } if (object.srt != null) { - if (!$util.isObject(object.srt)) + if (typeof object.srt !== "object") throw TypeError(".google.cloud.speech.v2.OutputFormatConfig.srt: object expected"); message.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.fromObject(object.srt, long + 1); } @@ -39279,25 +38139,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OutputFormatConfig.toObject = function toObject(message, options, q) { + OutputFormatConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.native = null; object.vtt = null; object.srt = null; } - if (message.native != null && Object.hasOwnProperty.call(message, "native")) - object.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.toObject(message.native, options, q + 1); - if (message.vtt != null && Object.hasOwnProperty.call(message, "vtt")) - object.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.toObject(message.vtt, options, q + 1); - if (message.srt != null && Object.hasOwnProperty.call(message, "srt")) - object.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.toObject(message.srt, options, q + 1); + if (message.native != null && message.hasOwnProperty("native")) + object.native = $root.google.cloud.speech.v2.NativeOutputFileFormatConfig.toObject(message.native, options); + if (message.vtt != null && message.hasOwnProperty("vtt")) + object.vtt = $root.google.cloud.speech.v2.VttOutputFileFormatConfig.toObject(message.vtt, options); + if (message.srt != null && message.hasOwnProperty("srt")) + object.srt = $root.google.cloud.speech.v2.SrtOutputFileFormatConfig.toObject(message.srt, options); return object; }; @@ -39415,19 +38271,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecognitionOutputConfig.encode = function encode(message, writer, q) { + RecognitionOutputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) - $root.google.cloud.speech.v2.GcsOutputConfig.encode(message.gcsOutputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.GcsOutputConfig.encode(message.gcsOutputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) - $root.google.cloud.speech.v2.InlineOutputConfig.encode(message.inlineResponseConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.InlineOutputConfig.encode(message.inlineResponseConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) - $root.google.cloud.speech.v2.OutputFormatConfig.encode(message.outputFormatConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.OutputFormatConfig.encode(message.outputFormatConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -39441,7 +38293,7 @@ * @returns {$protobuf.Writer} Writer */ RecognitionOutputConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -39520,7 +38372,7 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) { + if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) { properties.output = 1; { var error = $root.google.cloud.speech.v2.GcsOutputConfig.verify(message.gcsOutputConfig, long + 1); @@ -39528,7 +38380,7 @@ return "gcsOutputConfig." + error; } } - if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) { + if (message.inlineResponseConfig != null && message.hasOwnProperty("inlineResponseConfig")) { if (properties.output === 1) return "output: multiple values"; properties.output = 1; @@ -39538,7 +38390,7 @@ return "inlineResponseConfig." + error; } } - if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) { + if (message.outputFormatConfig != null && message.hasOwnProperty("outputFormatConfig")) { var error = $root.google.cloud.speech.v2.OutputFormatConfig.verify(message.outputFormatConfig, long + 1); if (error) return "outputFormatConfig." + error; @@ -39557,25 +38409,23 @@ RecognitionOutputConfig.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.RecognitionOutputConfig) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.RecognitionOutputConfig(); if (object.gcsOutputConfig != null) { - if (!$util.isObject(object.gcsOutputConfig)) + if (typeof object.gcsOutputConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.gcsOutputConfig: object expected"); message.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.fromObject(object.gcsOutputConfig, long + 1); } if (object.inlineResponseConfig != null) { - if (!$util.isObject(object.inlineResponseConfig)) + if (typeof object.inlineResponseConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.inlineResponseConfig: object expected"); message.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.fromObject(object.inlineResponseConfig, long + 1); } if (object.outputFormatConfig != null) { - if (!$util.isObject(object.outputFormatConfig)) + if (typeof object.outputFormatConfig !== "object") throw TypeError(".google.cloud.speech.v2.RecognitionOutputConfig.outputFormatConfig: object expected"); message.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.fromObject(object.outputFormatConfig, long + 1); } @@ -39591,28 +38441,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecognitionOutputConfig.toObject = function toObject(message, options, q) { + RecognitionOutputConfig.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.outputFormatConfig = null; - if (message.gcsOutputConfig != null && Object.hasOwnProperty.call(message, "gcsOutputConfig")) { - object.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.toObject(message.gcsOutputConfig, options, q + 1); + if (message.gcsOutputConfig != null && message.hasOwnProperty("gcsOutputConfig")) { + object.gcsOutputConfig = $root.google.cloud.speech.v2.GcsOutputConfig.toObject(message.gcsOutputConfig, options); if (options.oneofs) object.output = "gcsOutputConfig"; } - if (message.inlineResponseConfig != null && Object.hasOwnProperty.call(message, "inlineResponseConfig")) { - object.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.toObject(message.inlineResponseConfig, options, q + 1); + if (message.inlineResponseConfig != null && message.hasOwnProperty("inlineResponseConfig")) { + object.inlineResponseConfig = $root.google.cloud.speech.v2.InlineOutputConfig.toObject(message.inlineResponseConfig, options); if (options.oneofs) object.output = "inlineResponseConfig"; } - if (message.outputFormatConfig != null && Object.hasOwnProperty.call(message, "outputFormatConfig")) - object.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.toObject(message.outputFormatConfig, options, q + 1); + if (message.outputFormatConfig != null && message.hasOwnProperty("outputFormatConfig")) + object.outputFormatConfig = $root.google.cloud.speech.v2.OutputFormatConfig.toObject(message.outputFormatConfig, options); return object; }; @@ -39708,20 +38554,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeResponse.encode = function encode(message, writer, q) { + BatchRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && Object.hasOwnProperty.call(message, "results")) for (var keys = Object.keys(message.results), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.BatchRecognizeFileResult.encode(message.results[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeFileResult.encode(message.results[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalBilledDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -39735,7 +38577,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -39830,7 +38672,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!$util.isObject(message.results)) return "results: object expected"; var key = Object.keys(message.results); @@ -39840,7 +38682,7 @@ return "results." + error; } } - if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) { + if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) { var error = $root.google.protobuf.Duration.verify(message.totalBilledDuration, long + 1); if (error) return "totalBilledDuration." + error; @@ -39859,27 +38701,25 @@ BatchRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeResponse(); if (object.results) { - if (!$util.isObject(object.results)) + if (typeof object.results !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.results: object expected"); message.results = {}; for (var keys = Object.keys(object.results), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.results, keys[i]); - if (!$util.isObject(object.results[keys[i]])) + if (typeof object.results[keys[i]] !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.results: object expected"); message.results[keys[i]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.fromObject(object.results[keys[i]], long + 1); } } if (object.totalBilledDuration != null) { - if (!$util.isObject(object.totalBilledDuration)) + if (typeof object.totalBilledDuration !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeResponse.totalBilledDuration: object expected"); message.totalBilledDuration = $root.google.protobuf.Duration.fromObject(object.totalBilledDuration, long + 1); } @@ -39895,13 +38735,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeResponse.toObject = function toObject(message, options, q) { + BatchRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.results = {}; @@ -39913,11 +38749,11 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.results, keys2[j]); - object.results[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.toObject(message.results[keys2[j]], options, q + 1); + object.results[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeFileResult.toObject(message.results[keys2[j]], options); } } - if (message.totalBilledDuration != null && Object.hasOwnProperty.call(message, "totalBilledDuration")) - object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options, q + 1); + if (message.totalBilledDuration != null && message.hasOwnProperty("totalBilledDuration")) + object.totalBilledDuration = $root.google.protobuf.Duration.toObject(message.totalBilledDuration, options); return object; }; @@ -40013,18 +38849,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeResults.encode = function encode(message, writer, q) { + BatchRecognizeResults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -40038,7 +38870,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeResults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -40114,7 +38946,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -40123,7 +38955,7 @@ return "results." + error; } } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -40142,8 +38974,6 @@ BatchRecognizeResults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeResults) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40154,13 +38984,13 @@ throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.SpeechRecognitionResult.fromObject(object.results[i], long + 1); } } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeResults.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -40176,13 +39006,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeResults.toObject = function toObject(message, options, q) { + BatchRecognizeResults.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -40191,10 +39017,10 @@ if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options, q + 1); + object.results[j] = $root.google.cloud.speech.v2.SpeechRecognitionResult.toObject(message.results[j], options); } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); return object; }; @@ -40298,13 +39124,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageResult.encode = function encode(message, writer, q) { + CloudStorageResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) @@ -40324,7 +39146,7 @@ * @returns {$protobuf.Writer} Writer */ CloudStorageResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -40402,13 +39224,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) + if (message.vttFormatUri != null && message.hasOwnProperty("vttFormatUri")) if (!$util.isString(message.vttFormatUri)) return "vttFormatUri: string expected"; - if (message.srtFormatUri != null && Object.hasOwnProperty.call(message, "srtFormatUri")) + if (message.srtFormatUri != null && message.hasOwnProperty("srtFormatUri")) if (!$util.isString(message.srtFormatUri)) return "srtFormatUri: string expected"; return null; @@ -40425,8 +39247,6 @@ CloudStorageResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CloudStorageResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CloudStorageResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -40450,24 +39270,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageResult.toObject = function toObject(message, options, q) { + CloudStorageResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.uri = ""; object.vttFormatUri = ""; object.srtFormatUri = ""; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; - if (message.vttFormatUri != null && Object.hasOwnProperty.call(message, "vttFormatUri")) + if (message.vttFormatUri != null && message.hasOwnProperty("vttFormatUri")) object.vttFormatUri = message.vttFormatUri; - if (message.srtFormatUri != null && Object.hasOwnProperty.call(message, "srtFormatUri")) + if (message.srtFormatUri != null && message.hasOwnProperty("srtFormatUri")) object.srtFormatUri = message.srtFormatUri; return object; }; @@ -40572,15 +39388,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InlineResult.encode = function encode(message, writer, q) { + InlineResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.vttCaptions); if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) @@ -40598,7 +39410,7 @@ * @returns {$protobuf.Writer} Writer */ InlineResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -40676,15 +39488,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) { + if (message.transcript != null && message.hasOwnProperty("transcript")) { var error = $root.google.cloud.speech.v2.BatchRecognizeResults.verify(message.transcript, long + 1); if (error) return "transcript." + error; } - if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) + if (message.vttCaptions != null && message.hasOwnProperty("vttCaptions")) if (!$util.isString(message.vttCaptions)) return "vttCaptions: string expected"; - if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) + if (message.srtCaptions != null && message.hasOwnProperty("srtCaptions")) if (!$util.isString(message.srtCaptions)) return "srtCaptions: string expected"; return null; @@ -40701,15 +39513,13 @@ InlineResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.InlineResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.InlineResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.InlineResult(); if (object.transcript != null) { - if (!$util.isObject(object.transcript)) + if (typeof object.transcript !== "object") throw TypeError(".google.cloud.speech.v2.InlineResult.transcript: object expected"); message.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.fromObject(object.transcript, long + 1); } @@ -40729,24 +39539,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InlineResult.toObject = function toObject(message, options, q) { + InlineResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.transcript = null; object.vttCaptions = ""; object.srtCaptions = ""; } - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options, q + 1); - if (message.vttCaptions != null && Object.hasOwnProperty.call(message, "vttCaptions")) + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options); + if (message.vttCaptions != null && message.hasOwnProperty("vttCaptions")) object.vttCaptions = message.vttCaptions; - if (message.srtCaptions != null && Object.hasOwnProperty.call(message, "srtCaptions")) + if (message.srtCaptions != null && message.hasOwnProperty("srtCaptions")) object.srtCaptions = message.srtCaptions; return object; }; @@ -40892,25 +39698,21 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeFileResult.encode = function encode(message, writer, q) { + BatchRecognizeFileResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeResults.encode(message.transcript, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) - $root.google.cloud.speech.v2.CloudStorageResult.encode(message.cloudStorageResult, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CloudStorageResult.encode(message.cloudStorageResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) - $root.google.cloud.speech.v2.InlineResult.encode(message.inlineResult, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.InlineResult.encode(message.inlineResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -40924,7 +39726,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeFileResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -41015,17 +39817,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (message.error != null && message.hasOwnProperty("error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) { + if (message.cloudStorageResult != null && message.hasOwnProperty("cloudStorageResult")) { properties.result = 1; { var error = $root.google.cloud.speech.v2.CloudStorageResult.verify(message.cloudStorageResult, long + 1); @@ -41033,7 +39835,7 @@ return "cloudStorageResult." + error; } } - if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) { + if (message.inlineResult != null && message.hasOwnProperty("inlineResult")) { if (properties.result === 1) return "result: multiple values"; properties.result = 1; @@ -41043,10 +39845,10 @@ return "inlineResult." + error; } } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) { + if (message.transcript != null && message.hasOwnProperty("transcript")) { var error = $root.google.cloud.speech.v2.BatchRecognizeResults.verify(message.transcript, long + 1); if (error) return "transcript." + error; @@ -41065,37 +39867,35 @@ BatchRecognizeFileResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeFileResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeFileResult(); if (object.error != null) { - if (!$util.isObject(object.error)) + if (typeof object.error !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } if (object.cloudStorageResult != null) { - if (!$util.isObject(object.cloudStorageResult)) + if (typeof object.cloudStorageResult !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.cloudStorageResult: object expected"); message.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.fromObject(object.cloudStorageResult, long + 1); } if (object.inlineResult != null) { - if (!$util.isObject(object.inlineResult)) + if (typeof object.inlineResult !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.inlineResult: object expected"); message.inlineResult = $root.google.cloud.speech.v2.InlineResult.fromObject(object.inlineResult, long + 1); } if (object.uri != null) message.uri = String(object.uri); if (object.transcript != null) { - if (!$util.isObject(object.transcript)) + if (typeof object.transcript !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileResult.transcript: object expected"); message.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.fromObject(object.transcript, long + 1); } @@ -41111,13 +39911,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeFileResult.toObject = function toObject(message, options, q) { + BatchRecognizeFileResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.uri = ""; @@ -41125,21 +39921,21 @@ object.metadata = null; object.transcript = null; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options, q + 1); - if (message.cloudStorageResult != null && Object.hasOwnProperty.call(message, "cloudStorageResult")) { - object.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.toObject(message.cloudStorageResult, options, q + 1); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = $root.google.cloud.speech.v2.BatchRecognizeResults.toObject(message.transcript, options); + if (message.cloudStorageResult != null && message.hasOwnProperty("cloudStorageResult")) { + object.cloudStorageResult = $root.google.cloud.speech.v2.CloudStorageResult.toObject(message.cloudStorageResult, options); if (options.oneofs) object.result = "cloudStorageResult"; } - if (message.inlineResult != null && Object.hasOwnProperty.call(message, "inlineResult")) { - object.inlineResult = $root.google.cloud.speech.v2.InlineResult.toObject(message.inlineResult, options, q + 1); + if (message.inlineResult != null && message.hasOwnProperty("inlineResult")) { + object.inlineResult = $root.google.cloud.speech.v2.InlineResult.toObject(message.inlineResult, options); if (options.oneofs) object.result = "inlineResult"; } @@ -41246,17 +40042,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeTranscriptionMetadata.encode = function encode(message, writer, q) { + BatchRecognizeTranscriptionMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.progressPercent); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); return writer; @@ -41272,7 +40064,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeTranscriptionMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -41350,15 +40142,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) if (!$util.isInteger(message.progressPercent)) return "progressPercent: integer expected"; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (message.error != null && message.hasOwnProperty("error")) { var error = $root.google.rpc.Status.verify(message.error, long + 1); if (error) return "error." + error; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; return null; @@ -41375,8 +40167,6 @@ BatchRecognizeTranscriptionMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41385,7 +40175,7 @@ if (object.progressPercent != null) message.progressPercent = object.progressPercent | 0; if (object.error != null) { - if (!$util.isObject(object.error)) + if (typeof object.error !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } @@ -41403,24 +40193,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeTranscriptionMetadata.toObject = function toObject(message, options, q) { + BatchRecognizeTranscriptionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.progressPercent = 0; object.error = null; object.uri = ""; } - if (message.progressPercent != null && Object.hasOwnProperty.call(message, "progressPercent")) + if (message.progressPercent != null && message.hasOwnProperty("progressPercent")) object.progressPercent = message.progressPercent; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; return object; }; @@ -41508,17 +40294,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeMetadata.encode = function encode(message, writer, q) { + BatchRecognizeMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.transcriptionMetadata != null && Object.hasOwnProperty.call(message, "transcriptionMetadata")) for (var keys = Object.keys(message.transcriptionMetadata), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.encode(message.transcriptionMetadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.encode(message.transcriptionMetadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } return writer; }; @@ -41533,7 +40315,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -41624,7 +40406,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.transcriptionMetadata != null && Object.hasOwnProperty.call(message, "transcriptionMetadata")) { + if (message.transcriptionMetadata != null && message.hasOwnProperty("transcriptionMetadata")) { if (!$util.isObject(message.transcriptionMetadata)) return "transcriptionMetadata: object expected"; var key = Object.keys(message.transcriptionMetadata); @@ -41648,21 +40430,19 @@ BatchRecognizeMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.BatchRecognizeMetadata(); if (object.transcriptionMetadata) { - if (!$util.isObject(object.transcriptionMetadata)) + if (typeof object.transcriptionMetadata !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata.transcriptionMetadata: object expected"); message.transcriptionMetadata = {}; for (var keys = Object.keys(object.transcriptionMetadata), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.transcriptionMetadata, keys[i]); - if (!$util.isObject(object.transcriptionMetadata[keys[i]])) + if (typeof object.transcriptionMetadata[keys[i]] !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeMetadata.transcriptionMetadata: object expected"); message.transcriptionMetadata[keys[i]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.fromObject(object.transcriptionMetadata[keys[i]], long + 1); } @@ -41679,13 +40459,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeMetadata.toObject = function toObject(message, options, q) { + BatchRecognizeMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.transcriptionMetadata = {}; @@ -41695,7 +40471,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.transcriptionMetadata, keys2[j]); - object.transcriptionMetadata[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.toObject(message.transcriptionMetadata[keys2[j]], options, q + 1); + object.transcriptionMetadata[keys2[j]] = $root.google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata.toObject(message.transcriptionMetadata[keys2[j]], options); } } return object; @@ -41815,19 +40591,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BatchRecognizeFileMetadata.encode = function encode(message, writer, q) { + BatchRecognizeFileMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -41841,7 +40613,7 @@ * @returns {$protobuf.Writer} Writer */ BatchRecognizeFileMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -41920,17 +40692,17 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { properties.audioSource = 1; if (!$util.isString(message.uri)) return "uri: string expected"; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v2.RecognitionConfig.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) { + if (message.configMask != null && message.hasOwnProperty("configMask")) { var error = $root.google.protobuf.FieldMask.verify(message.configMask, long + 1); if (error) return "configMask." + error; @@ -41949,8 +40721,6 @@ BatchRecognizeFileMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.BatchRecognizeFileMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -41959,12 +40729,12 @@ if (object.uri != null) message.uri = String(object.uri); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata.config: object expected"); message.config = $root.google.cloud.speech.v2.RecognitionConfig.fromObject(object.config, long + 1); } if (object.configMask != null) { - if (!$util.isObject(object.configMask)) + if (typeof object.configMask !== "object") throw TypeError(".google.cloud.speech.v2.BatchRecognizeFileMetadata.configMask: object expected"); message.configMask = $root.google.protobuf.FieldMask.fromObject(object.configMask, long + 1); } @@ -41980,27 +40750,23 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchRecognizeFileMetadata.toObject = function toObject(message, options, q) { + BatchRecognizeFileMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.configMask = null; } - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) { + if (message.uri != null && message.hasOwnProperty("uri")) { object.uri = message.uri; if (options.oneofs) object.audioSource = "uri"; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options, q + 1); - if (message.configMask != null && Object.hasOwnProperty.call(message, "configMask")) - object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v2.RecognitionConfig.toObject(message.config, options); + if (message.configMask != null && message.hasOwnProperty("configMask")) + object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); return object; }; @@ -42132,22 +40898,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognitionResult.encode = function encode(message, writer, q) { + StreamingRecognitionResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.alternatives != null && message.alternatives.length) for (var i = 0; i < message.alternatives.length; ++i) - $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.SpeechRecognitionAlternative.encode(message.alternatives[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isFinal); if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.stability); if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.resultEndOffset, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) @@ -42165,7 +40927,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -42257,7 +41019,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.alternatives != null && Object.hasOwnProperty.call(message, "alternatives")) { + if (message.alternatives != null && message.hasOwnProperty("alternatives")) { if (!Array.isArray(message.alternatives)) return "alternatives: array expected"; for (var i = 0; i < message.alternatives.length; ++i) { @@ -42266,21 +41028,21 @@ return "alternatives." + error; } } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) if (typeof message.isFinal !== "boolean") return "isFinal: boolean expected"; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) if (typeof message.stability !== "number") return "stability: number expected"; - if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) { + if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) { var error = $root.google.protobuf.Duration.verify(message.resultEndOffset, long + 1); if (error) return "resultEndOffset." + error; } - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; return null; @@ -42297,8 +41059,6 @@ StreamingRecognitionResult.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognitionResult) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42309,7 +41069,7 @@ throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.alternatives: array expected"); message.alternatives = []; for (var i = 0; i < object.alternatives.length; ++i) { - if (!$util.isObject(object.alternatives[i])) + if (typeof object.alternatives[i] !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.alternatives: object expected"); message.alternatives[i] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.fromObject(object.alternatives[i], long + 1); } @@ -42319,7 +41079,7 @@ if (object.stability != null) message.stability = Number(object.stability); if (object.resultEndOffset != null) { - if (!$util.isObject(object.resultEndOffset)) + if (typeof object.resultEndOffset !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognitionResult.resultEndOffset: object expected"); message.resultEndOffset = $root.google.protobuf.Duration.fromObject(object.resultEndOffset, long + 1); } @@ -42339,13 +41099,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognitionResult.toObject = function toObject(message, options, q) { + StreamingRecognitionResult.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.alternatives = []; @@ -42359,17 +41115,17 @@ if (message.alternatives && message.alternatives.length) { object.alternatives = []; for (var j = 0; j < message.alternatives.length; ++j) - object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options, q + 1); + object.alternatives[j] = $root.google.cloud.speech.v2.SpeechRecognitionAlternative.toObject(message.alternatives[j], options); } - if (message.isFinal != null && Object.hasOwnProperty.call(message, "isFinal")) + if (message.isFinal != null && message.hasOwnProperty("isFinal")) object.isFinal = message.isFinal; - if (message.stability != null && Object.hasOwnProperty.call(message, "stability")) + if (message.stability != null && message.hasOwnProperty("stability")) object.stability = options.json && !isFinite(message.stability) ? String(message.stability) : message.stability; - if (message.resultEndOffset != null && Object.hasOwnProperty.call(message, "resultEndOffset")) - object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options, q + 1); - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + if (message.resultEndOffset != null && message.hasOwnProperty("resultEndOffset")) + object.resultEndOffset = $root.google.protobuf.Duration.toObject(message.resultEndOffset, options); + if (message.channelTag != null && message.hasOwnProperty("channelTag")) object.channelTag = message.channelTag; - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; return object; }; @@ -42484,22 +41240,18 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamingRecognizeResponse.encode = function encode(message, writer, q) { + StreamingRecognizeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.speechEventType); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.RecognitionResponseMetadata.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.results != null && message.results.length) for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.speech.v2.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.StreamingRecognitionResult.encode(message.results[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) - $root.google.protobuf.Duration.encode(message.speechEventOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.speechEventOffset, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -42513,7 +41265,7 @@ * @returns {$protobuf.Writer} Writer */ StreamingRecognizeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -42597,7 +41349,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.results != null && Object.hasOwnProperty.call(message, "results")) { + if (message.results != null && message.hasOwnProperty("results")) { if (!Array.isArray(message.results)) return "results: array expected"; for (var i = 0; i < message.results.length; ++i) { @@ -42606,7 +41358,7 @@ return "results." + error; } } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) switch (message.speechEventType) { default: return "speechEventType: enum value expected"; @@ -42616,12 +41368,12 @@ case 3: break; } - if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) { + if (message.speechEventOffset != null && message.hasOwnProperty("speechEventOffset")) { var error = $root.google.protobuf.Duration.verify(message.speechEventOffset, long + 1); if (error) return "speechEventOffset." + error; } - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.cloud.speech.v2.RecognitionResponseMetadata.verify(message.metadata, long + 1); if (error) return "metadata." + error; @@ -42640,8 +41392,6 @@ StreamingRecognizeResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.StreamingRecognizeResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42652,7 +41402,7 @@ throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.results: array expected"); message.results = []; for (var i = 0; i < object.results.length; ++i) { - if (!$util.isObject(object.results[i])) + if (typeof object.results[i] !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.results: object expected"); message.results[i] = $root.google.cloud.speech.v2.StreamingRecognitionResult.fromObject(object.results[i], long + 1); } @@ -42682,12 +41432,12 @@ break; } if (object.speechEventOffset != null) { - if (!$util.isObject(object.speechEventOffset)) + if (typeof object.speechEventOffset !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.speechEventOffset: object expected"); message.speechEventOffset = $root.google.protobuf.Duration.fromObject(object.speechEventOffset, long + 1); } if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.cloud.speech.v2.StreamingRecognizeResponse.metadata: object expected"); message.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.fromObject(object.metadata, long + 1); } @@ -42703,13 +41453,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamingRecognizeResponse.toObject = function toObject(message, options, q) { + StreamingRecognizeResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.results = []; @@ -42718,17 +41464,17 @@ object.metadata = null; object.speechEventOffset = null; } - if (message.speechEventType != null && Object.hasOwnProperty.call(message, "speechEventType")) + if (message.speechEventType != null && message.hasOwnProperty("speechEventType")) object.speechEventType = options.enums === String ? $root.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] === undefined ? message.speechEventType : $root.google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType[message.speechEventType] : message.speechEventType; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options, q + 1); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.speech.v2.RecognitionResponseMetadata.toObject(message.metadata, options); if (message.results && message.results.length) { object.results = []; for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.speech.v2.StreamingRecognitionResult.toObject(message.results[j], options, q + 1); + object.results[j] = $root.google.cloud.speech.v2.StreamingRecognitionResult.toObject(message.results[j], options); } - if (message.speechEventOffset != null && Object.hasOwnProperty.call(message, "speechEventOffset")) - object.speechEventOffset = $root.google.protobuf.Duration.toObject(message.speechEventOffset, options, q + 1); + if (message.speechEventOffset != null && message.hasOwnProperty("speechEventOffset")) + object.speechEventOffset = $root.google.protobuf.Duration.toObject(message.speechEventOffset, options); return object; }; @@ -42850,19 +41596,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Config.encode = function encode(message, writer, q) { + Config.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -42876,7 +41618,7 @@ * @returns {$protobuf.Writer} Writer */ Config.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -42954,13 +41696,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; @@ -42979,8 +41721,6 @@ Config.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.Config) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.Config: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -42991,7 +41731,7 @@ if (object.kmsKeyName != null) message.kmsKeyName = String(object.kmsKeyName); if (object.updateTime != null) { - if (!$util.isObject(object.updateTime)) + if (typeof object.updateTime !== "object") throw TypeError(".google.cloud.speech.v2.Config.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } @@ -43007,25 +41747,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Config.toObject = function toObject(message, options, q) { + Config.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.kmsKeyName = ""; object.updateTime = null; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; @@ -43111,13 +41847,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConfigRequest.encode = function encode(message, writer, q) { + GetConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -43133,7 +41865,7 @@ * @returns {$protobuf.Writer} Writer */ GetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -43203,7 +41935,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -43220,8 +41952,6 @@ GetConfigRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetConfigRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.GetConfigRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -43241,17 +41971,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConfigRequest.toObject = function toObject(message, options, q) { + GetConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -43347,17 +42073,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConfigRequest.encode = function encode(message, writer, q) { + UpdateConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.speech.v2.Config.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.Config.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -43371,7 +42093,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -43445,12 +42167,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.config != null && Object.hasOwnProperty.call(message, "config")) { + if (message.config != null && message.hasOwnProperty("config")) { var error = $root.google.cloud.speech.v2.Config.verify(message.config, long + 1); if (error) return "config." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; @@ -43469,20 +42191,18 @@ UpdateConfigRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateConfigRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateConfigRequest(); if (object.config != null) { - if (!$util.isObject(object.config)) + if (typeof object.config !== "object") throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest.config: object expected"); message.config = $root.google.cloud.speech.v2.Config.fromObject(object.config, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v2.UpdateConfigRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -43498,22 +42218,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateConfigRequest.toObject = function toObject(message, options, q) { + UpdateConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.config = null; object.updateMask = null; } - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - object.config = $root.google.cloud.speech.v2.Config.toObject(message.config, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.speech.v2.Config.toObject(message.config, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; @@ -43718,13 +42434,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomClass.encode = function encode(message, writer, q) { + CustomClass.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) @@ -43733,15 +42445,15 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.speech.v2.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomClass.ClassItem.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -43768,7 +42480,7 @@ * @returns {$protobuf.Writer} Writer */ CustomClass.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -43913,16 +42625,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.items != null && Object.hasOwnProperty.call(message, "items")) { + if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { @@ -43931,7 +42643,7 @@ return "items." + error; } } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: return "state: enum value expected"; @@ -43940,27 +42652,27 @@ case 4: break; } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { + if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -43968,16 +42680,16 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -43994,8 +42706,6 @@ CustomClass.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomClass) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CustomClass: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44012,7 +42722,7 @@ throw TypeError(".google.cloud.speech.v2.CustomClass.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { - if (!$util.isObject(object.items[i])) + if (typeof object.items[i] !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.items: object expected"); message.items[i] = $root.google.cloud.speech.v2.CustomClass.ClassItem.fromObject(object.items[i], long + 1); } @@ -44038,27 +42748,27 @@ break; } if (object.createTime != null) { - if (!$util.isObject(object.createTime)) + if (typeof object.createTime !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (!$util.isObject(object.updateTime)) + if (typeof object.updateTime !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (!$util.isObject(object.deleteTime)) + if (typeof object.deleteTime !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) + if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (!$util.isObject(object.annotations)) + if (typeof object.annotations !== "object") throw TypeError(".google.cloud.speech.v2.CustomClass.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -44087,13 +42797,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomClass.toObject = function toObject(message, options, q) { + CustomClass.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.items = []; @@ -44113,25 +42819,25 @@ object.kmsKeyVersionName = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.speech.v2.CustomClass.ClassItem.toObject(message.items[j], options, q + 1); - } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + object.items[j] = $root.google.cloud.speech.v2.CustomClass.ClassItem.toObject(message.items[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -44141,15 +42847,15 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.CustomClass.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.CustomClass.State[message.state] : message.state; return object; }; @@ -44233,13 +42939,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClassItem.encode = function encode(message, writer, q) { + ClassItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -44255,7 +42957,7 @@ * @returns {$protobuf.Writer} Writer */ ClassItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -44325,7 +43027,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -44342,8 +43044,6 @@ ClassItem.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CustomClass.ClassItem) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CustomClass.ClassItem: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44363,17 +43063,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClassItem.toObject = function toObject(message, options, q) { + ClassItem.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -44607,32 +43303,28 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseSet.encode = function encode(message, writer, q) { + PhraseSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); if (message.phrases != null && message.phrases.length) for (var i = 0; i < message.phrases.length; ++i) - $root.google.cloud.speech.v2.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.Phrase.encode(message.phrases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.boost); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); @@ -44659,7 +43351,7 @@ * @returns {$protobuf.Writer} Writer */ PhraseSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -44808,13 +43500,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; - if (message.phrases != null && Object.hasOwnProperty.call(message, "phrases")) { + if (message.phrases != null && message.hasOwnProperty("phrases")) { if (!Array.isArray(message.phrases)) return "phrases: array expected"; for (var i = 0; i < message.phrases.length; ++i) { @@ -44823,13 +43515,13 @@ return "phrases." + error; } } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: return "state: enum value expected"; @@ -44838,27 +43530,27 @@ case 4: break; } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) { + if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); if (error) return "createTime." + error; } - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) { + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); if (error) return "updateTime." + error; } - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) { + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { var error = $root.google.protobuf.Timestamp.verify(message.deleteTime, long + 1); if (error) return "deleteTime." + error; } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); if (error) return "expireTime." + error; } - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) { + if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; var key = Object.keys(message.annotations); @@ -44866,16 +43558,16 @@ if (!$util.isString(message.annotations[key[i]])) return "annotations: string{k:string} expected"; } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) if (!$util.isString(message.kmsKeyName)) return "kmsKeyName: string expected"; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) if (!$util.isString(message.kmsKeyVersionName)) return "kmsKeyVersionName: string expected"; return null; @@ -44892,8 +43584,6 @@ PhraseSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.PhraseSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.PhraseSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -44908,7 +43598,7 @@ throw TypeError(".google.cloud.speech.v2.PhraseSet.phrases: array expected"); message.phrases = []; for (var i = 0; i < object.phrases.length; ++i) { - if (!$util.isObject(object.phrases[i])) + if (typeof object.phrases[i] !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.phrases: object expected"); message.phrases[i] = $root.google.cloud.speech.v2.PhraseSet.Phrase.fromObject(object.phrases[i], long + 1); } @@ -44938,27 +43628,27 @@ break; } if (object.createTime != null) { - if (!$util.isObject(object.createTime)) + if (typeof object.createTime !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); } if (object.updateTime != null) { - if (!$util.isObject(object.updateTime)) + if (typeof object.updateTime !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); } if (object.deleteTime != null) { - if (!$util.isObject(object.deleteTime)) + if (typeof object.deleteTime !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime, long + 1); } if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) + if (typeof object.expireTime !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); } if (object.annotations) { - if (!$util.isObject(object.annotations)) + if (typeof object.annotations !== "object") throw TypeError(".google.cloud.speech.v2.PhraseSet.annotations: object expected"); message.annotations = {}; for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) { @@ -44987,13 +43677,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseSet.toObject = function toObject(message, options, q) { + PhraseSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phrases = []; @@ -45014,27 +43700,27 @@ object.kmsKeyVersionName = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; if (message.phrases && message.phrases.length) { object.phrases = []; for (var j = 0; j < message.phrases.length; ++j) - object.phrases[j] = $root.google.cloud.speech.v2.PhraseSet.Phrase.toObject(message.phrases[j], options, q + 1); + object.phrases[j] = $root.google.cloud.speech.v2.PhraseSet.Phrase.toObject(message.phrases[j], options); } - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options, q + 1); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options, q + 1); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options, q + 1); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); var keys2; if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { object.annotations = {}; @@ -45044,15 +43730,15 @@ object.annotations[keys2[j]] = message.annotations[keys2[j]]; } } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) object.kmsKeyName = message.kmsKeyName; - if (message.kmsKeyVersionName != null && Object.hasOwnProperty.call(message, "kmsKeyVersionName")) + if (message.kmsKeyVersionName != null && message.hasOwnProperty("kmsKeyVersionName")) object.kmsKeyVersionName = message.kmsKeyVersionName; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) + if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.speech.v2.PhraseSet.State[message.state] === undefined ? message.state : $root.google.cloud.speech.v2.PhraseSet.State[message.state] : message.state; return object; }; @@ -45145,13 +43831,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phrase.encode = function encode(message, writer, q) { + Phrase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) @@ -45169,7 +43851,7 @@ * @returns {$protobuf.Writer} Writer */ Phrase.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -45243,10 +43925,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) if (typeof message.boost !== "number") return "boost: number expected"; return null; @@ -45263,8 +43945,6 @@ Phrase.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.PhraseSet.Phrase) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.PhraseSet.Phrase: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45286,21 +43966,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phrase.toObject = function toObject(message, options, q) { + Phrase.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.boost = 0; } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; - if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + if (message.boost != null && message.hasOwnProperty("boost")) object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; return object; }; @@ -45433,15 +44109,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCustomClassRequest.encode = function encode(message, writer, q) { + CreateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) @@ -45461,7 +44133,7 @@ * @returns {$protobuf.Writer} Writer */ CreateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -45543,18 +44215,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v2.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) if (!$util.isString(message.customClassId)) return "customClassId: string expected"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -45571,15 +44243,13 @@ CreateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CreateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreateCustomClassRequest(); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v2.CreateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClass, long + 1); } @@ -45601,13 +44271,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCustomClassRequest.toObject = function toObject(message, options, q) { + CreateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; @@ -45615,13 +44281,13 @@ object.customClassId = ""; object.parent = ""; } - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.customClassId != null && Object.hasOwnProperty.call(message, "customClassId")) + if (message.customClassId != null && message.hasOwnProperty("customClassId")) object.customClassId = message.customClassId; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; return object; }; @@ -45735,13 +44401,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesRequest.encode = function encode(message, writer, q) { + ListCustomClassesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -45763,7 +44425,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -45845,16 +44507,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -45871,8 +44533,6 @@ ListCustomClassesRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListCustomClassesRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListCustomClassesRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -45898,13 +44558,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesRequest.toObject = function toObject(message, options, q) { + ListCustomClassesRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -45912,13 +44568,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -46015,16 +44671,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListCustomClassesResponse.encode = function encode(message, writer, q) { + ListCustomClassesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClasses != null && message.customClasses.length) for (var i = 0; i < message.customClasses.length; ++i) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClasses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -46040,7 +44692,7 @@ * @returns {$protobuf.Writer} Writer */ ListCustomClassesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -46116,7 +44768,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClasses != null && Object.hasOwnProperty.call(message, "customClasses")) { + if (message.customClasses != null && message.hasOwnProperty("customClasses")) { if (!Array.isArray(message.customClasses)) return "customClasses: array expected"; for (var i = 0; i < message.customClasses.length; ++i) { @@ -46125,7 +44777,7 @@ return "customClasses." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -46142,8 +44794,6 @@ ListCustomClassesResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListCustomClassesResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46154,7 +44804,7 @@ throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse.customClasses: array expected"); message.customClasses = []; for (var i = 0; i < object.customClasses.length; ++i) { - if (!$util.isObject(object.customClasses[i])) + if (typeof object.customClasses[i] !== "object") throw TypeError(".google.cloud.speech.v2.ListCustomClassesResponse.customClasses: object expected"); message.customClasses[i] = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClasses[i], long + 1); } @@ -46173,13 +44823,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListCustomClassesResponse.toObject = function toObject(message, options, q) { + ListCustomClassesResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.customClasses = []; @@ -46188,9 +44834,9 @@ if (message.customClasses && message.customClasses.length) { object.customClasses = []; for (var j = 0; j < message.customClasses.length; ++j) - object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options, q + 1); + object.customClasses[j] = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClasses[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -46277,13 +44923,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetCustomClassRequest.encode = function encode(message, writer, q) { + GetCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -46299,7 +44941,7 @@ * @returns {$protobuf.Writer} Writer */ GetCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -46369,7 +45011,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -46386,8 +45028,6 @@ GetCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.GetCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46407,17 +45047,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetCustomClassRequest.toObject = function toObject(message, options, q) { + GetCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -46522,17 +45158,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateCustomClassRequest.encode = function encode(message, writer, q) { + UpdateCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.CustomClass.encode(message.customClass, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -46548,7 +45180,7 @@ * @returns {$protobuf.Writer} Writer */ UpdateCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -46626,17 +45258,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) { + if (message.customClass != null && message.hasOwnProperty("customClass")) { var error = $root.google.cloud.speech.v2.CustomClass.verify(message.customClass, long + 1); if (error) return "customClass." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -46653,20 +45285,18 @@ UpdateCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdateCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdateCustomClassRequest(); if (object.customClass != null) { - if (!$util.isObject(object.customClass)) + if (typeof object.customClass !== "object") throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest.customClass: object expected"); message.customClass = $root.google.cloud.speech.v2.CustomClass.fromObject(object.customClass, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v2.UpdateCustomClassRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -46684,24 +45314,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateCustomClassRequest.toObject = function toObject(message, options, q) { + UpdateCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.customClass = null; object.updateMask = null; object.validateOnly = false; } - if (message.customClass != null && Object.hasOwnProperty.call(message, "customClass")) - object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.customClass != null && message.hasOwnProperty("customClass")) + object.customClass = $root.google.cloud.speech.v2.CustomClass.toObject(message.customClass, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -46815,13 +45441,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteCustomClassRequest.encode = function encode(message, writer, q) { + DeleteCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -46843,7 +45465,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -46925,16 +45547,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -46951,8 +45573,6 @@ DeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeleteCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.DeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -46978,13 +45598,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteCustomClassRequest.toObject = function toObject(message, options, q) { + DeleteCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -46992,13 +45608,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -47103,13 +45719,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeleteCustomClassRequest.encode = function encode(message, writer, q) { + UndeleteCustomClassRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -47129,7 +45741,7 @@ * @returns {$protobuf.Writer} Writer */ UndeleteCustomClassRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -47207,13 +45819,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -47230,8 +45842,6 @@ UndeleteCustomClassRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeleteCustomClassRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UndeleteCustomClassRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47255,24 +45865,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeleteCustomClassRequest.toObject = function toObject(message, options, q) { + UndeleteCustomClassRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; }; @@ -47386,15 +45992,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseSetRequest.encode = function encode(message, writer, q) { + CreatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) @@ -47414,7 +46016,7 @@ * @returns {$protobuf.Writer} Writer */ CreatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -47496,18 +46098,18 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v2.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) if (!$util.isString(message.phraseSetId)) return "phraseSetId: string expected"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; return null; @@ -47524,15 +46126,13 @@ CreatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.CreatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.CreatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.CreatePhraseSetRequest(); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v2.CreatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSet, long + 1); } @@ -47554,13 +46154,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseSetRequest.toObject = function toObject(message, options, q) { + CreatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; @@ -47568,13 +46164,13 @@ object.phraseSetId = ""; object.parent = ""; } - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.phraseSetId != null && Object.hasOwnProperty.call(message, "phraseSetId")) + if (message.phraseSetId != null && message.hasOwnProperty("phraseSetId")) object.phraseSetId = message.phraseSetId; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; return object; }; @@ -47688,13 +46284,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetsRequest.encode = function encode(message, writer, q) { + ListPhraseSetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -47716,7 +46308,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -47798,16 +46390,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) if (typeof message.showDeleted !== "boolean") return "showDeleted: boolean expected"; return null; @@ -47824,8 +46416,6 @@ ListPhraseSetsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListPhraseSetsRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListPhraseSetsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -47851,13 +46441,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetsRequest.toObject = function toObject(message, options, q) { + ListPhraseSetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.parent = ""; @@ -47865,13 +46451,13 @@ object.pageToken = ""; object.showDeleted = false; } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) object.showDeleted = message.showDeleted; return object; }; @@ -47968,16 +46554,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseSetsResponse.encode = function encode(message, writer, q) { + ListPhraseSetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSets != null && message.phraseSets.length) for (var i = 0; i < message.phraseSets.length; ++i) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -47993,7 +46575,7 @@ * @returns {$protobuf.Writer} Writer */ ListPhraseSetsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -48069,7 +46651,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSets != null && Object.hasOwnProperty.call(message, "phraseSets")) { + if (message.phraseSets != null && message.hasOwnProperty("phraseSets")) { if (!Array.isArray(message.phraseSets)) return "phraseSets: array expected"; for (var i = 0; i < message.phraseSets.length; ++i) { @@ -48078,7 +46660,7 @@ return "phraseSets." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -48095,8 +46677,6 @@ ListPhraseSetsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ListPhraseSetsResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48107,7 +46687,7 @@ throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse.phraseSets: array expected"); message.phraseSets = []; for (var i = 0; i < object.phraseSets.length; ++i) { - if (!$util.isObject(object.phraseSets[i])) + if (typeof object.phraseSets[i] !== "object") throw TypeError(".google.cloud.speech.v2.ListPhraseSetsResponse.phraseSets: object expected"); message.phraseSets[i] = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSets[i], long + 1); } @@ -48126,13 +46706,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseSetsResponse.toObject = function toObject(message, options, q) { + ListPhraseSetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.phraseSets = []; @@ -48141,9 +46717,9 @@ if (message.phraseSets && message.phraseSets.length) { object.phraseSets = []; for (var j = 0; j < message.phraseSets.length; ++j) - object.phraseSets[j] = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSets[j], options, q + 1); + object.phraseSets[j] = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSets[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -48230,13 +46806,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseSetRequest.encode = function encode(message, writer, q) { + GetPhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -48252,7 +46824,7 @@ * @returns {$protobuf.Writer} Writer */ GetPhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -48322,7 +46894,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -48339,8 +46911,6 @@ GetPhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.GetPhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.GetPhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48360,17 +46930,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseSetRequest.toObject = function toObject(message, options, q) { + GetPhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -48475,17 +47041,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseSetRequest.encode = function encode(message, writer, q) { + UpdatePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.PhraseSet.encode(message.phraseSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; @@ -48501,7 +47063,7 @@ * @returns {$protobuf.Writer} Writer */ UpdatePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -48579,17 +47141,17 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) { + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) { var error = $root.google.cloud.speech.v2.PhraseSet.verify(message.phraseSet, long + 1); if (error) return "phraseSet." + error; } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); if (error) return "updateMask." + error; } - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; return null; @@ -48606,20 +47168,18 @@ UpdatePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UpdatePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.UpdatePhraseSetRequest(); if (object.phraseSet != null) { - if (!$util.isObject(object.phraseSet)) + if (typeof object.phraseSet !== "object") throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest.phraseSet: object expected"); message.phraseSet = $root.google.cloud.speech.v2.PhraseSet.fromObject(object.phraseSet, long + 1); } if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) + if (typeof object.updateMask !== "object") throw TypeError(".google.cloud.speech.v2.UpdatePhraseSetRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); } @@ -48637,24 +47197,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseSetRequest.toObject = function toObject(message, options, q) { + UpdatePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.phraseSet = null; object.updateMask = null; object.validateOnly = false; } - if (message.phraseSet != null && Object.hasOwnProperty.call(message, "phraseSet")) - object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.phraseSet != null && message.hasOwnProperty("phraseSet")) + object.phraseSet = $root.google.cloud.speech.v2.PhraseSet.toObject(message.phraseSet, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; return object; }; @@ -48768,13 +47324,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseSetRequest.encode = function encode(message, writer, q) { + DeletePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -48796,7 +47348,7 @@ * @returns {$protobuf.Writer} Writer */ DeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -48878,16 +47430,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -48904,8 +47456,6 @@ DeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.DeletePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.DeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -48931,13 +47481,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseSetRequest.toObject = function toObject(message, options, q) { + DeletePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -48945,13 +47491,13 @@ object.etag = ""; object.allowMissing = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) object.allowMissing = message.allowMissing; return object; }; @@ -49056,13 +47602,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeletePhraseSetRequest.encode = function encode(message, writer, q) { + UndeletePhraseSetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) @@ -49082,7 +47624,7 @@ * @returns {$protobuf.Writer} Writer */ UndeletePhraseSetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -49160,13 +47702,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) if (typeof message.validateOnly !== "boolean") return "validateOnly: boolean expected"; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; return null; @@ -49183,8 +47725,6 @@ UndeletePhraseSetRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.UndeletePhraseSetRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.UndeletePhraseSetRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49208,24 +47748,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeletePhraseSetRequest.toObject = function toObject(message, options, q) { + UndeletePhraseSetRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.validateOnly = false; object.etag = ""; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) object.validateOnly = message.validateOnly; - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; }; @@ -49321,13 +47857,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelFeature.encode = function encode(message, writer, q) { + ModelFeature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.feature); if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) @@ -49345,7 +47877,7 @@ * @returns {$protobuf.Writer} Writer */ ModelFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -49419,10 +47951,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) + if (message.feature != null && message.hasOwnProperty("feature")) if (!$util.isString(message.feature)) return "feature: string expected"; - if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) + if (message.releaseState != null && message.hasOwnProperty("releaseState")) if (!$util.isString(message.releaseState)) return "releaseState: string expected"; return null; @@ -49439,8 +47971,6 @@ ModelFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelFeature) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ModelFeature: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49462,21 +47992,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelFeature.toObject = function toObject(message, options, q) { + ModelFeature.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.feature = ""; object.releaseState = ""; } - if (message.feature != null && Object.hasOwnProperty.call(message, "feature")) + if (message.feature != null && message.hasOwnProperty("feature")) object.feature = message.feature; - if (message.releaseState != null && Object.hasOwnProperty.call(message, "releaseState")) + if (message.releaseState != null && message.hasOwnProperty("releaseState")) object.releaseState = message.releaseState; return object; }; @@ -49564,16 +48090,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelFeatures.encode = function encode(message, writer, q) { + ModelFeatures.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.modelFeature != null && message.modelFeature.length) for (var i = 0; i < message.modelFeature.length; ++i) - $root.google.cloud.speech.v2.ModelFeature.encode(message.modelFeature[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.ModelFeature.encode(message.modelFeature[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -49587,7 +48109,7 @@ * @returns {$protobuf.Writer} Writer */ ModelFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -49659,7 +48181,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.modelFeature != null && Object.hasOwnProperty.call(message, "modelFeature")) { + if (message.modelFeature != null && message.hasOwnProperty("modelFeature")) { if (!Array.isArray(message.modelFeature)) return "modelFeature: array expected"; for (var i = 0; i < message.modelFeature.length; ++i) { @@ -49682,8 +48204,6 @@ ModelFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelFeatures) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ModelFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -49694,7 +48214,7 @@ throw TypeError(".google.cloud.speech.v2.ModelFeatures.modelFeature: array expected"); message.modelFeature = []; for (var i = 0; i < object.modelFeature.length; ++i) { - if (!$util.isObject(object.modelFeature[i])) + if (typeof object.modelFeature[i] !== "object") throw TypeError(".google.cloud.speech.v2.ModelFeatures.modelFeature: object expected"); message.modelFeature[i] = $root.google.cloud.speech.v2.ModelFeature.fromObject(object.modelFeature[i], long + 1); } @@ -49711,20 +48231,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelFeatures.toObject = function toObject(message, options, q) { + ModelFeatures.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.modelFeature = []; if (message.modelFeature && message.modelFeature.length) { object.modelFeature = []; for (var j = 0; j < message.modelFeature.length; ++j) - object.modelFeature[j] = $root.google.cloud.speech.v2.ModelFeature.toObject(message.modelFeature[j], options, q + 1); + object.modelFeature[j] = $root.google.cloud.speech.v2.ModelFeature.toObject(message.modelFeature[j], options); } return object; }; @@ -49812,17 +48328,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModelMetadata.encode = function encode(message, writer, q) { + ModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.modelFeatures != null && Object.hasOwnProperty.call(message, "modelFeatures")) for (var keys = Object.keys(message.modelFeatures), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.ModelFeatures.encode(message.modelFeatures[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + $root.google.cloud.speech.v2.ModelFeatures.encode(message.modelFeatures[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } return writer; }; @@ -49837,7 +48349,7 @@ * @returns {$protobuf.Writer} Writer */ ModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -49928,7 +48440,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.modelFeatures != null && Object.hasOwnProperty.call(message, "modelFeatures")) { + if (message.modelFeatures != null && message.hasOwnProperty("modelFeatures")) { if (!$util.isObject(message.modelFeatures)) return "modelFeatures: object expected"; var key = Object.keys(message.modelFeatures); @@ -49952,21 +48464,19 @@ ModelMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.ModelMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.ModelMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.ModelMetadata(); if (object.modelFeatures) { - if (!$util.isObject(object.modelFeatures)) + if (typeof object.modelFeatures !== "object") throw TypeError(".google.cloud.speech.v2.ModelMetadata.modelFeatures: object expected"); message.modelFeatures = {}; for (var keys = Object.keys(object.modelFeatures), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.modelFeatures, keys[i]); - if (!$util.isObject(object.modelFeatures[keys[i]])) + if (typeof object.modelFeatures[keys[i]] !== "object") throw TypeError(".google.cloud.speech.v2.ModelMetadata.modelFeatures: object expected"); message.modelFeatures[keys[i]] = $root.google.cloud.speech.v2.ModelFeatures.fromObject(object.modelFeatures[keys[i]], long + 1); } @@ -49983,13 +48493,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ModelMetadata.toObject = function toObject(message, options, q) { + ModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.modelFeatures = {}; @@ -49999,7 +48505,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.modelFeatures, keys2[j]); - object.modelFeatures[keys2[j]] = $root.google.cloud.speech.v2.ModelFeatures.toObject(message.modelFeatures[keys2[j]], options, q + 1); + object.modelFeatures[keys2[j]] = $root.google.cloud.speech.v2.ModelFeatures.toObject(message.modelFeatures[keys2[j]], options); } } return object; @@ -50088,17 +48594,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LanguageMetadata.encode = function encode(message, writer, q) { + LanguageMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.models != null && Object.hasOwnProperty.call(message, "models")) for (var keys = Object.keys(message.models), i = 0; i < keys.length; ++i) { writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.speech.v2.ModelMetadata.encode(message.models[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); + $root.google.cloud.speech.v2.ModelMetadata.encode(message.models[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } return writer; }; @@ -50113,7 +48615,7 @@ * @returns {$protobuf.Writer} Writer */ LanguageMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -50204,7 +48706,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.models != null && Object.hasOwnProperty.call(message, "models")) { + if (message.models != null && message.hasOwnProperty("models")) { if (!$util.isObject(message.models)) return "models: object expected"; var key = Object.keys(message.models); @@ -50228,21 +48730,19 @@ LanguageMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.LanguageMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.LanguageMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.LanguageMetadata(); if (object.models) { - if (!$util.isObject(object.models)) + if (typeof object.models !== "object") throw TypeError(".google.cloud.speech.v2.LanguageMetadata.models: object expected"); message.models = {}; for (var keys = Object.keys(object.models), i = 0; i < keys.length; ++i) { if (keys[i] === "__proto__") $util.makeProp(message.models, keys[i]); - if (!$util.isObject(object.models[keys[i]])) + if (typeof object.models[keys[i]] !== "object") throw TypeError(".google.cloud.speech.v2.LanguageMetadata.models: object expected"); message.models[keys[i]] = $root.google.cloud.speech.v2.ModelMetadata.fromObject(object.models[keys[i]], long + 1); } @@ -50259,13 +48759,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LanguageMetadata.toObject = function toObject(message, options, q) { + LanguageMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.models = {}; @@ -50275,7 +48771,7 @@ for (var j = 0; j < keys2.length; ++j) { if (keys2[j] === "__proto__") $util.makeProp(object.models, keys2[j]); - object.models[keys2[j]] = $root.google.cloud.speech.v2.ModelMetadata.toObject(message.models[keys2[j]], options, q + 1); + object.models[keys2[j]] = $root.google.cloud.speech.v2.ModelMetadata.toObject(message.models[keys2[j]], options); } } return object; @@ -50363,13 +48859,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccessMetadata.encode = function encode(message, writer, q) { + AccessMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.constraintType); return writer; @@ -50385,7 +48877,7 @@ * @returns {$protobuf.Writer} Writer */ AccessMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -50455,7 +48947,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) + if (message.constraintType != null && message.hasOwnProperty("constraintType")) switch (message.constraintType) { default: return "constraintType: enum value expected"; @@ -50477,8 +48969,6 @@ AccessMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.AccessMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.AccessMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -50512,17 +49002,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AccessMetadata.toObject = function toObject(message, options, q) { + AccessMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.constraintType = options.enums === String ? "CONSTRAINT_TYPE_UNSPECIFIED" : 0; - if (message.constraintType != null && Object.hasOwnProperty.call(message, "constraintType")) + if (message.constraintType != null && message.hasOwnProperty("constraintType")) object.constraintType = options.enums === String ? $root.google.cloud.speech.v2.AccessMetadata.ConstraintType[message.constraintType] === undefined ? message.constraintType : $root.google.cloud.speech.v2.AccessMetadata.ConstraintType[message.constraintType] : message.constraintType; return object; }; @@ -50632,17 +49118,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LocationsMetadata.encode = function encode(message, writer, q) { + LocationsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) - $root.google.cloud.speech.v2.LanguageMetadata.encode(message.languages, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.LanguageMetadata.encode(message.languages, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) - $root.google.cloud.speech.v2.AccessMetadata.encode(message.accessMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.cloud.speech.v2.AccessMetadata.encode(message.accessMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -50656,7 +49138,7 @@ * @returns {$protobuf.Writer} Writer */ LocationsMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -50730,12 +49212,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) { + if (message.languages != null && message.hasOwnProperty("languages")) { var error = $root.google.cloud.speech.v2.LanguageMetadata.verify(message.languages, long + 1); if (error) return "languages." + error; } - if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) { + if (message.accessMetadata != null && message.hasOwnProperty("accessMetadata")) { var error = $root.google.cloud.speech.v2.AccessMetadata.verify(message.accessMetadata, long + 1); if (error) return "accessMetadata." + error; @@ -50754,20 +49236,18 @@ LocationsMetadata.fromObject = function fromObject(object, long) { if (object instanceof $root.google.cloud.speech.v2.LocationsMetadata) return object; - if (!$util.isObject(object)) - throw TypeError(".google.cloud.speech.v2.LocationsMetadata: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.cloud.speech.v2.LocationsMetadata(); if (object.languages != null) { - if (!$util.isObject(object.languages)) + if (typeof object.languages !== "object") throw TypeError(".google.cloud.speech.v2.LocationsMetadata.languages: object expected"); message.languages = $root.google.cloud.speech.v2.LanguageMetadata.fromObject(object.languages, long + 1); } if (object.accessMetadata != null) { - if (!$util.isObject(object.accessMetadata)) + if (typeof object.accessMetadata !== "object") throw TypeError(".google.cloud.speech.v2.LocationsMetadata.accessMetadata: object expected"); message.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.fromObject(object.accessMetadata, long + 1); } @@ -50783,22 +49263,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LocationsMetadata.toObject = function toObject(message, options, q) { + LocationsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.languages = null; object.accessMetadata = null; } - if (message.languages != null && Object.hasOwnProperty.call(message, "languages")) - object.languages = $root.google.cloud.speech.v2.LanguageMetadata.toObject(message.languages, options, q + 1); - if (message.accessMetadata != null && Object.hasOwnProperty.call(message, "accessMetadata")) - object.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.toObject(message.accessMetadata, options, q + 1); + if (message.languages != null && message.hasOwnProperty("languages")) + object.languages = $root.google.cloud.speech.v2.LanguageMetadata.toObject(message.languages, options); + if (message.accessMetadata != null && message.hasOwnProperty("accessMetadata")) + object.accessMetadata = $root.google.cloud.speech.v2.AccessMetadata.toObject(message.accessMetadata, options); return object; }; @@ -50912,16 +49388,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer, q) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; @@ -50937,7 +49409,7 @@ * @returns {$protobuf.Writer} Writer */ Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -51013,7 +49485,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { + if (message.rules != null && message.hasOwnProperty("rules")) { if (!Array.isArray(message.rules)) return "rules: array expected"; for (var i = 0; i < message.rules.length; ++i) { @@ -51022,7 +49494,7 @@ return "rules." + error; } } - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) if (typeof message.fullyDecodeReservedExpansion !== "boolean") return "fullyDecodeReservedExpansion: boolean expected"; return null; @@ -51039,8 +49511,6 @@ Http.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Http) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.Http: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51051,7 +49521,7 @@ throw TypeError(".google.api.Http.rules: array expected"); message.rules = []; for (var i = 0; i < object.rules.length; ++i) { - if (!$util.isObject(object.rules[i])) + if (typeof object.rules[i] !== "object") throw TypeError(".google.api.Http.rules: object expected"); message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); } @@ -51070,13 +49540,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options, q) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.rules = []; @@ -51085,9 +49551,9 @@ if (message.rules && message.rules.length) { object.rules = []; for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options, q + 1); + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; @@ -51270,13 +49736,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer, q) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.get != null && Object.hasOwnProperty.call(message, "get")) @@ -51292,10 +49754,10 @@ if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; @@ -51311,7 +49773,7 @@ * @returns {$protobuf.Writer} Writer */ HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -51420,43 +49882,43 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.get != null && Object.hasOwnProperty.call(message, "get")) { + if (message.get != null && message.hasOwnProperty("get")) { properties.pattern = 1; if (!$util.isString(message.get)) return "get: string expected"; } - if (message.put != null && Object.hasOwnProperty.call(message, "put")) { + if (message.put != null && message.hasOwnProperty("put")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.put)) return "put: string expected"; } - if (message.post != null && Object.hasOwnProperty.call(message, "post")) { + if (message.post != null && message.hasOwnProperty("post")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.post)) return "post: string expected"; } - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { + if (message["delete"] != null && message.hasOwnProperty("delete")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message["delete"])) return "delete: string expected"; } - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { + if (message.patch != null && message.hasOwnProperty("patch")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; if (!$util.isString(message.patch)) return "patch: string expected"; } - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { + if (message.custom != null && message.hasOwnProperty("custom")) { if (properties.pattern === 1) return "pattern: multiple values"; properties.pattern = 1; @@ -51466,13 +49928,13 @@ return "custom." + error; } } - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (message.body != null && message.hasOwnProperty("body")) if (!$util.isString(message.body)) return "body: string expected"; - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + if (message.responseBody != null && message.hasOwnProperty("responseBody")) if (!$util.isString(message.responseBody)) return "responseBody: string expected"; - if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { if (!Array.isArray(message.additionalBindings)) return "additionalBindings: array expected"; for (var i = 0; i < message.additionalBindings.length; ++i) { @@ -51495,8 +49957,6 @@ HttpRule.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.HttpRule) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.HttpRule: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51515,7 +49975,7 @@ if (object.patch != null) message.patch = String(object.patch); if (object.custom != null) { - if (!$util.isObject(object.custom)) + if (typeof object.custom !== "object") throw TypeError(".google.api.HttpRule.custom: object expected"); message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); } @@ -51528,7 +49988,7 @@ throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); message.additionalBindings = []; for (var i = 0; i < object.additionalBindings.length; ++i) { - if (!$util.isObject(object.additionalBindings[i])) + if (typeof object.additionalBindings[i] !== "object") throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); } @@ -51545,13 +50005,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options, q) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.additionalBindings = []; @@ -51560,46 +50016,46 @@ object.body = ""; object.responseBody = ""; } - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) object.selector = message.selector; - if (message.get != null && Object.hasOwnProperty.call(message, "get")) { + if (message.get != null && message.hasOwnProperty("get")) { object.get = message.get; if (options.oneofs) object.pattern = "get"; } - if (message.put != null && Object.hasOwnProperty.call(message, "put")) { + if (message.put != null && message.hasOwnProperty("put")) { object.put = message.put; if (options.oneofs) object.pattern = "put"; } - if (message.post != null && Object.hasOwnProperty.call(message, "post")) { + if (message.post != null && message.hasOwnProperty("post")) { object.post = message.post; if (options.oneofs) object.pattern = "post"; } - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { + if (message["delete"] != null && message.hasOwnProperty("delete")) { object["delete"] = message["delete"]; if (options.oneofs) object.pattern = "delete"; } - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { + if (message.patch != null && message.hasOwnProperty("patch")) { object.patch = message.patch; if (options.oneofs) object.pattern = "patch"; } - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (message.body != null && message.hasOwnProperty("body")) object.body = message.body; - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); if (options.oneofs) object.pattern = "custom"; } if (message.additionalBindings && message.additionalBindings.length) { object.additionalBindings = []; for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options, q + 1); + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + if (message.responseBody != null && message.hasOwnProperty("responseBody")) object.responseBody = message.responseBody; return object; }; @@ -51695,13 +50151,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer, q) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); if (message.path != null && Object.hasOwnProperty.call(message, "path")) @@ -51719,7 +50171,7 @@ * @returns {$protobuf.Writer} Writer */ CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -51793,10 +50245,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + if (message.kind != null && message.hasOwnProperty("kind")) if (!$util.isString(message.kind)) return "kind: string expected"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (message.path != null && message.hasOwnProperty("path")) if (!$util.isString(message.path)) return "path: string expected"; return null; @@ -51813,8 +50265,6 @@ CustomHttpPattern.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CustomHttpPattern) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CustomHttpPattern: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -51836,21 +50286,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options, q) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.kind = ""; object.path = ""; } - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + if (message.kind != null && message.hasOwnProperty("kind")) object.kind = message.kind; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; return object; }; @@ -51956,13 +50402,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer, q) { + CommonLanguageSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); if (message.destinations != null && message.destinations.length) { @@ -51972,7 +50414,7 @@ writer.ldelim(); } if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -51986,7 +50428,7 @@ * @returns {$protobuf.Writer} Writer */ CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -52071,10 +50513,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) if (!$util.isString(message.referenceDocsUri)) return "referenceDocsUri: string expected"; - if (message.destinations != null && Object.hasOwnProperty.call(message, "destinations")) { + if (message.destinations != null && message.hasOwnProperty("destinations")) { if (!Array.isArray(message.destinations)) return "destinations: array expected"; for (var i = 0; i < message.destinations.length; ++i) @@ -52087,7 +50529,7 @@ break; } } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) { + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); if (error) return "selectiveGapicGeneration." + error; @@ -52106,8 +50548,6 @@ CommonLanguageSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CommonLanguageSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CommonLanguageSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52141,7 +50581,7 @@ } } if (object.selectiveGapicGeneration != null) { - if (!$util.isObject(object.selectiveGapicGeneration)) + if (typeof object.selectiveGapicGeneration !== "object") throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); } @@ -52157,13 +50597,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options, q) { + CommonLanguageSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.destinations = []; @@ -52171,15 +50607,15 @@ object.referenceDocsUri = ""; object.selectiveGapicGeneration = null; } - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { object.destinations = []; for (var j = 0; j < message.destinations.length; ++j) object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options, q + 1); + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -52355,13 +50791,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer, q) { + ClientLibrarySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) @@ -52369,21 +50801,21 @@ if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork(), q + 1).ldelim(); + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork(), q + 1).ldelim(); + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork(), q + 1).ldelim(); + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork(), q + 1).ldelim(); + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); return writer; }; @@ -52397,7 +50829,7 @@ * @returns {$protobuf.Writer} Writer */ ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -52507,10 +50939,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && message.hasOwnProperty("version")) if (!$util.isString(message.version)) return "version: string expected"; - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) switch (message.launchStage) { default: return "launchStage: enum value expected"; @@ -52524,45 +50956,45 @@ case 5: break; } - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) if (typeof message.restNumericEnums !== "boolean") return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) { + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); if (error) return "javaSettings." + error; } - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) { + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); if (error) return "cppSettings." + error; } - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) { + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); if (error) return "phpSettings." + error; } - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) { + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); if (error) return "pythonSettings." + error; } - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) { + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); if (error) return "nodeSettings." + error; } - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) { + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); if (error) return "dotnetSettings." + error; } - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) { + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); if (error) return "rubySettings." + error; } - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) { + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); if (error) return "goSettings." + error; @@ -52581,8 +51013,6 @@ ClientLibrarySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ClientLibrarySettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ClientLibrarySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -52633,42 +51063,42 @@ if (object.restNumericEnums != null) message.restNumericEnums = Boolean(object.restNumericEnums); if (object.javaSettings != null) { - if (!$util.isObject(object.javaSettings)) + if (typeof object.javaSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); } if (object.cppSettings != null) { - if (!$util.isObject(object.cppSettings)) + if (typeof object.cppSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); } if (object.phpSettings != null) { - if (!$util.isObject(object.phpSettings)) + if (typeof object.phpSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); } if (object.pythonSettings != null) { - if (!$util.isObject(object.pythonSettings)) + if (typeof object.pythonSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); } if (object.nodeSettings != null) { - if (!$util.isObject(object.nodeSettings)) + if (typeof object.nodeSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); } if (object.dotnetSettings != null) { - if (!$util.isObject(object.dotnetSettings)) + if (typeof object.dotnetSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); } if (object.rubySettings != null) { - if (!$util.isObject(object.rubySettings)) + if (typeof object.rubySettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); } if (object.goSettings != null) { - if (!$util.isObject(object.goSettings)) + if (typeof object.goSettings !== "object") throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); } @@ -52684,13 +51114,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options, q) { + ClientLibrarySettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.version = ""; @@ -52705,28 +51131,28 @@ object.rubySettings = null; object.goSettings = null; } - if (message.version != null && Object.hasOwnProperty.call(message, "version")) + if (message.version != null && message.hasOwnProperty("version")) object.version = message.version; - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + if (message.launchStage != null && message.hasOwnProperty("launchStage")) object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options, q + 1); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options, q + 1); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options, q + 1); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options, q + 1); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options, q + 1); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options, q + 1); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options, q + 1); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options, q + 1); + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); return object; }; @@ -52905,16 +51331,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer, q) { + Publishing.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.methodSettings != null && message.methodSettings.length) for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) @@ -52932,7 +51354,7 @@ writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); if (message.librarySettings != null && message.librarySettings.length) for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork(), q + 1).ldelim(); + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) @@ -52950,7 +51372,7 @@ * @returns {$protobuf.Writer} Writer */ Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -53066,7 +51488,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methodSettings != null && Object.hasOwnProperty.call(message, "methodSettings")) { + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { if (!Array.isArray(message.methodSettings)) return "methodSettings: array expected"; for (var i = 0; i < message.methodSettings.length; ++i) { @@ -53075,29 +51497,29 @@ return "methodSettings." + error; } } - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) if (!$util.isString(message.newIssueUri)) return "newIssueUri: string expected"; - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) if (!$util.isString(message.documentationUri)) return "documentationUri: string expected"; - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) if (!$util.isString(message.apiShortName)) return "apiShortName: string expected"; - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) if (!$util.isString(message.githubLabel)) return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && Object.hasOwnProperty.call(message, "codeownerGithubTeams")) { + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { if (!Array.isArray(message.codeownerGithubTeams)) return "codeownerGithubTeams: array expected"; for (var i = 0; i < message.codeownerGithubTeams.length; ++i) if (!$util.isString(message.codeownerGithubTeams[i])) return "codeownerGithubTeams: string[] expected"; } - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) if (!$util.isString(message.docTagPrefix)) return "docTagPrefix: string expected"; - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + if (message.organization != null && message.hasOwnProperty("organization")) switch (message.organization) { default: return "organization: enum value expected"; @@ -53111,7 +51533,7 @@ case 7: break; } - if (message.librarySettings != null && Object.hasOwnProperty.call(message, "librarySettings")) { + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { if (!Array.isArray(message.librarySettings)) return "librarySettings: array expected"; for (var i = 0; i < message.librarySettings.length; ++i) { @@ -53120,10 +51542,10 @@ return "librarySettings." + error; } } - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) if (!$util.isString(message.protoReferenceDocumentationUri)) return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) if (!$util.isString(message.restReferenceDocumentationUri)) return "restReferenceDocumentationUri: string expected"; return null; @@ -53140,8 +51562,6 @@ Publishing.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.Publishing) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.Publishing: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53152,7 +51572,7 @@ throw TypeError(".google.api.Publishing.methodSettings: array expected"); message.methodSettings = []; for (var i = 0; i < object.methodSettings.length; ++i) { - if (!$util.isObject(object.methodSettings[i])) + if (typeof object.methodSettings[i] !== "object") throw TypeError(".google.api.Publishing.methodSettings: object expected"); message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); } @@ -53219,7 +51639,7 @@ throw TypeError(".google.api.Publishing.librarySettings: array expected"); message.librarySettings = []; for (var i = 0; i < object.librarySettings.length; ++i) { - if (!$util.isObject(object.librarySettings[i])) + if (typeof object.librarySettings[i] !== "object") throw TypeError(".google.api.Publishing.librarySettings: object expected"); message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); } @@ -53240,13 +51660,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options, q) { + Publishing.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.methodSettings = []; @@ -53266,33 +51682,33 @@ if (message.methodSettings && message.methodSettings.length) { object.methodSettings = []; for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options, q + 1); + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); } - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) object.documentationUri = message.documentationUri; - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) object.apiShortName = message.apiShortName; - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) object.githubLabel = message.githubLabel; if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { object.codeownerGithubTeams = []; for (var j = 0; j < message.codeownerGithubTeams.length; ++j) object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; } - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + if (message.organization != null && message.hasOwnProperty("organization")) object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; if (message.librarySettings && message.librarySettings.length) { object.librarySettings = []; for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options, q + 1); + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); } - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; @@ -53398,20 +51814,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer, q) { + JavaSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -53425,7 +51837,7 @@ * @returns {$protobuf.Writer} Writer */ JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -53524,10 +51936,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) if (!$util.isString(message.libraryPackage)) return "libraryPackage: string expected"; - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) { + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { if (!$util.isObject(message.serviceClassNames)) return "serviceClassNames: object expected"; var key = Object.keys(message.serviceClassNames); @@ -53535,7 +51947,7 @@ if (!$util.isString(message.serviceClassNames[key[i]])) return "serviceClassNames: string{k:string} expected"; } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -53554,8 +51966,6 @@ JavaSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.JavaSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.JavaSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -53564,7 +51974,7 @@ if (object.libraryPackage != null) message.libraryPackage = String(object.libraryPackage); if (object.serviceClassNames) { - if (!$util.isObject(object.serviceClassNames)) + if (typeof object.serviceClassNames !== "object") throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); message.serviceClassNames = {}; for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { @@ -53574,7 +51984,7 @@ } } if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.JavaSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -53590,13 +52000,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options, q) { + JavaSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.serviceClassNames = {}; @@ -53604,7 +52010,7 @@ object.libraryPackage = ""; object.common = null; } - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) object.libraryPackage = message.libraryPackage; var keys2; if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { @@ -53615,8 +52021,8 @@ object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; } } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; @@ -53702,15 +52108,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer, q) { + CppSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -53724,7 +52126,7 @@ * @returns {$protobuf.Writer} Writer */ CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -53794,7 +52196,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -53813,15 +52215,13 @@ CppSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.CppSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CppSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.CppSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.CppSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -53837,18 +52237,14 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options, q) { + CppSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; @@ -53934,15 +52330,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer, q) { + PhpSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -53956,7 +52348,7 @@ * @returns {$protobuf.Writer} Writer */ PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -54026,7 +52418,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -54045,15 +52437,13 @@ PhpSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PhpSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PhpSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PhpSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.PhpSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -54069,18 +52459,14 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhpSettings.toObject = function toObject(message, options, q) { + PhpSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; @@ -54175,17 +52561,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, writer, q) { + PythonSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -54199,7 +52581,7 @@ * @returns {$protobuf.Writer} Writer */ PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -54273,12 +52655,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) { + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); if (error) return "experimentalFeatures." + error; @@ -54297,20 +52679,18 @@ PythonSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PythonSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.PythonSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.experimentalFeatures != null) { - if (!$util.isObject(object.experimentalFeatures)) + if (typeof object.experimentalFeatures !== "object") throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); } @@ -54326,22 +52706,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options, q) { + PythonSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.common = null; object.experimentalFeatures = null; } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -54442,13 +52818,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExperimentalFeatures.encode = function encode(message, writer, q) { + ExperimentalFeatures.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) @@ -54468,7 +52840,7 @@ * @returns {$protobuf.Writer} Writer */ ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -54546,13 +52918,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) if (typeof message.restAsyncIoEnabled !== "boolean") return "restAsyncIoEnabled: boolean expected"; - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) if (typeof message.protobufPythonicTypesEnabled !== "boolean") return "protobufPythonicTypesEnabled: boolean expected"; - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) if (typeof message.unversionedPackageDisabled !== "boolean") return "unversionedPackageDisabled: boolean expected"; return null; @@ -54569,8 +52941,6 @@ ExperimentalFeatures.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -54594,24 +52964,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExperimentalFeatures.toObject = function toObject(message, options, q) { + ExperimentalFeatures.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.restAsyncIoEnabled = false; object.protobufPythonicTypesEnabled = false; object.unversionedPackageDisabled = false; } - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) object.restAsyncIoEnabled = message.restAsyncIoEnabled; - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) object.unversionedPackageDisabled = message.unversionedPackageDisabled; return object; }; @@ -54701,15 +53067,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer, q) { + NodeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -54723,7 +53085,7 @@ * @returns {$protobuf.Writer} Writer */ NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -54793,7 +53155,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -54812,15 +53174,13 @@ NodeSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.NodeSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.NodeSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.NodeSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.NodeSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -54836,18 +53196,14 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options, q) { + NodeSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; @@ -54983,15 +53339,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, writer, q) { + DotnetSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -55020,7 +53372,7 @@ * @returns {$protobuf.Writer} Writer */ DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -55158,12 +53510,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -55171,7 +53523,7 @@ if (!$util.isString(message.renamedServices[key[i]])) return "renamedServices: string{k:string} expected"; } - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) { + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { if (!$util.isObject(message.renamedResources)) return "renamedResources: object expected"; var key = Object.keys(message.renamedResources); @@ -55179,21 +53531,21 @@ if (!$util.isString(message.renamedResources[key[i]])) return "renamedResources: string{k:string} expected"; } - if (message.ignoredResources != null && Object.hasOwnProperty.call(message, "ignoredResources")) { + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { if (!Array.isArray(message.ignoredResources)) return "ignoredResources: array expected"; for (var i = 0; i < message.ignoredResources.length; ++i) if (!$util.isString(message.ignoredResources[i])) return "ignoredResources: string[] expected"; } - if (message.forcedNamespaceAliases != null && Object.hasOwnProperty.call(message, "forcedNamespaceAliases")) { + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { if (!Array.isArray(message.forcedNamespaceAliases)) return "forcedNamespaceAliases: array expected"; for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) if (!$util.isString(message.forcedNamespaceAliases[i])) return "forcedNamespaceAliases: string[] expected"; } - if (message.handwrittenSignatures != null && Object.hasOwnProperty.call(message, "handwrittenSignatures")) { + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { if (!Array.isArray(message.handwrittenSignatures)) return "handwrittenSignatures: array expected"; for (var i = 0; i < message.handwrittenSignatures.length; ++i) @@ -55214,20 +53566,18 @@ DotnetSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.DotnetSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.DotnetSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.DotnetSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.DotnetSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (!$util.isObject(object.renamedServices)) + if (typeof object.renamedServices !== "object") throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -55237,7 +53587,7 @@ } } if (object.renamedResources) { - if (!$util.isObject(object.renamedResources)) + if (typeof object.renamedResources !== "object") throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); message.renamedResources = {}; for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { @@ -55279,13 +53629,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options, q) { + DotnetSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.ignoredResources = []; @@ -55298,8 +53644,8 @@ } if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -55417,15 +53763,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer, q) { + RubySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -55439,7 +53781,7 @@ * @returns {$protobuf.Writer} Writer */ RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -55509,7 +53851,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; @@ -55528,15 +53870,13 @@ RubySettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.RubySettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.RubySettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.RubySettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.RubySettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } @@ -55552,18 +53892,14 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options, q) { + RubySettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; @@ -55659,15 +53995,11 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer, q) { + GoSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); @@ -55684,7 +54016,7 @@ * @returns {$protobuf.Writer} Writer */ GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -55779,12 +54111,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { + if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); if (error) return "common." + error; } - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { if (!$util.isObject(message.renamedServices)) return "renamedServices: object expected"; var key = Object.keys(message.renamedServices); @@ -55806,20 +54138,18 @@ GoSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.GoSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.GoSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.GoSettings(); if (object.common != null) { - if (!$util.isObject(object.common)) + if (typeof object.common !== "object") throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); } if (object.renamedServices) { - if (!$util.isObject(object.renamedServices)) + if (typeof object.renamedServices !== "object") throw TypeError(".google.api.GoSettings.renamedServices: object expected"); message.renamedServices = {}; for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { @@ -55840,20 +54170,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options, q) { + GoSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.objects || options.defaults) object.renamedServices = {}; if (options.defaults) object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); var keys2; if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { object.renamedServices = {}; @@ -55967,17 +54293,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer, q) { + MethodSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) for (var i = 0; i < message.autoPopulatedFields.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); @@ -55994,7 +54316,7 @@ * @returns {$protobuf.Writer} Writer */ MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -56074,15 +54396,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) if (!$util.isString(message.selector)) return "selector: string expected"; - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) { + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); if (error) return "longRunning." + error; } - if (message.autoPopulatedFields != null && Object.hasOwnProperty.call(message, "autoPopulatedFields")) { + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { if (!Array.isArray(message.autoPopulatedFields)) return "autoPopulatedFields: array expected"; for (var i = 0; i < message.autoPopulatedFields.length; ++i) @@ -56103,8 +54425,6 @@ MethodSettings.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.MethodSettings: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56113,7 +54433,7 @@ if (object.selector != null) message.selector = String(object.selector); if (object.longRunning != null) { - if (!$util.isObject(object.longRunning)) + if (typeof object.longRunning !== "object") throw TypeError(".google.api.MethodSettings.longRunning: object expected"); message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); } @@ -56136,13 +54456,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options, q) { + MethodSettings.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.autoPopulatedFields = []; @@ -56150,10 +54466,10 @@ object.selector = ""; object.longRunning = null; } - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) object.selector = message.selector; - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options, q + 1); + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); if (message.autoPopulatedFields && message.autoPopulatedFields.length) { object.autoPopulatedFields = []; for (var j = 0; j < message.autoPopulatedFields.length; ++j) @@ -56268,21 +54584,17 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LongRunning.encode = function encode(message, writer, q) { + LongRunning.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -56296,7 +54608,7 @@ * @returns {$protobuf.Writer} Writer */ LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -56378,20 +54690,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) { + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); if (error) return "initialPollDelay." + error; } - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) if (typeof message.pollDelayMultiplier !== "number") return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) { + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); if (error) return "maxPollDelay." + error; } - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) { + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); if (error) return "totalPollTimeout." + error; @@ -56410,27 +54722,25 @@ LongRunning.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.MethodSettings.LongRunning) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.MethodSettings.LongRunning: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.api.MethodSettings.LongRunning(); if (object.initialPollDelay != null) { - if (!$util.isObject(object.initialPollDelay)) + if (typeof object.initialPollDelay !== "object") throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); } if (object.pollDelayMultiplier != null) message.pollDelayMultiplier = Number(object.pollDelayMultiplier); if (object.maxPollDelay != null) { - if (!$util.isObject(object.maxPollDelay)) + if (typeof object.maxPollDelay !== "object") throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); } if (object.totalPollTimeout != null) { - if (!$util.isObject(object.totalPollTimeout)) + if (typeof object.totalPollTimeout !== "object") throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); } @@ -56446,13 +54756,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunning.toObject = function toObject(message, options, q) { + LongRunning.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.initialPollDelay = null; @@ -56460,14 +54766,14 @@ object.maxPollDelay = null; object.totalPollTimeout = null; } - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options, q + 1); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options, q + 1); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options, q + 1); + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); return object; }; @@ -56608,13 +54914,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SelectiveGapicGeneration.encode = function encode(message, writer, q) { + SelectiveGapicGeneration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.methods != null && message.methods.length) for (var i = 0; i < message.methods.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); @@ -56633,7 +54935,7 @@ * @returns {$protobuf.Writer} Writer */ SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -56709,14 +55011,14 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.methods != null && Object.hasOwnProperty.call(message, "methods")) { + if (message.methods != null && message.hasOwnProperty("methods")) { if (!Array.isArray(message.methods)) return "methods: array expected"; for (var i = 0; i < message.methods.length; ++i) if (!$util.isString(message.methods[i])) return "methods: string[] expected"; } - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) if (typeof message.generateOmittedAsInternal !== "boolean") return "generateOmittedAsInternal: boolean expected"; return null; @@ -56733,8 +55035,6 @@ SelectiveGapicGeneration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.SelectiveGapicGeneration) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.SelectiveGapicGeneration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -56761,13 +55061,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SelectiveGapicGeneration.toObject = function toObject(message, options, q) { + SelectiveGapicGeneration.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.methods = []; @@ -56778,7 +55074,7 @@ for (var j = 0; j < message.methods.length; ++j) object.methods[j] = message.methods[j]; } - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) object.generateOmittedAsInternal = message.generateOmittedAsInternal; return object; }; @@ -56975,13 +55271,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer, q) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.pattern != null && message.pattern.length) @@ -57014,7 +55306,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -57117,20 +55409,20 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) { + if (message.pattern != null && message.hasOwnProperty("pattern")) { if (!Array.isArray(message.pattern)) return "pattern: array expected"; for (var i = 0; i < message.pattern.length; ++i) if (!$util.isString(message.pattern[i])) return "pattern: string[] expected"; } - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + if (message.nameField != null && message.hasOwnProperty("nameField")) if (!$util.isString(message.nameField)) return "nameField: string expected"; - if (message.history != null && Object.hasOwnProperty.call(message, "history")) + if (message.history != null && message.hasOwnProperty("history")) switch (message.history) { default: return "history: enum value expected"; @@ -57139,13 +55431,13 @@ case 2: break; } - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + if (message.plural != null && message.hasOwnProperty("plural")) if (!$util.isString(message.plural)) return "plural: string expected"; - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; - if (message.style != null && Object.hasOwnProperty.call(message, "style")) { + if (message.style != null && message.hasOwnProperty("style")) { if (!Array.isArray(message.style)) return "style: array expected"; for (var i = 0; i < message.style.length; ++i) @@ -57171,8 +55463,6 @@ ResourceDescriptor.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceDescriptor) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ResourceDescriptor: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57246,13 +55536,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options, q) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.pattern = []; @@ -57265,20 +55551,20 @@ object.plural = ""; object.singular = ""; } - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; if (message.pattern && message.pattern.length) { object.pattern = []; for (var j = 0; j < message.pattern.length; ++j) object.pattern[j] = message.pattern[j]; } - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; - if (message.history != null && Object.hasOwnProperty.call(message, "history")) + if (message.history != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "plural")) + if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; if (message.style && message.style.length) { object.style = []; @@ -57409,13 +55695,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer, q) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) @@ -57433,7 +55715,7 @@ * @returns {$protobuf.Writer} Writer */ ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -57507,10 +55789,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + if (message.childType != null && message.hasOwnProperty("childType")) if (!$util.isString(message.childType)) return "childType: string expected"; return null; @@ -57527,8 +55809,6 @@ ResourceReference.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.ResourceReference) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ResourceReference: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57550,21 +55830,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options, q) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type = ""; object.childType = ""; } - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + if (message.childType != null && message.hasOwnProperty("childType")) object.childType = message.childType; return object; }; @@ -57661,18 +55937,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldInfo.encode = function encode(message, writer, q) { + FieldInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); if (message.referencedTypes != null && message.referencedTypes.length) for (var i = 0; i < message.referencedTypes.length; ++i) - $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -57686,7 +55958,7 @@ * @returns {$protobuf.Writer} Writer */ FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -57762,7 +56034,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.format != null && Object.hasOwnProperty.call(message, "format")) + if (message.format != null && message.hasOwnProperty("format")) switch (message.format) { default: return "format: enum value expected"; @@ -57773,7 +56045,7 @@ case 4: break; } - if (message.referencedTypes != null && Object.hasOwnProperty.call(message, "referencedTypes")) { + if (message.referencedTypes != null && message.hasOwnProperty("referencedTypes")) { if (!Array.isArray(message.referencedTypes)) return "referencedTypes: array expected"; for (var i = 0; i < message.referencedTypes.length; ++i) { @@ -57796,8 +56068,6 @@ FieldInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.FieldInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.FieldInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -57836,7 +56106,7 @@ throw TypeError(".google.api.FieldInfo.referencedTypes: array expected"); message.referencedTypes = []; for (var i = 0; i < object.referencedTypes.length; ++i) { - if (!$util.isObject(object.referencedTypes[i])) + if (typeof object.referencedTypes[i] !== "object") throw TypeError(".google.api.FieldInfo.referencedTypes: object expected"); message.referencedTypes[i] = $root.google.api.TypeReference.fromObject(object.referencedTypes[i], long + 1); } @@ -57853,24 +56123,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldInfo.toObject = function toObject(message, options, q) { + FieldInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.referencedTypes = []; if (options.defaults) object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && Object.hasOwnProperty.call(message, "format")) + if (message.format != null && message.hasOwnProperty("format")) object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; if (message.referencedTypes && message.referencedTypes.length) { object.referencedTypes = []; for (var j = 0; j < message.referencedTypes.length; ++j) - object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options, q + 1); + object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options); } return object; }; @@ -57977,13 +56243,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypeReference.encode = function encode(message, writer, q) { + TypeReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeName); return writer; @@ -57999,7 +56261,7 @@ * @returns {$protobuf.Writer} Writer */ TypeReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -58069,7 +56331,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; return null; @@ -58086,8 +56348,6 @@ TypeReference.fromObject = function fromObject(object, long) { if (object instanceof $root.google.api.TypeReference) return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.TypeReference: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58107,17 +56367,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TypeReference.toObject = function toObject(message, options, q) { + TypeReference.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.typeName = ""; - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; return object; }; @@ -58217,16 +56473,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer, q) { + FileDescriptorSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.file != null && message.file.length) for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -58240,7 +56492,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -58312,7 +56564,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.file != null && Object.hasOwnProperty.call(message, "file")) { + if (message.file != null && message.hasOwnProperty("file")) { if (!Array.isArray(message.file)) return "file: array expected"; for (var i = 0; i < message.file.length; ++i) { @@ -58335,8 +56587,6 @@ FileDescriptorSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58347,7 +56597,7 @@ throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); message.file = []; for (var i = 0; i < object.file.length; ++i) { - if (!$util.isObject(object.file[i])) + if (typeof object.file[i] !== "object") throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); } @@ -58364,20 +56614,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options, q) { + FileDescriptorSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.file = []; if (message.file && message.file.length) { object.file = []; for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options, q + 1); + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); } return object; }; @@ -58623,13 +56869,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer, q) { + FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) @@ -58639,20 +56881,20 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); if (message.messageType != null && message.messageType.length) for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.service != null && message.service.length) for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); @@ -58679,7 +56921,7 @@ * @returns {$protobuf.Writer} Writer */ FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -58827,41 +57069,41 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && message.hasOwnProperty("package")) if (!$util.isString(message["package"])) return "package: string expected"; - if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { + if (message.dependency != null && message.hasOwnProperty("dependency")) { if (!Array.isArray(message.dependency)) return "dependency: array expected"; for (var i = 0; i < message.dependency.length; ++i) if (!$util.isString(message.dependency[i])) return "dependency: string[] expected"; } - if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { if (!Array.isArray(message.publicDependency)) return "publicDependency: array expected"; for (var i = 0; i < message.publicDependency.length; ++i) if (!$util.isInteger(message.publicDependency[i])) return "publicDependency: integer[] expected"; } - if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { if (!Array.isArray(message.weakDependency)) return "weakDependency: array expected"; for (var i = 0; i < message.weakDependency.length; ++i) if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } - if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { if (!Array.isArray(message.optionDependency)) return "optionDependency: array expected"; for (var i = 0; i < message.optionDependency.length; ++i) if (!$util.isString(message.optionDependency[i])) return "optionDependency: string[] expected"; } - if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { + if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; for (var i = 0; i < message.messageType.length; ++i) { @@ -58870,7 +57112,7 @@ return "messageType." + error; } } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (message.enumType != null && message.hasOwnProperty("enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -58879,7 +57121,7 @@ return "enumType." + error; } } - if (message.service != null && Object.hasOwnProperty.call(message, "service")) { + if (message.service != null && message.hasOwnProperty("service")) { if (!Array.isArray(message.service)) return "service: array expected"; for (var i = 0; i < message.service.length; ++i) { @@ -58888,7 +57130,7 @@ return "service." + error; } } - if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { + if (message.extension != null && message.hasOwnProperty("extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -58897,20 +57139,20 @@ return "extension." + error; } } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); if (error) return "sourceCodeInfo." + error; } - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -58942,8 +57184,6 @@ FileDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -58986,7 +57226,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); message.messageType = []; for (var i = 0; i < object.messageType.length; ++i) { - if (!$util.isObject(object.messageType[i])) + if (typeof object.messageType[i] !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); } @@ -58996,7 +57236,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (!$util.isObject(object.enumType[i])) + if (typeof object.enumType[i] !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -59006,7 +57246,7 @@ throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); message.service = []; for (var i = 0; i < object.service.length; ++i) { - if (!$util.isObject(object.service[i])) + if (typeof object.service[i] !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); } @@ -59016,18 +57256,18 @@ throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (!$util.isObject(object.extension[i])) + if (typeof object.extension[i] !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } } if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); } if (object.sourceCodeInfo != null) { - if (!$util.isObject(object.sourceCodeInfo)) + if (typeof object.sourceCodeInfo !== "object") throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); } @@ -59101,13 +57341,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options, q) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.dependency = []; @@ -59127,9 +57363,9 @@ object.syntax = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && message.hasOwnProperty("package")) object["package"] = message["package"]; if (message.dependency && message.dependency.length) { object.dependency = []; @@ -59139,27 +57375,27 @@ if (message.messageType && message.messageType.length) { object.messageType = []; for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options, q + 1); + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); } if (message.service && message.service.length) { object.service = []; for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options, q + 1); + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); if (message.publicDependency && message.publicDependency.length) { object.publicDependency = []; for (var j = 0; j < message.publicDependency.length; ++j) @@ -59170,9 +57406,9 @@ for (var j = 0; j < message.weakDependency.length; ++j) object.weakDependency[j] = message.weakDependency[j]; } - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; if (message.optionDependency && message.optionDependency.length) { object.optionDependency = []; @@ -59362,38 +57598,34 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer, q) { + DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.nestedType != null && message.nestedType.length) for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.extensionRange != null && message.extensionRange.length) for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); @@ -59412,7 +57644,7 @@ * @returns {$protobuf.Writer} Writer */ DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -59538,10 +57770,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.field != null && Object.hasOwnProperty.call(message, "field")) { + if (message.field != null && message.hasOwnProperty("field")) { if (!Array.isArray(message.field)) return "field: array expected"; for (var i = 0; i < message.field.length; ++i) { @@ -59550,7 +57782,7 @@ return "field." + error; } } - if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { + if (message.extension != null && message.hasOwnProperty("extension")) { if (!Array.isArray(message.extension)) return "extension: array expected"; for (var i = 0; i < message.extension.length; ++i) { @@ -59559,7 +57791,7 @@ return "extension." + error; } } - if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { if (!Array.isArray(message.nestedType)) return "nestedType: array expected"; for (var i = 0; i < message.nestedType.length; ++i) { @@ -59568,7 +57800,7 @@ return "nestedType." + error; } } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { + if (message.enumType != null && message.hasOwnProperty("enumType")) { if (!Array.isArray(message.enumType)) return "enumType: array expected"; for (var i = 0; i < message.enumType.length; ++i) { @@ -59577,7 +57809,7 @@ return "enumType." + error; } } - if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { if (!Array.isArray(message.extensionRange)) return "extensionRange: array expected"; for (var i = 0; i < message.extensionRange.length; ++i) { @@ -59586,7 +57818,7 @@ return "extensionRange." + error; } } - if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { if (!Array.isArray(message.oneofDecl)) return "oneofDecl: array expected"; for (var i = 0; i < message.oneofDecl.length; ++i) { @@ -59595,12 +57827,12 @@ return "oneofDecl." + error; } } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -59609,14 +57841,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + if (message.visibility != null && message.hasOwnProperty("visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -59639,8 +57871,6 @@ DescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -59653,7 +57883,7 @@ throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); message.field = []; for (var i = 0; i < object.field.length; ++i) { - if (!$util.isObject(object.field[i])) + if (typeof object.field[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); } @@ -59663,7 +57893,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); message.extension = []; for (var i = 0; i < object.extension.length; ++i) { - if (!$util.isObject(object.extension[i])) + if (typeof object.extension[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); } @@ -59673,7 +57903,7 @@ throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); message.nestedType = []; for (var i = 0; i < object.nestedType.length; ++i) { - if (!$util.isObject(object.nestedType[i])) + if (typeof object.nestedType[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); } @@ -59683,7 +57913,7 @@ throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { - if (!$util.isObject(object.enumType[i])) + if (typeof object.enumType[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); } @@ -59693,7 +57923,7 @@ throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); message.extensionRange = []; for (var i = 0; i < object.extensionRange.length; ++i) { - if (!$util.isObject(object.extensionRange[i])) + if (typeof object.extensionRange[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); } @@ -59703,13 +57933,13 @@ throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); message.oneofDecl = []; for (var i = 0; i < object.oneofDecl.length; ++i) { - if (!$util.isObject(object.oneofDecl[i])) + if (typeof object.oneofDecl[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); } } if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); } @@ -59718,7 +57948,7 @@ throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (!$util.isObject(object.reservedRange[i])) + if (typeof object.reservedRange[i] !== "object") throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -59762,13 +57992,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options, q) { + DescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.field = []; @@ -59785,51 +58011,51 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.field && message.field.length) { object.field = []; for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options, q + 1); + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); } if (message.nestedType && message.nestedType.length) { object.nestedType = []; for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options, q + 1); + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options, q + 1); + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); } if (message.extensionRange && message.extensionRange.length) { object.extensionRange = []; for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options, q + 1); + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); } if (message.extension && message.extension.length) { object.extension = []; for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options, q + 1); + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); if (message.oneofDecl && message.oneofDecl.length) { object.oneofDecl = []; for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options, q + 1); + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); } if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options, q + 1); + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + if (message.visibility != null && message.hasOwnProperty("visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -59931,19 +58157,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRange.encode = function encode(message, writer, q) { + ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -59957,7 +58179,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -60035,13 +58257,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -60060,8 +58282,6 @@ ExtensionRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60072,7 +58292,7 @@ if (object.end != null) message.end = object.end | 0; if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); } @@ -60088,25 +58308,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRange.toObject = function toObject(message, options, q) { + ExtensionRange.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; object.options = null; } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); return object; }; @@ -60201,13 +58417,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReservedRange.encode = function encode(message, writer, q) { + ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -60225,7 +58437,7 @@ * @returns {$protobuf.Writer} Writer */ ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -60299,10 +58511,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -60319,8 +58531,6 @@ ReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60342,21 +58552,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options, q) { + ReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; return object; }; @@ -60475,23 +58681,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer, q) { + ExtensionRangeOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.declaration != null && message.declaration.length) for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; @@ -60505,7 +58707,7 @@ * @returns {$protobuf.Writer} Writer */ ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -60591,7 +58793,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -60600,7 +58802,7 @@ return "uninterpretedOption." + error; } } - if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { + if (message.declaration != null && message.hasOwnProperty("declaration")) { if (!Array.isArray(message.declaration)) return "declaration: array expected"; for (var i = 0; i < message.declaration.length; ++i) { @@ -60609,12 +58811,12 @@ return "declaration." + error; } } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + if (message.verification != null && message.hasOwnProperty("verification")) switch (message.verification) { default: return "verification: enum value expected"; @@ -60636,8 +58838,6 @@ ExtensionRangeOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -60648,7 +58848,7 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -60658,13 +58858,13 @@ throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); message.declaration = []; for (var i = 0; i < object.declaration.length; ++i) { - if (!$util.isObject(object.declaration[i])) + if (typeof object.declaration[i] !== "object") throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); } } if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -60696,13 +58896,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options, q) { + ExtensionRangeOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.declaration = []; @@ -60715,16 +58911,16 @@ if (message.declaration && message.declaration.length) { object.declaration = []; for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); } - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + if (message.verification != null && message.hasOwnProperty("verification")) object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; @@ -60844,13 +59040,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Declaration.encode = function encode(message, writer, q) { + Declaration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) @@ -60874,7 +59066,7 @@ * @returns {$protobuf.Writer} Writer */ Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -60960,19 +59152,19 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + if (message.fullName != null && message.hasOwnProperty("fullName")) if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + if (message.reserved != null && message.hasOwnProperty("reserved")) if (typeof message.reserved !== "boolean") return "reserved: boolean expected"; - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + if (message.repeated != null && message.hasOwnProperty("repeated")) if (typeof message.repeated !== "boolean") return "repeated: boolean expected"; return null; @@ -60989,8 +59181,6 @@ Declaration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61018,13 +59208,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Declaration.toObject = function toObject(message, options, q) { + Declaration.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.number = 0; @@ -61033,15 +59219,15 @@ object.reserved = false; object.repeated = false; } - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + if (message.fullName != null && message.hasOwnProperty("fullName")) object.fullName = message.fullName; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + if (message.reserved != null && message.hasOwnProperty("reserved")) object.reserved = message.reserved; - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + if (message.repeated != null && message.hasOwnProperty("repeated")) object.repeated = message.repeated; return object; }; @@ -61235,13 +59421,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer, q) { + FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) @@ -61257,7 +59439,7 @@ if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) @@ -61277,7 +59459,7 @@ * @returns {$protobuf.Writer} Writer */ FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -61387,13 +59569,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && message.hasOwnProperty("label")) switch (message.label) { default: return "label: enum value expected"; @@ -61402,7 +59584,7 @@ case 2: break; } - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { default: return "type: enum value expected"; @@ -61426,27 +59608,27 @@ case 18: break; } - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) if (!$util.isString(message.typeName)) return "typeName: string expected"; - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && message.hasOwnProperty("extendee")) if (!$util.isString(message.extendee)) return "extendee: string expected"; - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) if (!$util.isString(message.defaultValue)) return "defaultValue: string expected"; - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) if (!$util.isInteger(message.oneofIndex)) return "oneofIndex: integer expected"; - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + if (message.jsonName != null && message.hasOwnProperty("jsonName")) if (!$util.isString(message.jsonName)) return "jsonName: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) if (typeof message.proto3Optional !== "boolean") return "proto3Optional: boolean expected"; return null; @@ -61463,8 +59645,6 @@ FieldDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61585,7 +59765,7 @@ if (object.jsonName != null) message.jsonName = String(object.jsonName); if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); } @@ -61603,13 +59783,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options, q) { + FieldDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -61624,27 +59800,27 @@ object.jsonName = ""; object.proto3Optional = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && message.hasOwnProperty("extendee")) object.extendee = message.extendee; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) object.defaultValue = message.defaultValue; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + if (message.jsonName != null && message.hasOwnProperty("jsonName")) object.jsonName = message.jsonName; - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) object.proto3Optional = message.proto3Optional; return object; }; @@ -61802,17 +59978,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer, q) { + OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -61826,7 +59998,7 @@ * @returns {$protobuf.Writer} Writer */ OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -61900,10 +60072,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -61922,8 +60094,6 @@ OneofDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -61932,7 +60102,7 @@ if (object.name != null) message.name = String(object.name); if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); } @@ -61948,22 +60118,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options, q) { + OneofDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.options = null; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; @@ -62097,23 +60263,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer, q) { + EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.reservedName != null && message.reservedName.length) for (var i = 0; i < message.reservedName.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); @@ -62132,7 +60294,7 @@ * @returns {$protobuf.Writer} Writer */ EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -62228,10 +60390,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) { + if (message.value != null && message.hasOwnProperty("value")) { if (!Array.isArray(message.value)) return "value: array expected"; for (var i = 0; i < message.value.length; ++i) { @@ -62240,12 +60402,12 @@ return "value." + error; } } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { if (!Array.isArray(message.reservedRange)) return "reservedRange: array expected"; for (var i = 0; i < message.reservedRange.length; ++i) { @@ -62254,14 +60416,14 @@ return "reservedRange." + error; } } - if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { if (!Array.isArray(message.reservedName)) return "reservedName: array expected"; for (var i = 0; i < message.reservedName.length; ++i) if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + if (message.visibility != null && message.hasOwnProperty("visibility")) switch (message.visibility) { default: return "visibility: enum value expected"; @@ -62284,8 +60446,6 @@ EnumDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62298,13 +60458,13 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); message.value = []; for (var i = 0; i < object.value.length; ++i) { - if (!$util.isObject(object.value[i])) + if (typeof object.value[i] !== "object") throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); } } if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); } @@ -62313,7 +60473,7 @@ throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); message.reservedRange = []; for (var i = 0; i < object.reservedRange.length; ++i) { - if (!$util.isObject(object.reservedRange[i])) + if (typeof object.reservedRange[i] !== "object") throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); } @@ -62357,13 +60517,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options, q) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.value = []; @@ -62375,26 +60531,26 @@ object.options = null; object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.value && message.value.length) { object.value = []; for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options, q + 1); + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); if (message.reservedRange && message.reservedRange.length) { object.reservedRange = []; for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options, q + 1); + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); } if (message.reservedName && message.reservedName.length) { object.reservedName = []; for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + if (message.visibility != null && message.hasOwnProperty("visibility")) object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -62487,13 +60643,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumReservedRange.encode = function encode(message, writer, q) { + EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); if (message.end != null && Object.hasOwnProperty.call(message, "end")) @@ -62511,7 +60663,7 @@ * @returns {$protobuf.Writer} Writer */ EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -62585,10 +60737,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) if (!$util.isInteger(message.start)) return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; return null; @@ -62605,8 +60757,6 @@ EnumReservedRange.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62628,21 +60778,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumReservedRange.toObject = function toObject(message, options, q) { + EnumReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.start = 0; object.end = 0; } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; return object; }; @@ -62750,19 +60896,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer, q) { + EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -62776,7 +60918,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -62854,13 +60996,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) if (!$util.isInteger(message.number)) return "number: integer expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -62879,8 +61021,6 @@ EnumValueDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -62891,7 +61031,7 @@ if (object.number != null) message.number = object.number | 0; if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); } @@ -62907,25 +61047,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options, q) { + EnumValueDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.number = 0; object.options = null; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; @@ -63030,20 +61166,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer, q) { + ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -63057,7 +61189,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -63137,10 +61269,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.method != null && Object.hasOwnProperty.call(message, "method")) { + if (message.method != null && message.hasOwnProperty("method")) { if (!Array.isArray(message.method)) return "method: array expected"; for (var i = 0; i < message.method.length; ++i) { @@ -63149,7 +61281,7 @@ return "method." + error; } } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); if (error) return "options." + error; @@ -63168,8 +61300,6 @@ ServiceDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63182,13 +61312,13 @@ throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); message.method = []; for (var i = 0; i < object.method.length; ++i) { - if (!$util.isObject(object.method[i])) + if (typeof object.method[i] !== "object") throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); } } if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); } @@ -63204,13 +61334,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options, q) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.method = []; @@ -63218,15 +61344,15 @@ object.name = ""; object.options = null; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.method && message.method.length) { object.method = []; for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options, q + 1); + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; @@ -63357,13 +61483,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer, q) { + MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) @@ -63371,7 +61493,7 @@ if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) @@ -63389,7 +61511,7 @@ * @returns {$protobuf.Writer} Writer */ MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -63479,24 +61601,24 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + if (message.inputType != null && message.hasOwnProperty("inputType")) if (!$util.isString(message.inputType)) return "inputType: string expected"; - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + if (message.outputType != null && message.hasOwnProperty("outputType")) if (!$util.isString(message.outputType)) return "outputType: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { + if (message.options != null && message.hasOwnProperty("options")) { var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); if (error) return "options." + error; } - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) if (typeof message.clientStreaming !== "boolean") return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) if (typeof message.serverStreaming !== "boolean") return "serverStreaming: boolean expected"; return null; @@ -63513,8 +61635,6 @@ MethodDescriptorProto.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -63527,7 +61647,7 @@ if (object.outputType != null) message.outputType = String(object.outputType); if (object.options != null) { - if (!$util.isObject(object.options)) + if (typeof object.options !== "object") throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); } @@ -63547,13 +61667,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options, q) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; @@ -63563,17 +61679,17 @@ object.clientStreaming = false; object.serverStreaming = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + if (message.inputType != null && message.hasOwnProperty("inputType")) object.inputType = message.inputType; - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + if (message.outputType != null && message.hasOwnProperty("outputType")) object.outputType = message.outputType; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) object.serverStreaming = message.serverStreaming; return object; }; @@ -63851,13 +61967,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer, q) { + FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) @@ -63897,13 +62009,13 @@ if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; @@ -63917,7 +62029,7 @@ * @returns {$protobuf.Writer} Writer */ FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -64075,22 +62187,22 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) if (!$util.isString(message.javaPackage)) return "javaPackage: string expected"; - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) if (!$util.isString(message.javaOuterClassname)) return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) if (typeof message.javaMultipleFiles !== "boolean") return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) if (typeof message.javaGenerateEqualsAndHash !== "boolean") return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) if (typeof message.javaStringCheckUtf8 !== "boolean") return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) switch (message.optimizeFor) { default: return "optimizeFor: enum value expected"; @@ -64099,51 +62211,51 @@ case 3: break; } - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + if (message.goPackage != null && message.hasOwnProperty("goPackage")) if (!$util.isString(message.goPackage)) return "goPackage: string expected"; - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) if (typeof message.ccGenericServices !== "boolean") return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) if (typeof message.javaGenericServices !== "boolean") return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) if (typeof message.pyGenericServices !== "boolean") return "pyGenericServices: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) if (typeof message.ccEnableArenas !== "boolean") return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) if (!$util.isString(message.objcClassPrefix)) return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) if (!$util.isString(message.csharpNamespace)) return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) if (!$util.isString(message.swiftPrefix)) return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) if (!$util.isString(message.phpClassPrefix)) return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) if (!$util.isString(message.phpNamespace)) return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) if (!$util.isString(message.phpMetadataNamespace)) return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) if (!$util.isString(message.rubyPackage)) return "rubyPackage: string expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -64152,7 +62264,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resourceDefinition"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceDefinition")) { + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { if (!Array.isArray(message[".google.api.resourceDefinition"])) return ".google.api.resourceDefinition: array expected"; for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { @@ -64175,8 +62287,6 @@ FileOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FileOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64239,7 +62349,7 @@ if (object.rubyPackage != null) message.rubyPackage = String(object.rubyPackage); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.FileOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -64248,7 +62358,7 @@ throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -64258,7 +62368,7 @@ throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); message[".google.api.resourceDefinition"] = []; for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (!$util.isObject(object[".google.api.resourceDefinition"][i])) + if (typeof object[".google.api.resourceDefinition"][i] !== "object") throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i], long + 1); } @@ -64275,13 +62385,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options, q) { + FileOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -64309,55 +62415,55 @@ object.rubyPackage = ""; object.features = null; } - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + if (message.optimizeFor != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + if (message.goPackage != null && message.hasOwnProperty("goPackage")) object.goPackage = message.goPackage; - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) object.rubyPackage = message.rubyPackage; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { object[".google.api.resourceDefinition"] = []; for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options, q + 1); + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); } return object; }; @@ -64524,13 +62630,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer, q) { + MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) @@ -64542,12 +62644,12 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; @@ -64561,7 +62663,7 @@ * @returns {$protobuf.Writer} Writer */ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -64661,27 +62763,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) if (typeof message.messageSetWireFormat !== "boolean") return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) if (typeof message.noStandardDescriptorAccessor !== "boolean") return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -64690,7 +62792,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) { + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); if (error) return ".google.api.resource." + error; @@ -64709,8 +62811,6 @@ MessageOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MessageOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MessageOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -64727,7 +62827,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.MessageOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -64736,13 +62836,13 @@ throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.resource"] != null) { - if (!$util.isObject(object[".google.api.resource"])) + if (typeof object[".google.api.resource"] !== "object") throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); } @@ -64758,13 +62858,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options, q) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -64777,25 +62873,25 @@ object.features = null; object[".google.api.resource"] = null; } - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options, q + 1); + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; @@ -65029,13 +63125,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer, q) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) @@ -65059,21 +63151,21 @@ writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); if (message.editionDefaults != null && message.editionDefaults.length) for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork(), q + 1).ldelim(); + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork(), q + 1).ldelim(); + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; @@ -65087,7 +63179,7 @@ * @returns {$protobuf.Writer} Writer */ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -65239,7 +63331,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (message.ctype != null && message.hasOwnProperty("ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; @@ -65248,10 +63340,10 @@ case 2: break; } - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && message.hasOwnProperty("packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + if (message.jstype != null && message.hasOwnProperty("jstype")) switch (message.jstype) { default: return "jstype: enum value expected"; @@ -65260,22 +63352,22 @@ case 2: break; } - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) if (typeof message.unverifiedLazy !== "boolean") return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + if (message.weak != null && message.hasOwnProperty("weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + if (message.retention != null && message.hasOwnProperty("retention")) switch (message.retention) { default: return "retention: enum value expected"; @@ -65284,7 +63376,7 @@ case 2: break; } - if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { + if (message.targets != null && message.hasOwnProperty("targets")) { if (!Array.isArray(message.targets)) return "targets: array expected"; for (var i = 0; i < message.targets.length; ++i) @@ -65304,7 +63396,7 @@ break; } } - if (message.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { if (!Array.isArray(message.editionDefaults)) return "editionDefaults: array expected"; for (var i = 0; i < message.editionDefaults.length; ++i) { @@ -65313,17 +63405,17 @@ return "editionDefaults." + error; } } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -65332,7 +63424,7 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.fieldBehavior"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldBehavior")) { + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) @@ -65351,12 +63443,12 @@ break; } } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) { + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); if (error) return ".google.api.resourceReference." + error; } - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) { + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"], long + 1); if (error) return ".google.api.fieldInfo." + error; @@ -65375,8 +63467,6 @@ FieldOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -65512,18 +63602,18 @@ throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); message.editionDefaults = []; for (var i = 0; i < object.editionDefaults.length; ++i) { - if (!$util.isObject(object.editionDefaults[i])) + if (typeof object.editionDefaults[i] !== "object") throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); } } if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.featureSupport != null) { - if (!$util.isObject(object.featureSupport)) + if (typeof object.featureSupport !== "object") throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -65532,7 +63622,7 @@ throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -65587,12 +63677,12 @@ } } if (object[".google.api.resourceReference"] != null) { - if (!$util.isObject(object[".google.api.resourceReference"])) + if (typeof object[".google.api.resourceReference"] !== "object") throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); } if (object[".google.api.fieldInfo"] != null) { - if (!$util.isObject(object[".google.api.fieldInfo"])) + if (typeof object[".google.api.fieldInfo"] !== "object") throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"], long + 1); } @@ -65608,13 +63698,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options, q) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.targets = []; @@ -65637,23 +63723,23 @@ object[".google.api.resourceReference"] = null; object[".google.api.fieldInfo"] = null; } - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (message.ctype != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + if (message.jstype != null && message.hasOwnProperty("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 && Object.hasOwnProperty.call(message, "weak")) + if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + if (message.retention != null && message.hasOwnProperty("retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; if (message.targets && message.targets.length) { object.targets = []; @@ -65663,26 +63749,26 @@ if (message.editionDefaults && message.editionDefaults.length) { object.editionDefaults = []; for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } 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]] === 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 && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options, q + 1); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options, q + 1); + 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; @@ -65852,13 +63938,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer, q) { + EditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) @@ -65876,7 +63958,7 @@ * @returns {$protobuf.Writer} Writer */ EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -65950,7 +64032,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -65968,7 +64050,7 @@ case 2147483647: break; } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -65985,8 +64067,6 @@ EditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66062,21 +64142,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options, q) { + EditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.value = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; @@ -66190,13 +64266,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSupport.encode = function encode(message, writer, q) { + FeatureSupport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) @@ -66218,7 +64290,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -66300,7 +64372,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) switch (message.editionIntroduced) { default: return "editionIntroduced: enum value expected"; @@ -66318,7 +64390,7 @@ case 2147483647: break; } - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) switch (message.editionDeprecated) { default: return "editionDeprecated: enum value expected"; @@ -66336,10 +64408,10 @@ case 2147483647: break; } - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) if (!$util.isString(message.deprecationWarning)) return "deprecationWarning: string expected"; - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) switch (message.editionRemoved) { default: return "editionRemoved: enum value expected"; @@ -66371,8 +64443,6 @@ FeatureSupport.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -66560,13 +64630,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSupport.toObject = function toObject(message, options, q) { + FeatureSupport.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; @@ -66574,13 +64640,13 @@ object.deprecationWarning = ""; object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; @@ -66680,18 +64746,14 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer, q) { + OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; @@ -66705,7 +64767,7 @@ * @returns {$protobuf.Writer} Writer */ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -66781,12 +64843,12 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -66809,15 +64871,13 @@ OneofOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.OneofOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.OneofOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -66826,7 +64886,7 @@ throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -66843,24 +64903,20 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options, q) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) object.features = null; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; @@ -66984,13 +65040,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer, q) { + EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) @@ -66998,10 +65050,10 @@ if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; @@ -67015,7 +65067,7 @@ * @returns {$protobuf.Writer} Writer */ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -67103,21 +65155,21 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) if (typeof message.allowAlias !== "boolean") return "allowAlias: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -67140,8 +65192,6 @@ EnumOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67154,7 +65204,7 @@ if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.EnumOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -67163,7 +65213,7 @@ throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -67180,13 +65230,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options, q) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -67196,18 +65242,18 @@ object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) object.allowAlias = message.allowAlias; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; @@ -67331,24 +65377,20 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer, q) { + EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; @@ -67362,7 +65404,7 @@ * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -67450,23 +65492,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); if (error) return "featureSupport." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -67489,8 +65531,6 @@ EnumValueOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumValueOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -67499,14 +65539,14 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); if (object.featureSupport != null) { - if (!$util.isObject(object.featureSupport)) + if (typeof object.featureSupport !== "object") throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); } @@ -67515,7 +65555,7 @@ throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -67532,13 +65572,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options, q) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -67548,18 +65584,18 @@ object.debugRedact = false; object.featureSupport = null; } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; @@ -67692,20 +65728,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer, q) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) @@ -67725,7 +65757,7 @@ * @returns {$protobuf.Writer} Writer */ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -67817,15 +65849,15 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -67834,13 +65866,13 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) if (!$util.isString(message[".google.api.defaultHost"])) return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) if (!$util.isString(message[".google.api.apiVersion"])) return ".google.api.apiVersion: string expected"; return null; @@ -67857,15 +65889,13 @@ ServiceOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ServiceOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) throw Error("maximum nesting depth exceeded"); var message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -67876,7 +65906,7 @@ throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } @@ -67899,13 +65929,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options, q) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; @@ -67916,20 +65942,20 @@ object[".google.api.oauthScopes"] = ""; object[".google.api.apiVersion"] = ""; } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; return object; }; @@ -68072,29 +66098,25 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer, q) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork(), q + 1).ldelim(); + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork(), q + 1).ldelim(); + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; @@ -68108,7 +66130,7 @@ * @returns {$protobuf.Writer} Writer */ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -68206,10 +66228,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) switch (message.idempotencyLevel) { default: return "idempotencyLevel: enum value expected"; @@ -68218,12 +66240,12 @@ case 2: break; } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { + if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); if (error) return "features." + error; } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { @@ -68232,19 +66254,19 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); if (error) return ".google.api.http." + error; } - if (message[".google.api.methodSignature"] != null && Object.hasOwnProperty.call(message, ".google.api.methodSignature")) { + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) { + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"], long + 1); if (error) return ".google.longrunning.operationInfo." + error; @@ -68263,8 +66285,6 @@ MethodOptions.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.MethodOptions) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MethodOptions: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68293,7 +66313,7 @@ break; } if (object.features != null) { - if (!$util.isObject(object.features)) + if (typeof object.features !== "object") throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); } @@ -68302,13 +66322,13 @@ throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (!$util.isObject(object.uninterpretedOption[i])) + if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); } } if (object[".google.api.http"] != null) { - if (!$util.isObject(object[".google.api.http"])) + if (typeof object[".google.api.http"] !== "object") throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); } @@ -68320,7 +66340,7 @@ message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } if (object[".google.longrunning.operationInfo"] != null) { - if (!$util.isObject(object[".google.longrunning.operationInfo"])) + if (typeof object[".google.longrunning.operationInfo"] !== "object") throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"], long + 1); } @@ -68336,13 +66356,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options, q) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; @@ -68355,26 +66371,26 @@ object[".google.longrunning.operationInfo"] = null; object[".google.api.http"] = null; } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + if (message.idempotencyLevel != null && message.hasOwnProperty("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.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options, q + 1); + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options, q + 1); + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; @@ -68531,16 +66547,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer, q) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) @@ -68566,7 +66578,7 @@ * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -68662,7 +66674,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) { + if (message.name != null && message.hasOwnProperty("name")) { if (!Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { @@ -68671,22 +66683,22 @@ return "name." + error; } } - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) if (!$util.isString(message.identifierValue)) return "identifierValue: string expected"; - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) if (typeof message.doubleValue !== "number") return "doubleValue: number expected"; - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) return "stringValue: buffer expected"; - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) if (!$util.isString(message.aggregateValue)) return "aggregateValue: string expected"; return null; @@ -68703,8 +66715,6 @@ UninterpretedOption.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UninterpretedOption: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -68715,7 +66725,7 @@ throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); message.name = []; for (var i = 0; i < object.name.length; ++i) { - if (!$util.isObject(object.name[i])) + if (typeof object.name[i] !== "object") throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); } @@ -68724,7 +66734,7 @@ message.identifierValue = String(object.identifierValue); if (object.positiveIntValue != null) if ($util.Long) - message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue, true); + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; else if (typeof object.positiveIntValue === "string") message.positiveIntValue = parseInt(object.positiveIntValue, 10); else if (typeof object.positiveIntValue === "number") @@ -68733,7 +66743,7 @@ message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); if (object.negativeIntValue != null) if ($util.Long) - message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue, false); + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; else if (typeof object.negativeIntValue === "string") message.negativeIntValue = parseInt(object.negativeIntValue, 10); else if (typeof object.negativeIntValue === "number") @@ -68761,13 +66771,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options, q) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.name = []; @@ -68775,14 +66781,14 @@ object.identifierValue = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.positiveIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.positiveIntValue = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.negativeIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.negativeIntValue = options.longs === String ? "0" : 0; object.doubleValue = 0; if (options.bytes === String) object.stringValue = ""; @@ -68796,29 +66802,25 @@ if (message.name && message.name.length) { object.name = []; for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options, q + 1); + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); - else if (typeof message.positiveIntValue === "number") + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; else object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); - else if (typeof message.negativeIntValue === "number") + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; else object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) object.aggregateValue = message.aggregateValue; return object; }; @@ -68911,13 +66913,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer, q) { + NamePart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); return writer; @@ -68933,7 +66931,7 @@ * @returns {$protobuf.Writer} Writer */ NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -68973,9 +66971,9 @@ break; } } - if (!Object.hasOwnProperty.call(message, "namePart")) + if (!message.hasOwnProperty("namePart")) throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!Object.hasOwnProperty.call(message, "isExtension")) + if (!message.hasOwnProperty("isExtension")) throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; @@ -69029,8 +67027,6 @@ NamePart.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69052,21 +67048,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options, q) { + NamePart.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.namePart = ""; object.isExtension = false; } - if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) + if (message.namePart != null && message.hasOwnProperty("namePart")) object.namePart = message.namePart; - if (message.isExtension != null && Object.hasOwnProperty.call(message, "isExtension")) + if (message.isExtension != null && message.hasOwnProperty("isExtension")) object.isExtension = message.isExtension; return object; }; @@ -69219,13 +67211,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encode = function encode(message, writer, q) { + FeatureSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) @@ -69255,7 +67243,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -69353,7 +67341,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) switch (message.fieldPresence) { default: return "fieldPresence: enum value expected"; @@ -69363,7 +67351,7 @@ case 3: break; } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + if (message.enumType != null && message.hasOwnProperty("enumType")) switch (message.enumType) { default: return "enumType: enum value expected"; @@ -69372,7 +67360,7 @@ case 2: break; } - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) switch (message.repeatedFieldEncoding) { default: return "repeatedFieldEncoding: enum value expected"; @@ -69381,7 +67369,7 @@ case 2: break; } - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) switch (message.utf8Validation) { default: return "utf8Validation: enum value expected"; @@ -69390,7 +67378,7 @@ case 3: break; } - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) switch (message.messageEncoding) { default: return "messageEncoding: enum value expected"; @@ -69399,7 +67387,7 @@ case 2: break; } - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) switch (message.jsonFormat) { default: return "jsonFormat: enum value expected"; @@ -69408,7 +67396,7 @@ case 2: break; } - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) switch (message.enforceNamingStyle) { default: return "enforceNamingStyle: enum value expected"; @@ -69417,7 +67405,7 @@ case 2: break; } - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) switch (message.defaultSymbolVisibility) { default: return "defaultSymbolVisibility: enum value expected"; @@ -69442,8 +67430,6 @@ FeatureSet.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSet: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -69633,13 +67619,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options, q) { + FeatureSet.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; @@ -69651,21 +67633,21 @@ object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; } - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + if (message.enumType != null && message.hasOwnProperty("enumType")) object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -69854,13 +67836,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VisibilityFeature.encode = function encode(message, writer, q) { + VisibilityFeature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -69874,7 +67852,7 @@ * @returns {$protobuf.Writer} Writer */ VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -69954,6 +67932,10 @@ VisibilityFeature.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.FeatureSet.VisibilityFeature(); }; @@ -70094,16 +68076,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer, q) { + FeatureSetDefaults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.defaults != null && message.defaults.length) for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) @@ -70121,7 +68099,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -70201,7 +68179,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { + if (message.defaults != null && message.hasOwnProperty("defaults")) { if (!Array.isArray(message.defaults)) return "defaults: array expected"; for (var i = 0; i < message.defaults.length; ++i) { @@ -70210,7 +68188,7 @@ return "defaults." + error; } } - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) switch (message.minimumEdition) { default: return "minimumEdition: enum value expected"; @@ -70228,7 +68206,7 @@ case 2147483647: break; } - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) switch (message.maximumEdition) { default: return "maximumEdition: enum value expected"; @@ -70260,8 +68238,6 @@ FeatureSetDefaults.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70272,7 +68248,7 @@ throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); message.defaults = []; for (var i = 0; i < object.defaults.length; ++i) { - if (!$util.isObject(object.defaults[i])) + if (typeof object.defaults[i] !== "object") throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); } @@ -70401,13 +68377,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options, q) { + FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.defaults = []; @@ -70418,11 +68390,11 @@ if (message.defaults && message.defaults.length) { object.defaults = []; for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); } - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; @@ -70524,19 +68496,15 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetEditionDefault.encode = function encode(message, writer, q) { + FeatureSetEditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -70550,7 +68518,7 @@ * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -70628,7 +68596,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: return "edition: enum value expected"; @@ -70646,12 +68614,12 @@ case 2147483647: break; } - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); if (error) return "overridableFeatures." + error; } - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); if (error) return "fixedFeatures." + error; @@ -70670,8 +68638,6 @@ FeatureSetEditionDefault.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70734,12 +68700,12 @@ break; } if (object.overridableFeatures != null) { - if (!$util.isObject(object.overridableFeatures)) + if (typeof object.overridableFeatures !== "object") throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); } if (object.fixedFeatures != null) { - if (!$util.isObject(object.fixedFeatures)) + if (typeof object.fixedFeatures !== "object") throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); } @@ -70755,25 +68721,21 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetEditionDefault.toObject = function toObject(message, options, q) { + FeatureSetEditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; object.overridableFeatures = null; object.fixedFeatures = null; } - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -70863,16 +68825,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer, q) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -70886,7 +68844,7 @@ * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -70958,7 +68916,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.location != null && Object.hasOwnProperty.call(message, "location")) { + if (message.location != null && message.hasOwnProperty("location")) { if (!Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { @@ -70981,8 +68939,6 @@ SourceCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -70993,7 +68949,7 @@ throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); message.location = []; for (var i = 0; i < object.location.length; ++i) { - if (!$util.isObject(object.location[i])) + if (typeof object.location[i] !== "object") throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); } @@ -71010,20 +68966,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options, q) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { object.location = []; for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options, q + 1); + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } return object; }; @@ -71146,13 +69098,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer, q) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -71185,7 +69133,7 @@ * @returns {$protobuf.Writer} Writer */ Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -71287,27 +69235,27 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) { + if (message.path != null && message.hasOwnProperty("path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && Object.hasOwnProperty.call(message, "span")) { + if (message.span != null && message.hasOwnProperty("span")) { if (!Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) return "span: integer[] expected"; } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) if (!$util.isString(message.leadingComments)) return "leadingComments: string expected"; - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) if (!$util.isString(message.trailingComments)) return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { if (!Array.isArray(message.leadingDetachedComments)) return "leadingDetachedComments: array expected"; for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -71328,8 +69276,6 @@ Location.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71372,13 +69318,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options, q) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) { object.path = []; @@ -71399,9 +69341,9 @@ for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) object.leadingComments = message.leadingComments; - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) object.trailingComments = message.trailingComments; if (message.leadingDetachedComments && message.leadingDetachedComments.length) { object.leadingDetachedComments = []; @@ -71497,16 +69439,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer, q) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.annotation != null && message.annotation.length) for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -71520,7 +69458,7 @@ * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -71592,7 +69530,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { + if (message.annotation != null && message.hasOwnProperty("annotation")) { if (!Array.isArray(message.annotation)) return "annotation: array expected"; for (var i = 0; i < message.annotation.length; ++i) { @@ -71615,8 +69553,6 @@ GeneratedCodeInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71627,7 +69563,7 @@ throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); message.annotation = []; for (var i = 0; i < object.annotation.length; ++i) { - if (!$util.isObject(object.annotation[i])) + if (typeof object.annotation[i] !== "object") throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); } @@ -71644,20 +69580,16 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options, q) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.annotation = []; if (message.annotation && message.annotation.length) { object.annotation = []; for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options, q + 1); + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; @@ -71778,13 +69710,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer, q) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) @@ -71812,7 +69740,7 @@ * @returns {$protobuf.Writer} Writer */ Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -71905,23 +69833,23 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) { + if (message.path != null && message.hasOwnProperty("path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) if (!$util.isString(message.sourceFile)) return "sourceFile: string expected"; - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + if (message.begin != null && message.hasOwnProperty("begin")) if (!$util.isInteger(message.begin)) return "begin: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + if (message.semantic != null && message.hasOwnProperty("semantic")) switch (message.semantic) { default: return "semantic: enum value expected"; @@ -71944,8 +69872,6 @@ Annotation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -71996,13 +69922,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options, q) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.path = []; @@ -72017,13 +69939,13 @@ for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) object.sourceFile = message.sourceFile; - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + if (message.begin != null && message.hasOwnProperty("begin")) object.begin = message.begin; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + if (message.semantic != null && message.hasOwnProperty("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; }; @@ -72154,13 +70076,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer, q) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -72178,7 +70096,7 @@ * @returns {$protobuf.Writer} Writer */ Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -72252,10 +70170,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (message.seconds != null && message.hasOwnProperty("seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -72272,8 +70190,6 @@ Duration.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Duration) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Duration: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72281,7 +70197,7 @@ var message = new $root.google.protobuf.Duration(); if (object.seconds != null) if ($util.Long) - message.seconds = $util.Long.fromValue(object.seconds, false); + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -72302,30 +70218,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options, q) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.seconds = options.longs === String ? "0" : 0; object.nanos = 0; } - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); - else if (typeof message.seconds === "number") + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) object.nanos = message.nanos; return object; }; @@ -72421,13 +70331,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer, q) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); if (message.value != null && Object.hasOwnProperty.call(message, "value")) @@ -72445,7 +70351,7 @@ * @returns {$protobuf.Writer} Writer */ Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -72519,10 +70425,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + if (message.type_url != null && message.hasOwnProperty("type_url")) if (!$util.isString(message.type_url)) return "type_url: string expected"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -72539,8 +70445,6 @@ Any.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Any) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Any: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72565,13 +70469,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options, q) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.type_url = ""; @@ -72583,9 +70483,9 @@ object.value = $util.newBuffer(object.value); } } - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + if (message.type_url != null && message.hasOwnProperty("type_url")) object.type_url = message.type_url; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -72663,13 +70563,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, writer, q) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); return writer; }; @@ -72683,7 +70579,7 @@ * @returns {$protobuf.Writer} Writer */ Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -72763,6 +70659,10 @@ Empty.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Empty) return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); return new $root.google.protobuf.Empty(); }; @@ -72870,13 +70770,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer, q) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) @@ -72894,7 +70790,7 @@ * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -72968,10 +70864,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (message.seconds != null && message.hasOwnProperty("seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; @@ -72988,8 +70884,6 @@ Timestamp.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Timestamp) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Timestamp: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -72997,7 +70891,7 @@ var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) - message.seconds = $util.Long.fromValue(object.seconds, false); + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") @@ -73018,30 +70912,24 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options, q) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; + object.seconds = options.longs === String ? "0" : 0; object.nanos = 0; } - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); - else if (typeof message.seconds === "number") + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) object.nanos = message.nanos; return object; }; @@ -73128,13 +71016,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encode = function encode(message, writer, q) { + DoubleValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; @@ -73150,7 +71034,7 @@ * @returns {$protobuf.Writer} Writer */ DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -73220,7 +71104,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -73237,8 +71121,6 @@ DoubleValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.DoubleValue) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DoubleValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73258,17 +71140,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options, q) { + DoubleValue.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -73355,13 +71233,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encode = function encode(message, writer, q) { + FloatValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; @@ -73377,7 +71251,7 @@ * @returns {$protobuf.Writer} Writer */ FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -73447,7 +71321,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; return null; @@ -73464,8 +71338,6 @@ FloatValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FloatValue) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FloatValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73485,17 +71357,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options, q) { + FloatValue.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; @@ -73582,13 +71450,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64Value.encode = function encode(message, writer, q) { + Int64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; @@ -73604,7 +71468,7 @@ * @returns {$protobuf.Writer} Writer */ Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -73674,7 +71538,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -73691,8 +71555,6 @@ Int64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int64Value) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Int64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73700,7 +71562,7 @@ var message = new $root.google.protobuf.Int64Value(); if (object.value != null) if ($util.Long) - message.value = $util.Long.fromValue(object.value, false); + (message.value = $util.Long.fromValue(object.value)).unsigned = false; else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -73719,24 +71581,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64Value.toObject = function toObject(message, options, q) { + Int64Value.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, false).toBigInt(); - else if (typeof message.value === "number") + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; @@ -73825,13 +71681,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encode = function encode(message, writer, q) { + UInt64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; @@ -73847,7 +71699,7 @@ * @returns {$protobuf.Writer} Writer */ UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -73917,7 +71769,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; @@ -73934,8 +71786,6 @@ UInt64Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt64Value) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UInt64Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -73943,7 +71793,7 @@ var message = new $root.google.protobuf.UInt64Value(); if (object.value != null) if ($util.Long) - message.value = $util.Long.fromValue(object.value, true); + (message.value = $util.Long.fromValue(object.value)).unsigned = true; else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") @@ -73962,24 +71812,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options, q) { + UInt64Value.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.value = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.value = typeof message.value === "number" ? BigInt(message.value) : $util.Long.fromBits(message.value.low >>> 0, message.value.high >>> 0, true).toBigInt(); - else if (typeof message.value === "number") + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; @@ -74068,13 +71912,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int32Value.encode = function encode(message, writer, q) { + Int32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; @@ -74090,7 +71930,7 @@ * @returns {$protobuf.Writer} Writer */ Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -74160,7 +72000,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -74177,8 +72017,6 @@ Int32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.Int32Value) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Int32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74198,17 +72036,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options, q) { + Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -74295,13 +72129,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encode = function encode(message, writer, q) { + UInt32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; @@ -74317,7 +72147,7 @@ * @returns {$protobuf.Writer} Writer */ UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -74387,7 +72217,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; @@ -74404,8 +72234,6 @@ UInt32Value.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.UInt32Value) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UInt32Value: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74425,17 +72253,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options, q) { + UInt32Value.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = 0; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -74522,13 +72346,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encode = function encode(message, writer, q) { + BoolValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; @@ -74544,7 +72364,7 @@ * @returns {$protobuf.Writer} Writer */ BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -74614,7 +72434,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; @@ -74631,8 +72451,6 @@ BoolValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BoolValue) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.BoolValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74652,17 +72470,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options, q) { + BoolValue.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = false; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -74749,13 +72563,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encode = function encode(message, writer, q) { + StringValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; @@ -74771,7 +72581,7 @@ * @returns {$protobuf.Writer} Writer */ StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -74841,7 +72651,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; @@ -74858,8 +72668,6 @@ StringValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.StringValue) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.StringValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -74879,17 +72687,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options, q) { + StringValue.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.value = ""; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; @@ -74976,13 +72780,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encode = function encode(message, writer, q) { + BytesValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; @@ -74998,7 +72798,7 @@ * @returns {$protobuf.Writer} Writer */ BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -75068,7 +72868,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; @@ -75085,8 +72885,6 @@ BytesValue.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.BytesValue) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.BytesValue: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75109,13 +72907,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options, q) { + BytesValue.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) if (options.bytes === String) @@ -75125,7 +72919,7 @@ if (options.bytes !== Array) object.value = $util.newBuffer(object.value); } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) + if (message.value != null && message.hasOwnProperty("value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; @@ -75213,13 +73007,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer, q) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.paths != null && message.paths.length) for (var i = 0; i < message.paths.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); @@ -75236,7 +73026,7 @@ * @returns {$protobuf.Writer} Writer */ FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -75308,7 +73098,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.paths != null && Object.hasOwnProperty.call(message, "paths")) { + if (message.paths != null && message.hasOwnProperty("paths")) { if (!Array.isArray(message.paths)) return "paths: array expected"; for (var i = 0; i < message.paths.length; ++i) @@ -75329,8 +73119,6 @@ FieldMask.fromObject = function fromObject(object, long) { if (object instanceof $root.google.protobuf.FieldMask) return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldMask: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75355,13 +73143,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options, q) { + FieldMask.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.paths = []; @@ -75466,7 +73250,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); }, "name", { value: "ListOperations" }); /** @@ -75499,7 +73283,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "GetOperation" }); /** @@ -75532,7 +73316,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteOperation" }); /** @@ -75565,7 +73349,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "CancelOperation" }); /** @@ -75598,7 +73382,7 @@ * @variation 1 */ Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "WaitOperation" }); /** @@ -75717,23 +73501,19 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Operation.encode = function encode(message, writer, q) { + Operation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -75747,7 +73527,7 @@ * @returns {$protobuf.Writer} Writer */ Operation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -75834,18 +73614,18 @@ if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; var properties = {}; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) { + if (message.metadata != null && message.hasOwnProperty("metadata")) { var error = $root.google.protobuf.Any.verify(message.metadata, long + 1); if (error) return "metadata." + error; } - if (message.done != null && Object.hasOwnProperty.call(message, "done")) + if (message.done != null && message.hasOwnProperty("done")) if (typeof message.done !== "boolean") return "done: boolean expected"; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { + if (message.error != null && message.hasOwnProperty("error")) { properties.result = 1; { var error = $root.google.rpc.Status.verify(message.error, long + 1); @@ -75853,7 +73633,7 @@ return "error." + error; } } - if (message.response != null && Object.hasOwnProperty.call(message, "response")) { + if (message.response != null && message.hasOwnProperty("response")) { if (properties.result === 1) return "result: multiple values"; properties.result = 1; @@ -75877,8 +73657,6 @@ Operation.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.Operation) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.Operation: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -75887,19 +73665,19 @@ if (object.name != null) message.name = String(object.name); if (object.metadata != null) { - if (!$util.isObject(object.metadata)) + if (typeof object.metadata !== "object") throw TypeError(".google.longrunning.Operation.metadata: object expected"); message.metadata = $root.google.protobuf.Any.fromObject(object.metadata, long + 1); } if (object.done != null) message.done = Boolean(object.done); if (object.error != null) { - if (!$util.isObject(object.error)) + if (typeof object.error !== "object") throw TypeError(".google.longrunning.Operation.error: object expected"); message.error = $root.google.rpc.Status.fromObject(object.error, long + 1); } if (object.response != null) { - if (!$util.isObject(object.response)) + if (typeof object.response !== "object") throw TypeError(".google.longrunning.Operation.response: object expected"); message.response = $root.google.protobuf.Any.fromObject(object.response, long + 1); } @@ -75915,32 +73693,28 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Operation.toObject = function toObject(message, options, q) { + Operation.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.metadata = null; object.done = false; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options, q + 1); - if (message.done != null && Object.hasOwnProperty.call(message, "done")) + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) object.done = message.done; - if (message.error != null && Object.hasOwnProperty.call(message, "error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options, q + 1); + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); if (options.oneofs) object.result = "error"; } - if (message.response != null && Object.hasOwnProperty.call(message, "response")) { - object.response = $root.google.protobuf.Any.toObject(message.response, options, q + 1); + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); if (options.oneofs) object.result = "response"; } @@ -76029,13 +73803,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOperationRequest.encode = function encode(message, writer, q) { + GetOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -76051,7 +73821,7 @@ * @returns {$protobuf.Writer} Writer */ GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -76121,7 +73891,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -76138,8 +73908,6 @@ GetOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.GetOperationRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.GetOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76159,17 +73927,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOperationRequest.toObject = function toObject(message, options, q) { + GetOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -76283,13 +74047,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsRequest.encode = function encode(message, writer, q) { + ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) @@ -76311,7 +74071,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -76393,16 +74153,16 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; return null; @@ -76419,8 +74179,6 @@ ListOperationsRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.ListOperationsRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76446,13 +74204,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsRequest.toObject = function toObject(message, options, q) { + ListOperationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.filter = ""; @@ -76460,13 +74214,13 @@ object.pageToken = ""; object.name = ""; } - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -76563,16 +74317,12 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOperationsResponse.encode = function encode(message, writer, q) { + ListOperationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.operations != null && message.operations.length) for (var i = 0; i < message.operations.length; ++i) - $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; @@ -76588,7 +74338,7 @@ * @returns {$protobuf.Writer} Writer */ ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -76664,7 +74414,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.operations != null && Object.hasOwnProperty.call(message, "operations")) { + if (message.operations != null && message.hasOwnProperty("operations")) { if (!Array.isArray(message.operations)) return "operations: array expected"; for (var i = 0; i < message.operations.length; ++i) { @@ -76673,7 +74423,7 @@ return "operations." + error; } } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; return null; @@ -76690,8 +74440,6 @@ ListOperationsResponse.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.ListOperationsResponse: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76702,7 +74450,7 @@ throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); message.operations = []; for (var i = 0; i < object.operations.length; ++i) { - if (!$util.isObject(object.operations[i])) + if (typeof object.operations[i] !== "object") throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i], long + 1); } @@ -76721,13 +74469,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOperationsResponse.toObject = function toObject(message, options, q) { + ListOperationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.operations = []; @@ -76736,9 +74480,9 @@ if (message.operations && message.operations.length) { object.operations = []; for (var j = 0; j < message.operations.length; ++j) - object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options, q + 1); + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; return object; }; @@ -76825,13 +74569,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelOperationRequest.encode = function encode(message, writer, q) { + CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -76847,7 +74587,7 @@ * @returns {$protobuf.Writer} Writer */ CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -76917,7 +74657,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -76934,8 +74674,6 @@ CancelOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.CancelOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -76955,17 +74693,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelOperationRequest.toObject = function toObject(message, options, q) { + CancelOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -77052,13 +74786,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteOperationRequest.encode = function encode(message, writer, q) { + DeleteOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; @@ -77074,7 +74804,7 @@ * @returns {$protobuf.Writer} Writer */ DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -77144,7 +74874,7 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; @@ -77161,8 +74891,6 @@ DeleteOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.DeleteOperationRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.DeleteOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77182,17 +74910,13 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteOperationRequest.toObject = function toObject(message, options, q) { + DeleteOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; @@ -77288,17 +75012,13 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WaitOperationRequest.encode = function encode(message, writer, q) { + WaitOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -77312,7 +75032,7 @@ * @returns {$protobuf.Writer} Writer */ WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -77386,10 +75106,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) { + if (message.timeout != null && message.hasOwnProperty("timeout")) { var error = $root.google.protobuf.Duration.verify(message.timeout, long + 1); if (error) return "timeout." + error; @@ -77408,8 +75128,6 @@ WaitOperationRequest.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.WaitOperationRequest) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.WaitOperationRequest: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77418,7 +75136,7 @@ if (object.name != null) message.name = String(object.name); if (object.timeout != null) { - if (!$util.isObject(object.timeout)) + if (typeof object.timeout !== "object") throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout, long + 1); } @@ -77434,22 +75152,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WaitOperationRequest.toObject = function toObject(message, options, q) { + WaitOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.name = ""; object.timeout = null; } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options, q + 1); + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; @@ -77544,13 +75258,9 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationInfo.encode = function encode(message, writer, q) { + OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) @@ -77568,7 +75278,7 @@ * @returns {$protobuf.Writer} Writer */ OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -77642,10 +75352,10 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + if (message.responseType != null && message.hasOwnProperty("responseType")) if (!$util.isString(message.responseType)) return "responseType: string expected"; - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + if (message.metadataType != null && message.hasOwnProperty("metadataType")) if (!$util.isString(message.metadataType)) return "metadataType: string expected"; return null; @@ -77662,8 +75372,6 @@ OperationInfo.fromObject = function fromObject(object, long) { if (object instanceof $root.google.longrunning.OperationInfo) return object; - if (!$util.isObject(object)) - throw TypeError(".google.longrunning.OperationInfo: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77685,21 +75393,17 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationInfo.toObject = function toObject(message, options, q) { + OperationInfo.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.defaults) { object.responseType = ""; object.metadataType = ""; } - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + if (message.responseType != null && message.hasOwnProperty("responseType")) object.responseType = message.responseType; - if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + if (message.metadataType != null && message.hasOwnProperty("metadataType")) object.metadataType = message.metadataType; return object; }; @@ -77817,20 +75521,16 @@ * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer, q) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -77844,7 +75544,7 @@ * @returns {$protobuf.Writer} Writer */ Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); + return this.encode(message, writer).ldelim(); }; /** @@ -77924,13 +75624,13 @@ long = 0; if (long > $util.recursionLimit) return "maximum nesting depth exceeded"; - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected"; - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (message.message != null && message.hasOwnProperty("message")) if (!$util.isString(message.message)) return "message: string expected"; - if (message.details != null && Object.hasOwnProperty.call(message, "details")) { + if (message.details != null && message.hasOwnProperty("details")) { if (!Array.isArray(message.details)) return "details: array expected"; for (var i = 0; i < message.details.length; ++i) { @@ -77953,8 +75653,6 @@ Status.fromObject = function fromObject(object, long) { if (object instanceof $root.google.rpc.Status) return object; - if (!$util.isObject(object)) - throw TypeError(".google.rpc.Status: object expected"); if (long === undefined) long = 0; if (long > $util.recursionLimit) @@ -77969,7 +75667,7 @@ throw TypeError(".google.rpc.Status.details: array expected"); message.details = []; for (var i = 0; i < object.details.length; ++i) { - if (!$util.isObject(object.details[i])) + if (typeof object.details[i] !== "object") throw TypeError(".google.rpc.Status.details: object expected"); message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i], long + 1); } @@ -77986,13 +75684,9 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options, q) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); var object = {}; if (options.arrays || options.defaults) object.details = []; @@ -78000,14 +75694,14 @@ object.code = 0; object.message = ""; } - if (message.code != null && Object.hasOwnProperty.call(message, "code")) + if (message.code != null && message.hasOwnProperty("code")) object.code = message.code; - if (message.message != null && Object.hasOwnProperty.call(message, "message")) + if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; if (message.details && message.details.length) { object.details = []; for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options, q + 1); + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; diff --git a/packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav b/packages/google-cloud-speech/system-test/fixtures/streamingRecognize/input.wav new file mode 100644 index 0000000000000000000000000000000000000000..27a14fa7e3c5cee61020a78d3bd7c50cc98999ec GIT binary patch literal 113604 zcmeFZb$paZxGz5Q>bh@~Bm_us_u^0}E=5a#(m;Wh;!p|{3dNmLycGB1u0@J#&;;VH zo6Y*}D>HXCl;1h`o^$VCzdujrGw#nb&%CoU&o^K8=+^D}H3)`w8q#&#q?uI>002nL zt&spMyaoUT3}EaxGr!qJ%KXpY|4`t6DDXcN_#X-YfboA%h5s)7f8RO(@3Bug!TmS5 z3xBkq-2cA6|99%gmj0v6$2K9^)q{VZ`uUU^jDIx$wZ_NtpT-ib@!$V_Z1YpO|Gv!s zJN5tG_W!%yf6m4K{{7dq|D5vwclaY6KhpKT()1H$KhZeIg^%I?>{BE)Xo9))zu`~* zr@a3fr%Bmh>L;HC3<(GAe{cRH=VQ5G%OC6iM~JQ*!>2w!`k&_Te^Ty$=h?^A_1~|7 z|B#O$i_j-V{ToIk1!4KW7zs<2X`kFr{>PG^azDjB)&JPmr#^zQkAI*1kFyA-{h#ys zw;)OX6#D4P|Bes;JHlYk0v3r45cARXfVQ(tk|}E+VmFTvBPuD&11ze#$SctQD*qY{gO8Vg+#>|C(U0!G7J9 z#zWkX&HO#IQgERK!;kH)s?jqy}2zYl*KT zu9lSe&*oD+m>)F3+KS4WAKMF#GuV6ZPa?Aj^6?{=eT45mvJO737BBIgm21aNR$4h( zNx{`tgbQ&2&L<`hXXDIDla4cp`9Mr6u_=}21AhCjd4ZGgOZ@s@`vM2!FG%baen$MK z_<5!O0zbwNNcb^{J*!N6M#?=Q<{2rOR9Pnpzp1SEhWNqO-;kWw_#FwQ;P*KB-~QfL zjwM(knWP3sluAr8P9rA0(hd4SlR{#_-1N#4A1d=cmVZyesigLY%2qQ-D43E~+1oo( zFPWG(#J(dYm=kO%SR)VT5SvNdAf<9ErO`vE=Ogmv`d5-fLUZb09`J-OdSC@1zyxAJ zP0$#$0bhct;23xf7}yf7gC(#B)s^Z)@$_5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yB8oE-TRo9LOM>fg-aC zu`LGcwzXKfJwg_68`1X{WE5LLQ#*sq=mbW~GGs};DJObmALO+ik;$sbCzw^W? z&aoQ=y5rcV`@R;u2Y%antm@XFP2vazVZe?`lHdW@Z9gJEjt1eSCeCB>kOkid?dSvQ zytQl_c>sU%mH7z1?Uhhkw<^eEu*pGQzNf#i+rPPAPeu% z2mUU9jo-)5!}}M@ha<+;f#!D@--{oK9oZ}J=(h7hy!QfRCVup$clhi5s5R@wtN48G zBl`E>s6Ts+akPUw&i#RSc!PV!$@mzstYgs62l3nR9N+u?4XiHj@>h}ZWT3{{$UjF^ z-vd_2WBww)mT$+)@py01=k0Ktf6pbtBRm(}fgh3o=3(wR$DiPzB5w=ezEAlB7_DFo z;%xpWtoT;&jqq&U@V$s{i@a_!`uYW|5(I)0oJ+g`H>wRTcHHk6=8+NjF9V#EuZuBW zhaZ3wix0dMT!HmiCwc;{K^i)bdG)Q}8gj$o$TatW^%Nv{4I0}O#1bJgmICB8C;2!b-hNz5{*L>_IoWp3y#j5T-#?eDiVh$6Fh|UC$ocT}Cj27aN zn&JPOj$C>_#%2O~S*d^%(4Ym{aqA|s?q9%OYJ}XG!K&>4?}Gqe>px%q{oj9Q0Rj4l z%XcQw_s@TR5V-RF^ZVEDm;e0nk30T>!<&%fXIKYo0_4Y1cg9`&Ek@Nc*N`FH<( z9sj)jukZgRb^q7xe_i|MZ~pDs|M?33?Wh0w>vyI7zg@V%e|2F4|Erh(>QVmnvwuF@ b|L*ty{QCdrxBt~H|F>NG=X?IY_x-;C+;_l( literal 0 HcmV?d00001 diff --git a/packages/google-cloud-speech/system-test/speech_system_test.js b/packages/google-cloud-speech/system-test/speech_system_test.js new file mode 100644 index 000000000000..292de0cbd2ea --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_system_test.js @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const {describe, it} = require('mocha'); +const path = require('path'); +const speech = require(path.join(process.cwd(), 'build', 'src')); +const fs = require('fs'); + +describe('SpeechClient system test default', () => { + it('calls recognize', async () => { + const client = new speech.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = 'LINEAR16'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on('data', response => { + assert.match( + response.results[0].alternatives[0].transcript, + /test of streaming.*call/ + ); + gotResponse = true; + }); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +}); diff --git a/packages/google-cloud-speech/system-test/speech_system_test_v1.js b/packages/google-cloud-speech/system-test/speech_system_test_v1.js new file mode 100644 index 000000000000..78728558fc7c --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_system_test_v1.js @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const {describe, it} = require('mocha'); +const path = require('path'); +const speech = require(path.join(process.cwd(), 'build', 'src')); +const fs = require('fs'); + +describe('SpeechClient system test v1', () => { + it('calls recognize', async () => { + const client = new speech.v1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.v1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = 'LINEAR16'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.v1.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on('data', response => { + assert.match( + response.results[0].alternatives[0].transcript, + /test of streaming.*call/ + ); + gotResponse = true; + }); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +}); diff --git a/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js b/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js new file mode 100644 index 000000000000..19ca671458f3 --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_system_test_v1p1beta1.js @@ -0,0 +1,111 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const {describe, it} = require('mocha'); +const path = require('path'); +const speech = require(path.join(process.cwd(), 'build', 'src')); +const fs = require('fs'); + +describe('SpeechClient system test v1p1beta1', () => { + it('calls recognize', async () => { + const client = new speech.v1p1beta1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.v1p1beta1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = 'FLAC'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + audioChannelCount: 2, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri: uri, + }; + const request = { + config: config, + audio: audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual(response.results[0].alternatives[0].transcript, 'hello'); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = 'LINEAR16'; + const config = { + languageCode: languageCode, + sampleRateHertz: sampleRateHertz, + encoding: encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.v1p1beta1.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on('data', response => { + assert.match( + response.results[0].alternatives[0].transcript, + /test of streaming.*call/ + ); + gotResponse = true; + }); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts new file mode 100644 index 000000000000..e8a265f9c41d --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_typescript_system_test.ts @@ -0,0 +1,124 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import * as speech from '../src'; +import * as fs from 'fs'; +import * as path from 'path'; +import {google} from '../protos/protos'; + +describe('SpeechClient TypeScript system test default', () => { + it('calls recognize', async () => { + const client = new speech.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual( + response.results![0].alternatives![0].transcript, + 'hello' + ); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual( + response.results![0].alternatives![0].transcript, + 'hello' + ); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; + const config = { + languageCode, + sampleRateHertz, + encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on( + 'data', + (response: google.cloud.speech.v1.IStreamingRecognizeResponse) => { + assert.match( + response.results![0].alternatives![0].transcript ?? '', + /test of streaming.*call/ + ); + gotResponse = true; + } + ); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts new file mode 100644 index 000000000000..d502f61cbd07 --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1.ts @@ -0,0 +1,124 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import * as speech from '../src'; +import * as fs from 'fs'; +import * as path from 'path'; +import {google} from '../protos/protos'; + +describe('SpeechClient TypeScript system test v1', () => { + it('calls recognize', async () => { + const client = new speech.v1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual( + response.results![0]!.alternatives![0].transcript, + 'hello' + ); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.v1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual( + response.results![0].alternatives![0].transcript, + 'hello' + ); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; + const config = { + languageCode, + sampleRateHertz, + encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.v1.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on( + 'data', + (response: google.cloud.speech.v1.IStreamingRecognizeResponse) => { + assert.match( + response.results![0].alternatives![0].transcript ?? '', + /test of streaming.*call/ + ); + gotResponse = true; + } + ); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +}); diff --git a/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts new file mode 100644 index 000000000000..d710f571ae4a --- /dev/null +++ b/packages/google-cloud-speech/system-test/speech_typescript_system_test_v1p1beta1.ts @@ -0,0 +1,124 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as assert from 'assert'; +import {describe, it} from 'mocha'; +import * as speech from '../src'; +import * as fs from 'fs'; +import * as path from 'path'; +import {google} from '../protos/protos'; + +describe('SpeechClient TypeScript system test v1p1beta1', () => { + it('calls recognize', async () => { + const client = new speech.v1p1beta1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [response] = await client.recognize(request); + assert.strictEqual( + response.results![0].alternatives![0].transcript, + 'hello' + ); + }); + + it('calls longRunningRecognize', async () => { + const client = new speech.v1p1beta1.SpeechClient(); + + const languageCode = 'en-US'; + const sampleRateHertz = 44100; + const encoding = + google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding.FLAC; + const audioChannelCount = 2; + const config = { + languageCode, + sampleRateHertz, + encoding, + audioChannelCount, + }; + const uri = 'gs://cloud-samples-data/speech/hello.flac'; + const audio = { + uri, + }; + const request = { + config, + audio, + }; + const [operation] = await client.longRunningRecognize(request); + const [response] = await operation.promise(); + assert.strictEqual( + response.results![0].alternatives![0].transcript, + 'hello' + ); + }); + + it('calls streamingRecognize', done => { + const filename = path.join( + 'system-test', + 'fixtures', + 'streamingRecognize', + 'input.wav' + ); + + const languageCode = 'en-US'; + const sampleRateHertz = 24000; + const encoding = + google.cloud.speech.v1.RecognitionConfig.AudioEncoding.LINEAR16; + const config = { + languageCode, + sampleRateHertz, + encoding, + }; + const request = { + config, + interimResults: false, + }; + + const client = new speech.v1p1beta1.SpeechClient(); + const stream = client.streamingRecognize(request); + let gotResponse = false; + stream.on( + 'data', + (response: google.cloud.speech.v1p1beta1.IStreamingRecognizeResponse) => { + assert.match( + response.results![0].alternatives![0].transcript ?? '', + /test of streaming.*call/ + ); + gotResponse = true; + } + ); + stream.on('end', () => { + assert(gotResponse); + done(); + }); + stream.on('error', done); + fs.createReadStream(filename).pipe(stream); + }); +});