diff --git a/packages/google-cloud-networkconnectivity/protos/protos.d.ts b/packages/google-cloud-networkconnectivity/protos/protos.d.ts index 9772df5445c..09600930178 100644 --- a/packages/google-cloud-networkconnectivity/protos/protos.d.ts +++ b/packages/google-cloud-networkconnectivity/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-networkconnectivity/protos/protos.js b/packages/google-cloud-networkconnectivity/protos/protos.js index e2f43cb6e2e..4b6ac0f9570 100644 --- a/packages/google-cloud-networkconnectivity/protos/protos.js +++ b/packages/google-cloud-networkconnectivity/protos/protos.js @@ -1163,6 +1163,12 @@ if (object.uniqueId != null) message.uniqueId = String(object.uniqueId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -1235,7 +1241,7 @@ if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) object.uniqueId = message.uniqueId; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1.State[message.state] === undefined ? message.state : $root.google.cloud.networkconnectivity.v1.State[message.state] : message.state; if (message.routingVpcs && message.routingVpcs.length) { object.routingVpcs = []; for (var j = 0; j < message.routingVpcs.length; ++j) @@ -1913,6 +1919,12 @@ if (object.uniqueId != null) message.uniqueId = String(object.uniqueId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -1979,7 +1991,7 @@ if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) object.uniqueId = message.uniqueId; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1.State[message.state] === undefined ? message.state : $root.google.cloud.networkconnectivity.v1.State[message.state] : message.state; if (message.linkedVpnTunnels != null && message.hasOwnProperty("linkedVpnTunnels")) object.linkedVpnTunnels = $root.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.toObject(message.linkedVpnTunnels, options); if (message.linkedInterconnectAttachments != null && message.hasOwnProperty("linkedInterconnectAttachments")) @@ -6261,6 +6273,10 @@ for (var i = 0; i < object.locationFeatures.length; ++i) switch (object.locationFeatures[i]) { default: + if (typeof object.locationFeatures[i] === "number") { + message.locationFeatures[i] = object.locationFeatures[i]; + break; + } case "LOCATION_FEATURE_UNSPECIFIED": case 0: message.locationFeatures[i] = 0; @@ -6296,7 +6312,7 @@ if (message.locationFeatures && message.locationFeatures.length) { object.locationFeatures = []; for (var j = 0; j < message.locationFeatures.length; ++j) - object.locationFeatures[j] = options.enums === String ? $root.google.cloud.networkconnectivity.v1.LocationFeature[message.locationFeatures[j]] : message.locationFeatures[j]; + object.locationFeatures[j] = options.enums === String ? $root.google.cloud.networkconnectivity.v1.LocationFeature[message.locationFeatures[j]] === undefined ? message.locationFeatures[j] : $root.google.cloud.networkconnectivity.v1.LocationFeature[message.locationFeatures[j]] : message.locationFeatures[j]; } return object; }; @@ -7410,6 +7426,12 @@ if (object.uniqueId != null) message.uniqueId = String(object.uniqueId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -7477,7 +7499,7 @@ if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) object.uniqueId = message.uniqueId; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] === undefined ? message.state : $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] : message.state; return object; }; @@ -7952,6 +7974,12 @@ if (object.uniqueId != null) message.uniqueId = String(object.uniqueId); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -8035,7 +8063,7 @@ object.linkedRouterApplianceInstances[j] = $root.google.cloud.networkconnectivity.v1alpha1.RouterApplianceInstance.toObject(message.linkedRouterApplianceInstances[j], options); } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] === undefined ? message.state : $root.google.cloud.networkconnectivity.v1alpha1.State[message.state] : message.state; return object; }; @@ -12751,6 +12779,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; @@ -12775,6 +12809,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; @@ -12822,7 +12860,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")) @@ -12830,7 +12868,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; }; @@ -15641,6 +15679,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; @@ -15655,6 +15699,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; @@ -15781,9 +15831,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")) @@ -18130,6 +18180,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; @@ -18238,7 +18294,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")) @@ -19040,6 +19096,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; @@ -19056,6 +19118,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; @@ -19094,6 +19162,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; @@ -19164,7 +19236,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")) @@ -19172,7 +19244,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")) @@ -19185,7 +19257,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); @@ -20562,6 +20634,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; @@ -20631,7 +20709,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) @@ -22386,6 +22464,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; @@ -22435,7 +22519,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; };