From ed40f4fba01c76c3616769488eefc08b843a04bf 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:52:37 +0000 Subject: [PATCH] fix: regenerated protos JS and TS definitions (#353) 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 --- .../google-cloud-gaming/protos/protos.d.ts | 2 +- packages/google-cloud-gaming/protos/protos.js | 124 +++++++++++++++--- 2 files changed, 109 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-gaming/protos/protos.d.ts b/packages/google-cloud-gaming/protos/protos.d.ts index 1f7ea36b8c9..33c855a872c 100644 --- a/packages/google-cloud-gaming/protos/protos.d.ts +++ b/packages/google-cloud-gaming/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/packages/google-cloud-gaming/protos/protos.js b/packages/google-cloud-gaming/protos/protos.js index 5c7512d2135..acd1081dece 100644 --- a/packages/google-cloud-gaming/protos/protos.js +++ b/packages/google-cloud-gaming/protos/protos.js @@ -719,6 +719,12 @@ if (object.done != null) message.done = Boolean(object.done); switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; case "ERROR_CODE_UNSPECIFIED": case 0: message.errorCode = 0; @@ -762,7 +768,7 @@ if (message.done != null && message.hasOwnProperty("done")) object.done = message.done; if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.gaming.v1.OperationStatus.ErrorCode[message.errorCode] : message.errorCode; + object.errorCode = options.enums === String ? $root.google.cloud.gaming.v1.OperationStatus.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.gaming.v1.OperationStatus.ErrorCode[message.errorCode] : message.errorCode; if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) object.errorMessage = message.errorMessage; return object; @@ -4360,6 +4366,12 @@ if (object.orderBy != null) message.orderBy = String(object.orderBy); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -4408,7 +4420,7 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] === undefined ? message.view : $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; return object; }; @@ -4905,6 +4917,12 @@ if (object.name != null) message.name = String(object.name); switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -4941,7 +4959,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] === undefined ? message.view : $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; return object; }; @@ -5475,6 +5493,12 @@ message.previewTime = $root.google.protobuf.Timestamp.fromObject(object.previewTime); } switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; case "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED": case 0: message.view = 0; @@ -5520,7 +5544,7 @@ if (message.previewTime != null && message.hasOwnProperty("previewTime")) object.previewTime = $root.google.protobuf.Timestamp.toObject(message.previewTime, options); if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.gaming.v1.GameServerClusterView[message.view] === undefined ? message.view : $root.google.cloud.gaming.v1.GameServerClusterView[message.view] : message.view; return object; }; @@ -8344,6 +8368,12 @@ if (object.kubernetesVersionInstalled != null) message.kubernetesVersionInstalled = String(object.kubernetesVersionInstalled); switch (object.installationState) { + default: + if (typeof object.installationState === "number") { + message.installationState = object.installationState; + break; + } + break; case "INSTALLATION_STATE_UNSPECIFIED": case 0: message.installationState = 0; @@ -8412,7 +8442,7 @@ if (message.kubernetesVersionInstalled != null && message.hasOwnProperty("kubernetesVersionInstalled")) object.kubernetesVersionInstalled = message.kubernetesVersionInstalled; if (message.installationState != null && message.hasOwnProperty("installationState")) - object.installationState = options.enums === String ? $root.google.cloud.gaming.v1.KubernetesClusterState.InstallationState[message.installationState] : message.installationState; + object.installationState = options.enums === String ? $root.google.cloud.gaming.v1.KubernetesClusterState.InstallationState[message.installationState] === undefined ? message.installationState : $root.google.cloud.gaming.v1.KubernetesClusterState.InstallationState[message.installationState] : message.installationState; if (message.versionInstalledErrorMessage != null && message.hasOwnProperty("versionInstalledErrorMessage")) object.versionInstalledErrorMessage = message.versionInstalledErrorMessage; if (message.provider != null && message.hasOwnProperty("provider")) @@ -18916,6 +18946,12 @@ if (object.done != null) message.done = Boolean(object.done); switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; case "ERROR_CODE_UNSPECIFIED": case 0: message.errorCode = 0; @@ -18959,7 +18995,7 @@ if (message.done != null && message.hasOwnProperty("done")) object.done = message.done; if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.gaming.v1beta.OperationStatus.ErrorCode[message.errorCode] : message.errorCode; + object.errorCode = options.enums === String ? $root.google.cloud.gaming.v1beta.OperationStatus.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.gaming.v1beta.OperationStatus.ErrorCode[message.errorCode] : message.errorCode; if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) object.errorMessage = message.errorMessage; return object; @@ -36212,6 +36248,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; @@ -36236,6 +36278,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; @@ -36283,7 +36329,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")) @@ -36291,7 +36337,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; }; @@ -40065,6 +40111,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; @@ -40079,6 +40131,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; @@ -40205,9 +40263,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")) @@ -42554,6 +42612,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; @@ -42662,7 +42726,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")) @@ -43464,6 +43528,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; @@ -43480,6 +43550,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; @@ -43518,6 +43594,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; @@ -43588,7 +43668,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")) @@ -43596,7 +43676,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")) @@ -43609,7 +43689,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); @@ -44986,6 +45066,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; @@ -45055,7 +45141,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) @@ -46810,6 +46896,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; @@ -46859,7 +46951,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; };