diff --git a/packages/google-cloud-billing-budgets/protos/protos.d.ts b/packages/google-cloud-billing-budgets/protos/protos.d.ts index f81eee5c2d7..ee7f9cffeb4 100644 --- a/packages/google-cloud-billing-budgets/protos/protos.d.ts +++ b/packages/google-cloud-billing-budgets/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-billing-budgets/protos/protos.js b/packages/google-cloud-billing-budgets/protos/protos.js index 7d8c17e990b..17f0e28d93d 100644 --- a/packages/google-cloud-billing-budgets/protos/protos.js +++ b/packages/google-cloud-billing-budgets/protos/protos.js @@ -1067,6 +1067,12 @@ if (object.thresholdPercent != null) message.thresholdPercent = Number(object.thresholdPercent); switch (object.spendBasis) { + default: + if (typeof object.spendBasis === "number") { + message.spendBasis = object.spendBasis; + break; + } + break; case "BASIS_UNSPECIFIED": case 0: message.spendBasis = 0; @@ -1103,7 +1109,7 @@ if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) object.thresholdPercent = options.json && !isFinite(message.thresholdPercent) ? String(message.thresholdPercent) : message.thresholdPercent; if (message.spendBasis != null && message.hasOwnProperty("spendBasis")) - object.spendBasis = options.enums === String ? $root.google.cloud.billing.budgets.v1.ThresholdRule.Basis[message.spendBasis] : message.spendBasis; + object.spendBasis = options.enums === String ? $root.google.cloud.billing.budgets.v1.ThresholdRule.Basis[message.spendBasis] === undefined ? message.spendBasis : $root.google.cloud.billing.budgets.v1.ThresholdRule.Basis[message.spendBasis] : message.spendBasis; return object; }; @@ -1832,6 +1838,12 @@ message.creditTypes[i] = String(object.creditTypes[i]); } switch (object.creditTypesTreatment) { + default: + if (typeof object.creditTypesTreatment === "number") { + message.creditTypesTreatment = object.creditTypesTreatment; + break; + } + break; case "CREDIT_TYPES_TREATMENT_UNSPECIFIED": case 0: message.creditTypesTreatment = 0; @@ -1874,6 +1886,12 @@ } } switch (object.calendarPeriod) { + default: + if (typeof object.calendarPeriod === "number") { + message.calendarPeriod = object.calendarPeriod; + break; + } + break; case "CALENDAR_PERIOD_UNSPECIFIED": case 0: message.calendarPeriod = 0; @@ -1933,7 +1951,7 @@ object.services[j] = message.services[j]; } if (message.creditTypesTreatment != null && message.hasOwnProperty("creditTypesTreatment")) - object.creditTypesTreatment = options.enums === String ? $root.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment[message.creditTypesTreatment] : message.creditTypesTreatment; + object.creditTypesTreatment = options.enums === String ? $root.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment[message.creditTypesTreatment] === undefined ? message.creditTypesTreatment : $root.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment[message.creditTypesTreatment] : message.creditTypesTreatment; if (message.subaccounts && message.subaccounts.length) { object.subaccounts = []; for (var j = 0; j < message.subaccounts.length; ++j) @@ -1951,7 +1969,7 @@ object.creditTypes[j] = message.creditTypes[j]; } if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { - object.calendarPeriod = options.enums === String ? $root.google.cloud.billing.budgets.v1.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + object.calendarPeriod = options.enums === String ? $root.google.cloud.billing.budgets.v1.CalendarPeriod[message.calendarPeriod] === undefined ? message.calendarPeriod : $root.google.cloud.billing.budgets.v1.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; if (options.oneofs) object.usagePeriod = "calendarPeriod"; } @@ -4842,6 +4860,12 @@ if (object.thresholdPercent != null) message.thresholdPercent = Number(object.thresholdPercent); switch (object.spendBasis) { + default: + if (typeof object.spendBasis === "number") { + message.spendBasis = object.spendBasis; + break; + } + break; case "BASIS_UNSPECIFIED": case 0: message.spendBasis = 0; @@ -4878,7 +4902,7 @@ if (message.thresholdPercent != null && message.hasOwnProperty("thresholdPercent")) object.thresholdPercent = options.json && !isFinite(message.thresholdPercent) ? String(message.thresholdPercent) : message.thresholdPercent; if (message.spendBasis != null && message.hasOwnProperty("spendBasis")) - object.spendBasis = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis[message.spendBasis] : message.spendBasis; + object.spendBasis = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis[message.spendBasis] === undefined ? message.spendBasis : $root.google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis[message.spendBasis] : message.spendBasis; return object; }; @@ -5607,6 +5631,12 @@ message.creditTypes[i] = String(object.creditTypes[i]); } switch (object.creditTypesTreatment) { + default: + if (typeof object.creditTypesTreatment === "number") { + message.creditTypesTreatment = object.creditTypesTreatment; + break; + } + break; case "CREDIT_TYPES_TREATMENT_UNSPECIFIED": case 0: message.creditTypesTreatment = 0; @@ -5649,6 +5679,12 @@ } } switch (object.calendarPeriod) { + default: + if (typeof object.calendarPeriod === "number") { + message.calendarPeriod = object.calendarPeriod; + break; + } + break; case "CALENDAR_PERIOD_UNSPECIFIED": case 0: message.calendarPeriod = 0; @@ -5708,7 +5744,7 @@ object.services[j] = message.services[j]; } if (message.creditTypesTreatment != null && message.hasOwnProperty("creditTypesTreatment")) - object.creditTypesTreatment = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment[message.creditTypesTreatment] : message.creditTypesTreatment; + object.creditTypesTreatment = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment[message.creditTypesTreatment] === undefined ? message.creditTypesTreatment : $root.google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment[message.creditTypesTreatment] : message.creditTypesTreatment; if (message.subaccounts && message.subaccounts.length) { object.subaccounts = []; for (var j = 0; j < message.subaccounts.length; ++j) @@ -5726,7 +5762,7 @@ object.creditTypes[j] = message.creditTypes[j]; } if (message.calendarPeriod != null && message.hasOwnProperty("calendarPeriod")) { - object.calendarPeriod = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; + object.calendarPeriod = options.enums === String ? $root.google.cloud.billing.budgets.v1beta1.CalendarPeriod[message.calendarPeriod] === undefined ? message.calendarPeriod : $root.google.cloud.billing.budgets.v1beta1.CalendarPeriod[message.calendarPeriod] : message.calendarPeriod; if (options.oneofs) object.usagePeriod = "calendarPeriod"; } @@ -7964,6 +8000,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; @@ -7988,6 +8030,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; @@ -8035,7 +8081,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")) @@ -8043,7 +8089,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; }; @@ -11817,6 +11863,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; @@ -11831,6 +11883,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; @@ -11957,9 +12015,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")) @@ -14306,6 +14364,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; @@ -14414,7 +14478,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")) @@ -15216,6 +15280,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; @@ -15232,6 +15302,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; @@ -15270,6 +15346,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; @@ -15340,7 +15420,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")) @@ -15348,7 +15428,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")) @@ -15361,7 +15441,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); @@ -16718,6 +16798,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; @@ -16781,7 +16867,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) @@ -18534,6 +18620,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; @@ -18583,7 +18675,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; }; @@ -19167,6 +19259,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; @@ -19205,7 +19303,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"; }