From 8eb6181996fdc36b21d48e9589e0a4ab35cf6874 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:56:19 +0000 Subject: [PATCH] fix: regenerated protos JS and TS definitions (#705) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .github/.OwlBot.lock.yaml | 3 +- protos/protos.d.ts | 2 +- protos/protos.js | 188 +++++++++++++++++++++++++++++++++----- 3 files changed, 166 insertions(+), 27 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 4d586c42..0c6d0002 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e -# created: 2022-08-26T22:34:55.905845397Z + digest: sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 853a996a..53b0b049 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 bb0777eb..dd14769c 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -6878,6 +6878,12 @@ return object; var message = new $root.google.cloud.automl.v1.DocumentDimensions(); switch (object.unit) { + default: + if (typeof object.unit === "number") { + message.unit = object.unit; + break; + } + break; case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": case 0: message.unit = 0; @@ -6921,7 +6927,7 @@ object.height = 0; } if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = options.enums === String ? $root.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; + object.unit = options.enums === String ? $root.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit[message.unit] === undefined ? message.unit : $root.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; if (message.width != null && message.hasOwnProperty("width")) object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; if (message.height != null && message.hasOwnProperty("height")) @@ -7539,6 +7545,12 @@ message.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.fromObject(object.boundingPoly); } switch (object.textSegmentType) { + default: + if (typeof object.textSegmentType === "number") { + message.textSegmentType = object.textSegmentType; + break; + } + break; case "TEXT_SEGMENT_TYPE_UNSPECIFIED": case 0: message.textSegmentType = 0; @@ -7609,7 +7621,7 @@ if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) object.boundingPoly = $root.google.cloud.automl.v1.BoundingPoly.toObject(message.boundingPoly, options); if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; + object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1.Document.Layout.TextSegmentType[message.textSegmentType] === undefined ? message.textSegmentType : $root.google.cloud.automl.v1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; return object; }; @@ -10891,6 +10903,12 @@ return object; var message = new $root.google.cloud.automl.v1.ImageClassificationDatasetMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -10923,7 +10941,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -12466,6 +12484,12 @@ return object; var message = new $root.google.cloud.automl.v1.TextClassificationDatasetMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -12498,7 +12522,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -12687,6 +12711,12 @@ return object; var message = new $root.google.cloud.automl.v1.TextClassificationModelMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -12719,7 +12749,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -14001,6 +14031,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.deploymentState) { + default: + if (typeof object.deploymentState === "number") { + message.deploymentState = object.deploymentState; + break; + } + break; case "DEPLOYMENT_STATE_UNSPECIFIED": case 0: message.deploymentState = 0; @@ -14059,7 +14095,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1.Model.DeploymentState[message.deploymentState] : message.deploymentState; + object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1.Model.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.automl.v1.Model.DeploymentState[message.deploymentState] : message.deploymentState; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; if (message.updateTime != null && message.hasOwnProperty("updateTime")) @@ -34711,6 +34747,12 @@ if (object.timeFormat != null) message.timeFormat = String(object.timeFormat); switch (object.typeCode) { + default: + if (typeof object.typeCode === "number") { + message.typeCode = object.typeCode; + break; + } + break; case "TYPE_CODE_UNSPECIFIED": case 0: message.typeCode = 0; @@ -34763,7 +34805,7 @@ object.nullable = false; } if (message.typeCode != null && message.hasOwnProperty("typeCode")) - object.typeCode = options.enums === String ? $root.google.cloud.automl.v1beta1.TypeCode[message.typeCode] : message.typeCode; + object.typeCode = options.enums === String ? $root.google.cloud.automl.v1beta1.TypeCode[message.typeCode] === undefined ? message.typeCode : $root.google.cloud.automl.v1beta1.TypeCode[message.typeCode] : message.typeCode; if (message.listElementType != null && message.hasOwnProperty("listElementType")) { object.listElementType = $root.google.cloud.automl.v1beta1.DataType.toObject(message.listElementType, options); if (options.oneofs) @@ -35784,6 +35826,12 @@ return object; var message = new $root.google.cloud.automl.v1beta1.DocumentDimensions(); switch (object.unit) { + default: + if (typeof object.unit === "number") { + message.unit = object.unit; + break; + } + break; case "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": case 0: message.unit = 0; @@ -35827,7 +35875,7 @@ object.height = 0; } if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = options.enums === String ? $root.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; + object.unit = options.enums === String ? $root.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit[message.unit] === undefined ? message.unit : $root.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit[message.unit] : message.unit; if (message.width != null && message.hasOwnProperty("width")) object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; if (message.height != null && message.hasOwnProperty("height")) @@ -36445,6 +36493,12 @@ message.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.fromObject(object.boundingPoly); } switch (object.textSegmentType) { + default: + if (typeof object.textSegmentType === "number") { + message.textSegmentType = object.textSegmentType; + break; + } + break; case "TEXT_SEGMENT_TYPE_UNSPECIFIED": case 0: message.textSegmentType = 0; @@ -36515,7 +36569,7 @@ if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) object.boundingPoly = $root.google.cloud.automl.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); if (message.textSegmentType != null && message.hasOwnProperty("textSegmentType")) - object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; + object.textSegmentType = options.enums === String ? $root.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType[message.textSegmentType] === undefined ? message.textSegmentType : $root.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType[message.textSegmentType] : message.textSegmentType; return object; }; @@ -44251,6 +44305,12 @@ return object; var message = new $root.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -44283,7 +44343,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -45826,6 +45886,12 @@ return object; var message = new $root.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -45858,7 +45924,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -46047,6 +46113,12 @@ return object; var message = new $root.google.cloud.automl.v1beta1.TextClassificationModelMetadata(); switch (object.classificationType) { + default: + if (typeof object.classificationType === "number") { + message.classificationType = object.classificationType; + break; + } + break; case "CLASSIFICATION_TYPE_UNSPECIFIED": case 0: message.classificationType = 0; @@ -46079,7 +46151,7 @@ if (options.defaults) object.classificationType = options.enums === String ? "CLASSIFICATION_TYPE_UNSPECIFIED" : 0; if (message.classificationType != null && message.hasOwnProperty("classificationType")) - object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; + object.classificationType = options.enums === String ? $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] === undefined ? message.classificationType : $root.google.cloud.automl.v1beta1.ClassificationType[message.classificationType] : message.classificationType; return object; }; @@ -48117,6 +48189,12 @@ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } switch (object.deploymentState) { + default: + if (typeof object.deploymentState === "number") { + message.deploymentState = object.deploymentState; + break; + } + break; case "DEPLOYMENT_STATE_UNSPECIFIED": case 0: message.deploymentState = 0; @@ -48163,7 +48241,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.deploymentState != null && message.hasOwnProperty("deploymentState")) - object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1beta1.Model.DeploymentState[message.deploymentState] : message.deploymentState; + object.deploymentState = options.enums === String ? $root.google.cloud.automl.v1beta1.Model.DeploymentState[message.deploymentState] === undefined ? message.deploymentState : $root.google.cloud.automl.v1beta1.Model.DeploymentState[message.deploymentState] : message.deploymentState; if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.imageClassificationModelMetadata != null && message.hasOwnProperty("imageClassificationModelMetadata")) { @@ -61870,6 +61948,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; @@ -61894,6 +61978,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; @@ -61941,7 +62029,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")) @@ -61949,7 +62037,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; }; @@ -65723,6 +65811,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; @@ -65737,6 +65831,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; @@ -65863,9 +65963,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")) @@ -68212,6 +68312,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; @@ -68320,7 +68426,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")) @@ -69122,6 +69228,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; @@ -69138,6 +69250,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; @@ -69176,6 +69294,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; @@ -69246,7 +69368,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")) @@ -69254,7 +69376,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")) @@ -69267,7 +69389,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); @@ -70644,6 +70766,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; @@ -70713,7 +70841,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) @@ -72468,6 +72596,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; @@ -72517,7 +72651,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; }; @@ -74213,6 +74347,12 @@ return object; var message = new $root.google.protobuf.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -74251,7 +74391,7 @@ options = {}; var object = {}; if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; }