diff --git a/packages/google-cloud-tpu/protos/protos.d.ts b/packages/google-cloud-tpu/protos/protos.d.ts index f34274cca99..c84e1e38650 100644 --- a/packages/google-cloud-tpu/protos/protos.d.ts +++ b/packages/google-cloud-tpu/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-tpu/protos/protos.js b/packages/google-cloud-tpu/protos/protos.js index 731cc3888e3..fcfa3ce6e6e 100644 --- a/packages/google-cloud-tpu/protos/protos.js +++ b/packages/google-cloud-tpu/protos/protos.js @@ -1486,6 +1486,12 @@ if (object.port != null) message.port = String(object.port); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -1578,6 +1584,12 @@ } } switch (object.health) { + default: + if (typeof object.health === "number") { + message.health = object.health; + break; + } + break; case "HEALTH_UNSPECIFIED": case 0: message.health = 0; @@ -1613,6 +1625,12 @@ if (object.useServiceNetworking != null) message.useServiceNetworking = Boolean(object.useServiceNetworking); switch (object.apiVersion) { + default: + if (typeof object.apiVersion === "number") { + message.apiVersion = object.apiVersion; + break; + } + break; case "API_VERSION_UNSPECIFIED": case 0: message.apiVersion = 0; @@ -1689,7 +1707,7 @@ if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) object.ipAddress = message.ipAddress; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.tpu.v1.Node.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.tpu.v1.Node.State[message.state] === undefined ? message.state : $root.google.cloud.tpu.v1.Node.State[message.state] : message.state; if (message.healthDescription != null && message.hasOwnProperty("healthDescription")) object.healthDescription = message.healthDescription; if (message.tensorflowVersion != null && message.hasOwnProperty("tensorflowVersion")) @@ -1712,7 +1730,7 @@ object.networkEndpoints[j] = $root.google.cloud.tpu.v1.NetworkEndpoint.toObject(message.networkEndpoints[j], options); } if (message.health != null && message.hasOwnProperty("health")) - object.health = options.enums === String ? $root.google.cloud.tpu.v1.Node.Health[message.health] : message.health; + object.health = options.enums === String ? $root.google.cloud.tpu.v1.Node.Health[message.health] === undefined ? message.health : $root.google.cloud.tpu.v1.Node.Health[message.health] : message.health; var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; @@ -1722,7 +1740,7 @@ if (message.useServiceNetworking != null && message.hasOwnProperty("useServiceNetworking")) object.useServiceNetworking = message.useServiceNetworking; if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = options.enums === String ? $root.google.cloud.tpu.v1.Node.ApiVersion[message.apiVersion] : message.apiVersion; + object.apiVersion = options.enums === String ? $root.google.cloud.tpu.v1.Node.ApiVersion[message.apiVersion] === undefined ? message.apiVersion : $root.google.cloud.tpu.v1.Node.ApiVersion[message.apiVersion] : message.apiVersion; if (message.symptoms && message.symptoms.length) { object.symptoms = []; for (var j = 0; j < message.symptoms.length; ++j) @@ -6273,6 +6291,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.symptomType) { + default: + if (typeof object.symptomType === "number") { + message.symptomType = object.symptomType; + break; + } + break; case "SYMPTOM_TYPE_UNSPECIFIED": case 0: message.symptomType = 0; @@ -6331,7 +6355,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.symptomType != null && message.hasOwnProperty("symptomType")) - object.symptomType = options.enums === String ? $root.google.cloud.tpu.v1.Symptom.SymptomType[message.symptomType] : message.symptomType; + object.symptomType = options.enums === String ? $root.google.cloud.tpu.v1.Symptom.SymptomType[message.symptomType] === undefined ? message.symptomType : $root.google.cloud.tpu.v1.Symptom.SymptomType[message.symptomType] : message.symptomType; if (message.details != null && message.hasOwnProperty("details")) object.details = message.details; if (message.workerId != null && message.hasOwnProperty("workerId")) @@ -7750,6 +7774,12 @@ if (object.sourceDisk != null) message.sourceDisk = String(object.sourceDisk); switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; case "DISK_MODE_UNSPECIFIED": case 0: message.mode = 0; @@ -7786,7 +7816,7 @@ if (message.sourceDisk != null && message.hasOwnProperty("sourceDisk")) object.sourceDisk = message.sourceDisk; if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode[message.mode] : message.mode; + object.mode = options.enums === String ? $root.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.tpu.v2alpha1.AttachedDisk.DiskMode[message.mode] : message.mode; return object; }; @@ -9662,6 +9692,12 @@ if (object.acceleratorType != null) message.acceleratorType = String(object.acceleratorType); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -9760,6 +9796,12 @@ } } switch (object.health) { + default: + if (typeof object.health === "number") { + message.health = object.health; + break; + } + break; case "HEALTH_UNSPECIFIED": case 0: message.health = 0; @@ -9822,6 +9864,12 @@ } } switch (object.apiVersion) { + default: + if (typeof object.apiVersion === "number") { + message.apiVersion = object.apiVersion; + break; + } + break; case "API_VERSION_UNSPECIFIED": case 0: message.apiVersion = 0; @@ -9908,7 +9956,7 @@ if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) object.acceleratorType = message.acceleratorType; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.State[message.state] === undefined ? message.state : $root.google.cloud.tpu.v2alpha1.Node.State[message.state] : message.state; if (message.healthDescription != null && message.hasOwnProperty("healthDescription")) object.healthDescription = message.healthDescription; if (message.runtimeVersion != null && message.hasOwnProperty("runtimeVersion")) @@ -9925,7 +9973,7 @@ object.networkEndpoints[j] = $root.google.cloud.tpu.v2alpha1.NetworkEndpoint.toObject(message.networkEndpoints[j], options); } if (message.health != null && message.hasOwnProperty("health")) - object.health = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.Health[message.health] : message.health; + object.health = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.Health[message.health] === undefined ? message.health : $root.google.cloud.tpu.v2alpha1.Node.Health[message.health] : message.health; var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; @@ -9947,7 +9995,7 @@ if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = $root.google.cloud.tpu.v2alpha1.ServiceAccount.toObject(message.serviceAccount, options); if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.ApiVersion[message.apiVersion] : message.apiVersion; + object.apiVersion = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Node.ApiVersion[message.apiVersion] === undefined ? message.apiVersion : $root.google.cloud.tpu.v2alpha1.Node.ApiVersion[message.apiVersion] : message.apiVersion; if (message.symptoms && message.symptoms.length) { object.symptoms = []; for (var j = 0; j < message.symptoms.length; ++j) @@ -15132,6 +15180,12 @@ message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } switch (object.symptomType) { + default: + if (typeof object.symptomType === "number") { + message.symptomType = object.symptomType; + break; + } + break; case "SYMPTOM_TYPE_UNSPECIFIED": case 0: message.symptomType = 0; @@ -15190,7 +15244,7 @@ if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.symptomType != null && message.hasOwnProperty("symptomType")) - object.symptomType = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Symptom.SymptomType[message.symptomType] : message.symptomType; + object.symptomType = options.enums === String ? $root.google.cloud.tpu.v2alpha1.Symptom.SymptomType[message.symptomType] === undefined ? message.symptomType : $root.google.cloud.tpu.v2alpha1.Symptom.SymptomType[message.symptomType] : message.symptomType; if (message.details != null && message.hasOwnProperty("details")) object.details = message.details; if (message.workerId != null && message.hasOwnProperty("workerId")) @@ -17256,6 +17310,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; @@ -17280,6 +17340,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; @@ -17327,7 +17391,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")) @@ -17335,7 +17399,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; }; @@ -20146,6 +20210,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; @@ -20160,6 +20230,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; @@ -20286,9 +20362,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")) @@ -22635,6 +22711,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; @@ -22743,7 +22825,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")) @@ -23545,6 +23627,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; @@ -23561,6 +23649,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; @@ -23599,6 +23693,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; @@ -23669,7 +23767,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")) @@ -23677,7 +23775,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")) @@ -23690,7 +23788,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); @@ -25067,6 +25165,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; @@ -25136,7 +25240,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) @@ -26891,6 +26995,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; @@ -26940,7 +27050,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; };