diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 4d586c42..0c6d0002 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e -# created: 2022-08-26T22:34:55.905845397Z + digest: sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e diff --git a/protos/protos.d.ts b/protos/protos.d.ts index cdac5324..57038cad 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/protos/protos.js b/protos/protos.js index ff9082ec..4099dd69 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1430,6 +1430,12 @@ return object; var message = new $root.google.cloud.vision.v1.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -1509,7 +1515,7 @@ object.model = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.Feature.Type[message.type] : message.type; if (message.maxResults != null && message.hasOwnProperty("maxResults")) object.maxResults = message.maxResults; if (message.model != null && message.hasOwnProperty("model")) @@ -2559,6 +2565,12 @@ if (object.landmarkingConfidence != null) message.landmarkingConfidence = Number(object.landmarkingConfidence); switch (object.joyLikelihood) { + default: + if (typeof object.joyLikelihood === "number") { + message.joyLikelihood = object.joyLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.joyLikelihood = 0; @@ -2585,6 +2597,12 @@ break; } switch (object.sorrowLikelihood) { + default: + if (typeof object.sorrowLikelihood === "number") { + message.sorrowLikelihood = object.sorrowLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.sorrowLikelihood = 0; @@ -2611,6 +2629,12 @@ break; } switch (object.angerLikelihood) { + default: + if (typeof object.angerLikelihood === "number") { + message.angerLikelihood = object.angerLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.angerLikelihood = 0; @@ -2637,6 +2661,12 @@ break; } switch (object.surpriseLikelihood) { + default: + if (typeof object.surpriseLikelihood === "number") { + message.surpriseLikelihood = object.surpriseLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.surpriseLikelihood = 0; @@ -2663,6 +2693,12 @@ break; } switch (object.underExposedLikelihood) { + default: + if (typeof object.underExposedLikelihood === "number") { + message.underExposedLikelihood = object.underExposedLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.underExposedLikelihood = 0; @@ -2689,6 +2725,12 @@ break; } switch (object.blurredLikelihood) { + default: + if (typeof object.blurredLikelihood === "number") { + message.blurredLikelihood = object.blurredLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.blurredLikelihood = 0; @@ -2715,6 +2757,12 @@ break; } switch (object.headwearLikelihood) { + default: + if (typeof object.headwearLikelihood === "number") { + message.headwearLikelihood = object.headwearLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.headwearLikelihood = 0; @@ -2794,19 +2842,19 @@ if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence")) object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence; if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood")) - object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.joyLikelihood] : message.joyLikelihood; + object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1.Likelihood[message.joyLikelihood] : message.joyLikelihood; if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood")) - object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; + object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood")) - object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.angerLikelihood] : message.angerLikelihood; + object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1.Likelihood[message.angerLikelihood] : message.angerLikelihood; if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood")) - object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; + object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood")) - object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; + object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood")) - object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; + object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood")) - object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; + object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; return object; }; @@ -3046,6 +3094,12 @@ return object; var message = new $root.google.cloud.vision.v1.FaceAnnotation.Landmark(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_LANDMARK": case 0: message.type = 0; @@ -3221,7 +3275,7 @@ object.position = null; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1.FaceAnnotation.Landmark.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.FaceAnnotation.Landmark.Type[message.type] : message.type; if (message.position != null && message.hasOwnProperty("position")) object.position = $root.google.cloud.vision.v1.Position.toObject(message.position, options); return object; @@ -4820,6 +4874,12 @@ return object; var message = new $root.google.cloud.vision.v1.SafeSearchAnnotation(); switch (object.adult) { + default: + if (typeof object.adult === "number") { + message.adult = object.adult; + break; + } + break; case "UNKNOWN": case 0: message.adult = 0; @@ -4846,6 +4906,12 @@ break; } switch (object.spoof) { + default: + if (typeof object.spoof === "number") { + message.spoof = object.spoof; + break; + } + break; case "UNKNOWN": case 0: message.spoof = 0; @@ -4872,6 +4938,12 @@ break; } switch (object.medical) { + default: + if (typeof object.medical === "number") { + message.medical = object.medical; + break; + } + break; case "UNKNOWN": case 0: message.medical = 0; @@ -4898,6 +4970,12 @@ break; } switch (object.violence) { + default: + if (typeof object.violence === "number") { + message.violence = object.violence; + break; + } + break; case "UNKNOWN": case 0: message.violence = 0; @@ -4924,6 +5002,12 @@ break; } switch (object.racy) { + default: + if (typeof object.racy === "number") { + message.racy = object.racy; + break; + } + break; case "UNKNOWN": case 0: message.racy = 0; @@ -4973,15 +5057,15 @@ object.racy = options.enums === String ? "UNKNOWN" : 0; } if (message.adult != null && message.hasOwnProperty("adult")) - object.adult = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.adult] : message.adult; + object.adult = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1.Likelihood[message.adult] : message.adult; if (message.spoof != null && message.hasOwnProperty("spoof")) - object.spoof = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.spoof] : message.spoof; + object.spoof = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1.Likelihood[message.spoof] : message.spoof; if (message.medical != null && message.hasOwnProperty("medical")) - object.medical = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.medical] : message.medical; + object.medical = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1.Likelihood[message.medical] : message.medical; if (message.violence != null && message.hasOwnProperty("violence")) - object.violence = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.violence] : message.violence; + object.violence = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1.Likelihood[message.violence] : message.violence; if (message.racy != null && message.hasOwnProperty("racy")) - object.racy = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.racy] : message.racy; + object.racy = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1.Likelihood[message.racy] : message.racy; return object; }; @@ -12785,6 +12869,12 @@ return object; var message = new $root.google.cloud.vision.v1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -12838,7 +12928,7 @@ object.updateTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1.OperationMetadata.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")) @@ -22132,6 +22222,12 @@ return object; var message = new $root.google.cloud.vision.v1.BatchOperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -22185,7 +22281,7 @@ object.endTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1.BatchOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1.BatchOperationMetadata.State[message.state] : message.state; if (message.submitTime != null && message.hasOwnProperty("submitTime")) object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) @@ -23398,6 +23494,12 @@ return object; var message = new $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -23446,7 +23548,7 @@ object.isPrefix = false; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; if (message.isPrefix != null && message.hasOwnProperty("isPrefix")) object.isPrefix = message.isPrefix; return object; @@ -24347,6 +24449,12 @@ } } switch (object.blockType) { + default: + if (typeof object.blockType === "number") { + message.blockType = object.blockType; + break; + } + break; case "UNKNOWN": case 0: message.blockType = 0; @@ -24408,7 +24516,7 @@ object.paragraphs[j] = $root.google.cloud.vision.v1.Paragraph.toObject(message.paragraphs[j], options); } if (message.blockType != null && message.hasOwnProperty("blockType")) - object.blockType = options.enums === String ? $root.google.cloud.vision.v1.Block.BlockType[message.blockType] : message.blockType; + object.blockType = options.enums === String ? $root.google.cloud.vision.v1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1.Block.BlockType[message.blockType] : message.blockType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; @@ -27828,6 +27936,12 @@ return object; var message = new $root.google.cloud.vision.v1p1beta1.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -27899,7 +28013,7 @@ object.model = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.Feature.Type[message.type] : message.type; if (message.maxResults != null && message.hasOwnProperty("maxResults")) object.maxResults = message.maxResults; if (message.model != null && message.hasOwnProperty("model")) @@ -28945,6 +29059,12 @@ if (object.landmarkingConfidence != null) message.landmarkingConfidence = Number(object.landmarkingConfidence); switch (object.joyLikelihood) { + default: + if (typeof object.joyLikelihood === "number") { + message.joyLikelihood = object.joyLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.joyLikelihood = 0; @@ -28971,6 +29091,12 @@ break; } switch (object.sorrowLikelihood) { + default: + if (typeof object.sorrowLikelihood === "number") { + message.sorrowLikelihood = object.sorrowLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.sorrowLikelihood = 0; @@ -28997,6 +29123,12 @@ break; } switch (object.angerLikelihood) { + default: + if (typeof object.angerLikelihood === "number") { + message.angerLikelihood = object.angerLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.angerLikelihood = 0; @@ -29023,6 +29155,12 @@ break; } switch (object.surpriseLikelihood) { + default: + if (typeof object.surpriseLikelihood === "number") { + message.surpriseLikelihood = object.surpriseLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.surpriseLikelihood = 0; @@ -29049,6 +29187,12 @@ break; } switch (object.underExposedLikelihood) { + default: + if (typeof object.underExposedLikelihood === "number") { + message.underExposedLikelihood = object.underExposedLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.underExposedLikelihood = 0; @@ -29075,6 +29219,12 @@ break; } switch (object.blurredLikelihood) { + default: + if (typeof object.blurredLikelihood === "number") { + message.blurredLikelihood = object.blurredLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.blurredLikelihood = 0; @@ -29101,6 +29251,12 @@ break; } switch (object.headwearLikelihood) { + default: + if (typeof object.headwearLikelihood === "number") { + message.headwearLikelihood = object.headwearLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.headwearLikelihood = 0; @@ -29180,19 +29336,19 @@ if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence")) object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence; if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood")) - object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; + object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood")) - object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; + object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood")) - object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; + object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood")) - object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; + object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood")) - object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; + object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood")) - object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; + object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood")) - object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; + object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; return object; }; @@ -29430,6 +29586,12 @@ return object; var message = new $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_LANDMARK": case 0: message.type = 0; @@ -29597,7 +29759,7 @@ object.position = null; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; if (message.position != null && message.hasOwnProperty("position")) object.position = $root.google.cloud.vision.v1p1beta1.Position.toObject(message.position, options); return object; @@ -30891,6 +31053,12 @@ return object; var message = new $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation(); switch (object.adult) { + default: + if (typeof object.adult === "number") { + message.adult = object.adult; + break; + } + break; case "UNKNOWN": case 0: message.adult = 0; @@ -30917,6 +31085,12 @@ break; } switch (object.spoof) { + default: + if (typeof object.spoof === "number") { + message.spoof = object.spoof; + break; + } + break; case "UNKNOWN": case 0: message.spoof = 0; @@ -30943,6 +31117,12 @@ break; } switch (object.medical) { + default: + if (typeof object.medical === "number") { + message.medical = object.medical; + break; + } + break; case "UNKNOWN": case 0: message.medical = 0; @@ -30969,6 +31149,12 @@ break; } switch (object.violence) { + default: + if (typeof object.violence === "number") { + message.violence = object.violence; + break; + } + break; case "UNKNOWN": case 0: message.violence = 0; @@ -30995,6 +31181,12 @@ break; } switch (object.racy) { + default: + if (typeof object.racy === "number") { + message.racy = object.racy; + break; + } + break; case "UNKNOWN": case 0: message.racy = 0; @@ -31044,15 +31236,15 @@ object.racy = options.enums === String ? "UNKNOWN" : 0; } if (message.adult != null && message.hasOwnProperty("adult")) - object.adult = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.adult] : message.adult; + object.adult = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p1beta1.Likelihood[message.adult] : message.adult; if (message.spoof != null && message.hasOwnProperty("spoof")) - object.spoof = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.spoof] : message.spoof; + object.spoof = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p1beta1.Likelihood[message.spoof] : message.spoof; if (message.medical != null && message.hasOwnProperty("medical")) - object.medical = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.medical] : message.medical; + object.medical = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p1beta1.Likelihood[message.medical] : message.medical; if (message.violence != null && message.hasOwnProperty("violence")) - object.violence = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.violence] : message.violence; + object.violence = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p1beta1.Likelihood[message.violence] : message.violence; if (message.racy != null && message.hasOwnProperty("racy")) - object.racy = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.racy] : message.racy; + object.racy = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p1beta1.Likelihood[message.racy] : message.racy; return object; }; @@ -35466,6 +35658,12 @@ return object; var message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -35514,7 +35712,7 @@ object.isPrefix = false; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; if (message.isPrefix != null && message.hasOwnProperty("isPrefix")) object.isPrefix = message.isPrefix; return object; @@ -36415,6 +36613,12 @@ } } switch (object.blockType) { + default: + if (typeof object.blockType === "number") { + message.blockType = object.blockType; + break; + } + break; case "UNKNOWN": case 0: message.blockType = 0; @@ -36476,7 +36680,7 @@ object.paragraphs[j] = $root.google.cloud.vision.v1p1beta1.Paragraph.toObject(message.paragraphs[j], options); } if (message.blockType != null && message.hasOwnProperty("blockType")) - object.blockType = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Block.BlockType[message.blockType] : message.blockType; + object.blockType = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p1beta1.Block.BlockType[message.blockType] : message.blockType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; @@ -40201,6 +40405,12 @@ return object; var message = new $root.google.cloud.vision.v1p2beta1.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -40272,7 +40482,7 @@ object.model = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.Feature.Type[message.type] : message.type; if (message.maxResults != null && message.hasOwnProperty("maxResults")) object.maxResults = message.maxResults; if (message.model != null && message.hasOwnProperty("model")) @@ -41318,6 +41528,12 @@ if (object.landmarkingConfidence != null) message.landmarkingConfidence = Number(object.landmarkingConfidence); switch (object.joyLikelihood) { + default: + if (typeof object.joyLikelihood === "number") { + message.joyLikelihood = object.joyLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.joyLikelihood = 0; @@ -41344,6 +41560,12 @@ break; } switch (object.sorrowLikelihood) { + default: + if (typeof object.sorrowLikelihood === "number") { + message.sorrowLikelihood = object.sorrowLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.sorrowLikelihood = 0; @@ -41370,6 +41592,12 @@ break; } switch (object.angerLikelihood) { + default: + if (typeof object.angerLikelihood === "number") { + message.angerLikelihood = object.angerLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.angerLikelihood = 0; @@ -41396,6 +41624,12 @@ break; } switch (object.surpriseLikelihood) { + default: + if (typeof object.surpriseLikelihood === "number") { + message.surpriseLikelihood = object.surpriseLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.surpriseLikelihood = 0; @@ -41422,6 +41656,12 @@ break; } switch (object.underExposedLikelihood) { + default: + if (typeof object.underExposedLikelihood === "number") { + message.underExposedLikelihood = object.underExposedLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.underExposedLikelihood = 0; @@ -41448,6 +41688,12 @@ break; } switch (object.blurredLikelihood) { + default: + if (typeof object.blurredLikelihood === "number") { + message.blurredLikelihood = object.blurredLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.blurredLikelihood = 0; @@ -41474,6 +41720,12 @@ break; } switch (object.headwearLikelihood) { + default: + if (typeof object.headwearLikelihood === "number") { + message.headwearLikelihood = object.headwearLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.headwearLikelihood = 0; @@ -41553,19 +41805,19 @@ if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence")) object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence; if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood")) - object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; + object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood")) - object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; + object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood")) - object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; + object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood")) - object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; + object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood")) - object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; + object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood")) - object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; + object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood")) - object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; + object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; return object; }; @@ -41803,6 +42055,12 @@ return object; var message = new $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_LANDMARK": case 0: message.type = 0; @@ -41970,7 +42228,7 @@ object.position = null; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; if (message.position != null && message.hasOwnProperty("position")) object.position = $root.google.cloud.vision.v1p2beta1.Position.toObject(message.position, options); return object; @@ -43264,6 +43522,12 @@ return object; var message = new $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation(); switch (object.adult) { + default: + if (typeof object.adult === "number") { + message.adult = object.adult; + break; + } + break; case "UNKNOWN": case 0: message.adult = 0; @@ -43290,6 +43554,12 @@ break; } switch (object.spoof) { + default: + if (typeof object.spoof === "number") { + message.spoof = object.spoof; + break; + } + break; case "UNKNOWN": case 0: message.spoof = 0; @@ -43316,6 +43586,12 @@ break; } switch (object.medical) { + default: + if (typeof object.medical === "number") { + message.medical = object.medical; + break; + } + break; case "UNKNOWN": case 0: message.medical = 0; @@ -43342,6 +43618,12 @@ break; } switch (object.violence) { + default: + if (typeof object.violence === "number") { + message.violence = object.violence; + break; + } + break; case "UNKNOWN": case 0: message.violence = 0; @@ -43368,6 +43650,12 @@ break; } switch (object.racy) { + default: + if (typeof object.racy === "number") { + message.racy = object.racy; + break; + } + break; case "UNKNOWN": case 0: message.racy = 0; @@ -43417,15 +43705,15 @@ object.racy = options.enums === String ? "UNKNOWN" : 0; } if (message.adult != null && message.hasOwnProperty("adult")) - object.adult = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.adult] : message.adult; + object.adult = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p2beta1.Likelihood[message.adult] : message.adult; if (message.spoof != null && message.hasOwnProperty("spoof")) - object.spoof = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.spoof] : message.spoof; + object.spoof = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p2beta1.Likelihood[message.spoof] : message.spoof; if (message.medical != null && message.hasOwnProperty("medical")) - object.medical = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.medical] : message.medical; + object.medical = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p2beta1.Likelihood[message.medical] : message.medical; if (message.violence != null && message.hasOwnProperty("violence")) - object.violence = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.violence] : message.violence; + object.violence = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p2beta1.Likelihood[message.violence] : message.violence; if (message.racy != null && message.hasOwnProperty("racy")) - object.racy = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.racy] : message.racy; + object.racy = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p2beta1.Likelihood[message.racy] : message.racy; return object; }; @@ -49710,6 +49998,12 @@ return object; var message = new $root.google.cloud.vision.v1p2beta1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -49763,7 +50057,7 @@ object.updateTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1p2beta1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1p2beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p2beta1.OperationMetadata.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")) @@ -50491,6 +50785,12 @@ return object; var message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -50539,7 +50839,7 @@ object.isPrefix = false; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; if (message.isPrefix != null && message.hasOwnProperty("isPrefix")) object.isPrefix = message.isPrefix; return object; @@ -51440,6 +51740,12 @@ } } switch (object.blockType) { + default: + if (typeof object.blockType === "number") { + message.blockType = object.blockType; + break; + } + break; case "UNKNOWN": case 0: message.blockType = 0; @@ -51501,7 +51807,7 @@ object.paragraphs[j] = $root.google.cloud.vision.v1p2beta1.Paragraph.toObject(message.paragraphs[j], options); } if (message.blockType != null && message.hasOwnProperty("blockType")) - object.blockType = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Block.BlockType[message.blockType] : message.blockType; + object.blockType = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p2beta1.Block.BlockType[message.blockType] : message.blockType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; @@ -55228,6 +55534,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -55307,7 +55619,7 @@ object.model = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.Feature.Type[message.type] : message.type; if (message.maxResults != null && message.hasOwnProperty("maxResults")) object.maxResults = message.maxResults; if (message.model != null && message.hasOwnProperty("model")) @@ -56357,6 +56669,12 @@ if (object.landmarkingConfidence != null) message.landmarkingConfidence = Number(object.landmarkingConfidence); switch (object.joyLikelihood) { + default: + if (typeof object.joyLikelihood === "number") { + message.joyLikelihood = object.joyLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.joyLikelihood = 0; @@ -56383,6 +56701,12 @@ break; } switch (object.sorrowLikelihood) { + default: + if (typeof object.sorrowLikelihood === "number") { + message.sorrowLikelihood = object.sorrowLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.sorrowLikelihood = 0; @@ -56409,6 +56733,12 @@ break; } switch (object.angerLikelihood) { + default: + if (typeof object.angerLikelihood === "number") { + message.angerLikelihood = object.angerLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.angerLikelihood = 0; @@ -56435,6 +56765,12 @@ break; } switch (object.surpriseLikelihood) { + default: + if (typeof object.surpriseLikelihood === "number") { + message.surpriseLikelihood = object.surpriseLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.surpriseLikelihood = 0; @@ -56461,6 +56797,12 @@ break; } switch (object.underExposedLikelihood) { + default: + if (typeof object.underExposedLikelihood === "number") { + message.underExposedLikelihood = object.underExposedLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.underExposedLikelihood = 0; @@ -56487,6 +56829,12 @@ break; } switch (object.blurredLikelihood) { + default: + if (typeof object.blurredLikelihood === "number") { + message.blurredLikelihood = object.blurredLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.blurredLikelihood = 0; @@ -56513,6 +56861,12 @@ break; } switch (object.headwearLikelihood) { + default: + if (typeof object.headwearLikelihood === "number") { + message.headwearLikelihood = object.headwearLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.headwearLikelihood = 0; @@ -56592,19 +56946,19 @@ if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence")) object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence; if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood")) - object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; + object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood")) - object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; + object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood")) - object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; + object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood")) - object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; + object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood")) - object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; + object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood")) - object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; + object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood")) - object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; + object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; return object; }; @@ -56842,6 +57196,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_LANDMARK": case 0: message.type = 0; @@ -57009,7 +57369,7 @@ object.position = null; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; if (message.position != null && message.hasOwnProperty("position")) object.position = $root.google.cloud.vision.v1p3beta1.Position.toObject(message.position, options); return object; @@ -58604,6 +58964,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation(); switch (object.adult) { + default: + if (typeof object.adult === "number") { + message.adult = object.adult; + break; + } + break; case "UNKNOWN": case 0: message.adult = 0; @@ -58630,6 +58996,12 @@ break; } switch (object.spoof) { + default: + if (typeof object.spoof === "number") { + message.spoof = object.spoof; + break; + } + break; case "UNKNOWN": case 0: message.spoof = 0; @@ -58656,6 +59028,12 @@ break; } switch (object.medical) { + default: + if (typeof object.medical === "number") { + message.medical = object.medical; + break; + } + break; case "UNKNOWN": case 0: message.medical = 0; @@ -58682,6 +59060,12 @@ break; } switch (object.violence) { + default: + if (typeof object.violence === "number") { + message.violence = object.violence; + break; + } + break; case "UNKNOWN": case 0: message.violence = 0; @@ -58708,6 +59092,12 @@ break; } switch (object.racy) { + default: + if (typeof object.racy === "number") { + message.racy = object.racy; + break; + } + break; case "UNKNOWN": case 0: message.racy = 0; @@ -58757,15 +59147,15 @@ object.racy = options.enums === String ? "UNKNOWN" : 0; } if (message.adult != null && message.hasOwnProperty("adult")) - object.adult = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.adult] : message.adult; + object.adult = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p3beta1.Likelihood[message.adult] : message.adult; if (message.spoof != null && message.hasOwnProperty("spoof")) - object.spoof = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.spoof] : message.spoof; + object.spoof = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p3beta1.Likelihood[message.spoof] : message.spoof; if (message.medical != null && message.hasOwnProperty("medical")) - object.medical = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.medical] : message.medical; + object.medical = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p3beta1.Likelihood[message.medical] : message.medical; if (message.violence != null && message.hasOwnProperty("violence")) - object.violence = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.violence] : message.violence; + object.violence = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p3beta1.Likelihood[message.violence] : message.violence; if (message.racy != null && message.hasOwnProperty("racy")) - object.racy = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.racy] : message.racy; + object.racy = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p3beta1.Likelihood[message.racy] : message.racy; return object; }; @@ -65172,6 +65562,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -65225,7 +65621,7 @@ object.updateTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p3beta1.OperationMetadata.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")) @@ -74486,6 +74882,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -74539,7 +74941,7 @@ object.endTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State[message.state] : message.state; if (message.submitTime != null && message.hasOwnProperty("submitTime")) object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) @@ -75245,6 +75647,12 @@ return object; var message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -75293,7 +75701,7 @@ object.isPrefix = false; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; if (message.isPrefix != null && message.hasOwnProperty("isPrefix")) object.isPrefix = message.isPrefix; return object; @@ -76194,6 +76602,12 @@ } } switch (object.blockType) { + default: + if (typeof object.blockType === "number") { + message.blockType = object.blockType; + break; + } + break; case "UNKNOWN": case 0: message.blockType = 0; @@ -76255,7 +76669,7 @@ object.paragraphs[j] = $root.google.cloud.vision.v1p3beta1.Paragraph.toObject(message.paragraphs[j], options); } if (message.blockType != null && message.hasOwnProperty("blockType")) - object.blockType = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Block.BlockType[message.blockType] : message.blockType; + object.blockType = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p3beta1.Block.BlockType[message.blockType] : message.blockType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; @@ -80749,6 +81163,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.Feature(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -80828,7 +81248,7 @@ object.model = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Feature.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.Feature.Type[message.type] : message.type; if (message.maxResults != null && message.hasOwnProperty("maxResults")) object.maxResults = message.maxResults; if (message.model != null && message.hasOwnProperty("model")) @@ -81928,6 +82348,12 @@ if (object.landmarkingConfidence != null) message.landmarkingConfidence = Number(object.landmarkingConfidence); switch (object.joyLikelihood) { + default: + if (typeof object.joyLikelihood === "number") { + message.joyLikelihood = object.joyLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.joyLikelihood = 0; @@ -81954,6 +82380,12 @@ break; } switch (object.sorrowLikelihood) { + default: + if (typeof object.sorrowLikelihood === "number") { + message.sorrowLikelihood = object.sorrowLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.sorrowLikelihood = 0; @@ -81980,6 +82412,12 @@ break; } switch (object.angerLikelihood) { + default: + if (typeof object.angerLikelihood === "number") { + message.angerLikelihood = object.angerLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.angerLikelihood = 0; @@ -82006,6 +82444,12 @@ break; } switch (object.surpriseLikelihood) { + default: + if (typeof object.surpriseLikelihood === "number") { + message.surpriseLikelihood = object.surpriseLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.surpriseLikelihood = 0; @@ -82032,6 +82476,12 @@ break; } switch (object.underExposedLikelihood) { + default: + if (typeof object.underExposedLikelihood === "number") { + message.underExposedLikelihood = object.underExposedLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.underExposedLikelihood = 0; @@ -82058,6 +82508,12 @@ break; } switch (object.blurredLikelihood) { + default: + if (typeof object.blurredLikelihood === "number") { + message.blurredLikelihood = object.blurredLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.blurredLikelihood = 0; @@ -82084,6 +82540,12 @@ break; } switch (object.headwearLikelihood) { + default: + if (typeof object.headwearLikelihood === "number") { + message.headwearLikelihood = object.headwearLikelihood; + break; + } + break; case "UNKNOWN": case 0: message.headwearLikelihood = 0; @@ -82175,19 +82637,19 @@ if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence")) object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence; if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood")) - object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; + object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood; if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood")) - object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; + object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood; if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood")) - object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; + object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood; if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood")) - object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; + object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood; if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood")) - object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; + object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood; if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood")) - object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; + object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood; if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood")) - object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; + object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood; if (message.recognitionResult && message.recognitionResult.length) { object.recognitionResult = []; for (var j = 0; j < message.recognitionResult.length; ++j) @@ -82430,6 +82892,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_LANDMARK": case 0: message.type = 0; @@ -82597,7 +83065,7 @@ object.position = null; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type[message.type] : message.type; if (message.position != null && message.hasOwnProperty("position")) object.position = $root.google.cloud.vision.v1p4beta1.Position.toObject(message.position, options); return object; @@ -84192,6 +84660,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation(); switch (object.adult) { + default: + if (typeof object.adult === "number") { + message.adult = object.adult; + break; + } + break; case "UNKNOWN": case 0: message.adult = 0; @@ -84218,6 +84692,12 @@ break; } switch (object.spoof) { + default: + if (typeof object.spoof === "number") { + message.spoof = object.spoof; + break; + } + break; case "UNKNOWN": case 0: message.spoof = 0; @@ -84244,6 +84724,12 @@ break; } switch (object.medical) { + default: + if (typeof object.medical === "number") { + message.medical = object.medical; + break; + } + break; case "UNKNOWN": case 0: message.medical = 0; @@ -84270,6 +84756,12 @@ break; } switch (object.violence) { + default: + if (typeof object.violence === "number") { + message.violence = object.violence; + break; + } + break; case "UNKNOWN": case 0: message.violence = 0; @@ -84296,6 +84788,12 @@ break; } switch (object.racy) { + default: + if (typeof object.racy === "number") { + message.racy = object.racy; + break; + } + break; case "UNKNOWN": case 0: message.racy = 0; @@ -84345,15 +84843,15 @@ object.racy = options.enums === String ? "UNKNOWN" : 0; } if (message.adult != null && message.hasOwnProperty("adult")) - object.adult = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.adult] : message.adult; + object.adult = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p4beta1.Likelihood[message.adult] : message.adult; if (message.spoof != null && message.hasOwnProperty("spoof")) - object.spoof = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.spoof] : message.spoof; + object.spoof = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p4beta1.Likelihood[message.spoof] : message.spoof; if (message.medical != null && message.hasOwnProperty("medical")) - object.medical = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.medical] : message.medical; + object.medical = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p4beta1.Likelihood[message.medical] : message.medical; if (message.violence != null && message.hasOwnProperty("violence")) - object.violence = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.violence] : message.violence; + object.violence = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p4beta1.Likelihood[message.violence] : message.violence; if (message.racy != null && message.hasOwnProperty("racy")) - object.racy = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.racy] : message.racy; + object.racy = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p4beta1.Likelihood[message.racy] : message.racy; return object; }; @@ -92089,6 +92587,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.OperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -92142,7 +92646,7 @@ object.updateTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.OperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p4beta1.OperationMetadata.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")) @@ -101436,6 +101940,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -101489,7 +101999,7 @@ object.endTime = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State[message.state] : message.state; if (message.submitTime != null && message.hasOwnProperty("submitTime")) object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) @@ -102702,6 +103212,12 @@ return object; var message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -102750,7 +103266,7 @@ object.isPrefix = false; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type; if (message.isPrefix != null && message.hasOwnProperty("isPrefix")) object.isPrefix = message.isPrefix; return object; @@ -103651,6 +104167,12 @@ } } switch (object.blockType) { + default: + if (typeof object.blockType === "number") { + message.blockType = object.blockType; + break; + } + break; case "UNKNOWN": case 0: message.blockType = 0; @@ -103712,7 +104234,7 @@ object.paragraphs[j] = $root.google.cloud.vision.v1p4beta1.Paragraph.toObject(message.paragraphs[j], options); } if (message.blockType != null && message.hasOwnProperty("blockType")) - object.blockType = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Block.BlockType[message.blockType] : message.blockType; + object.blockType = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p4beta1.Block.BlockType[message.blockType] : message.blockType; if (message.confidence != null && message.hasOwnProperty("confidence")) object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; @@ -107462,6 +107984,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -107486,6 +108014,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -107533,7 +108065,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -107541,7 +108073,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -110352,6 +110884,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -110366,6 +110904,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -110492,9 +111036,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -112841,6 +113385,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -112949,7 +113499,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -113751,6 +114301,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -113767,6 +114323,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -113805,6 +114367,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -113875,7 +114441,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -113883,7 +114449,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -113896,7 +114462,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -115273,6 +115839,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -115342,7 +115914,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -117097,6 +117669,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -117146,7 +117724,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; };