From 26366e2277bf265f23380dab96d3d9c35a4eb42e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:44:14 +0000 Subject: [PATCH] fix: regenerated protos JS and TS definitions (#233) 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-analytics-admin/protos/protos.d.ts | 2 +- .../google-analytics-admin/protos/protos.js | 432 +++++++++++++++--- 2 files changed, 377 insertions(+), 57 deletions(-) diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts index 02425656792..9f86d3eba41 100644 --- a/packages/google-analytics-admin/protos/protos.d.ts +++ b/packages/google-analytics-admin/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-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js index cc6bfe3a073..d8ccad45b75 100644 --- a/packages/google-analytics-admin/protos/protos.js +++ b/packages/google-analytics-admin/protos/protos.js @@ -1807,6 +1807,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AccessStringFilter(); switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; case "MATCH_TYPE_UNSPECIFIED": case 0: message.matchType = 0; @@ -1862,7 +1868,7 @@ object.caseSensitive = false; } if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessStringFilter.MatchType[message.matchType] : message.matchType; + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessStringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AccessStringFilter.MatchType[message.matchType] : message.matchType; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) @@ -2345,6 +2351,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AccessNumericFilter(); switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; case "OPERATION_UNSPECIFIED": case 0: message.operation = 0; @@ -2396,7 +2408,7 @@ object.value = null; } if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessNumericFilter.Operation[message.operation] : message.operation; + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessNumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AccessNumericFilter.Operation[message.operation] : message.operation; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.analytics.admin.v1alpha.NumericValue.toObject(message.value, options); return object; @@ -3613,6 +3625,12 @@ if (object.dimensionName != null) message.dimensionName = String(object.dimensionName); switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; case "ORDER_TYPE_UNSPECIFIED": case 0: message.orderType = 0; @@ -3653,7 +3671,7 @@ if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) object.dimensionName = message.dimensionName; if (message.orderType != null && message.hasOwnProperty("orderType")) - object.orderType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + object.orderType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; return object; }; @@ -19130,6 +19148,10 @@ for (var i = 0; i < object.resourceType.length; ++i) switch (object.resourceType[i]) { default: + if (typeof object.resourceType[i] === "number") { + message.resourceType[i] = object.resourceType[i]; + break; + } case "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": case 0: message.resourceType[i] = 0; @@ -19203,6 +19225,10 @@ for (var i = 0; i < object.action.length; ++i) switch (object.action[i]) { default: + if (typeof object.action[i] === "number") { + message.action[i] = object.action[i]; + break; + } case "ACTION_TYPE_UNSPECIFIED": case 0: message.action[i] = 0; @@ -19278,12 +19304,12 @@ if (message.resourceType && message.resourceType.length) { object.resourceType = []; for (var j = 0; j < message.resourceType.length; ++j) - object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; + object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ChangeHistoryResourceType[message.resourceType[j]] === undefined ? message.resourceType[j] : $root.google.analytics.admin.v1alpha.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; } if (message.action && message.action.length) { object.action = []; for (var j = 0; j < message.action.length; ++j) - object.action[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action[j]] : message.action[j]; + object.action[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action[j]] === undefined ? message.action[j] : $root.google.analytics.admin.v1alpha.ActionType[message.action[j]] : message.action[j]; } if (message.actorEmail && message.actorEmail.length) { object.actorEmail = []; @@ -32636,6 +32662,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; case "MATCH_TYPE_UNSPECIFIED": case 0: message.matchType = 0; @@ -32691,7 +32723,7 @@ object.caseSensitive = false; } if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) @@ -33434,6 +33466,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; case "OPERATION_UNSPECIFIED": case 0: message.operation = 0; @@ -33485,7 +33523,7 @@ object.value = null; } if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); return object; @@ -34782,6 +34820,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -34825,7 +34869,7 @@ object.filterExpression = null; } if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); return object; @@ -35065,6 +35109,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -35120,7 +35170,7 @@ object.sequenceMaximumDuration = null; } if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); if (message.sequenceSteps && message.sequenceSteps.length) { @@ -35372,6 +35422,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -35424,7 +35480,7 @@ object.filterExpression = null; } if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) object.immediatelyFollows = message.immediatelyFollows; if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) @@ -35695,6 +35751,12 @@ message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); } switch (object.clauseType) { + default: + if (typeof object.clauseType === "number") { + message.clauseType = object.clauseType; + break; + } + break; case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": case 0: message.clauseType = 0; @@ -35727,7 +35789,7 @@ if (options.defaults) object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; if (message.clauseType != null && message.hasOwnProperty("clauseType")) - object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; + object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); if (options.oneofs) @@ -35962,6 +36024,12 @@ if (object.eventName != null) message.eventName = String(object.eventName); switch (object.logCondition) { + default: + if (typeof object.logCondition === "number") { + message.logCondition = object.logCondition; + break; + } + break; case "LOG_CONDITION_UNSPECIFIED": case 0: message.logCondition = 0; @@ -35998,7 +36066,7 @@ if (message.eventName != null && message.hasOwnProperty("eventName")) object.eventName = message.eventName; if (message.logCondition != null && message.hasOwnProperty("logCondition")) - object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; + object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; return object; }; @@ -36356,6 +36424,12 @@ message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); } switch (object.exclusionDurationMode) { + default: + if (typeof object.exclusionDurationMode === "number") { + message.exclusionDurationMode = object.exclusionDurationMode; + break; + } + break; case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": case 0: message.exclusionDurationMode = 0; @@ -36419,7 +36493,7 @@ if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) - object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; + object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; if (message.filterClauses && message.filterClauses.length) { object.filterClauses = []; for (var j = 0; j < message.filterClauses.length; ++j) @@ -37469,6 +37543,12 @@ if (object.name != null) message.name = String(object.name); switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; case "PROPERTY_TYPE_UNSPECIFIED": case 0: message.propertyType = 0; @@ -37501,6 +37581,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; case "INDUSTRY_CATEGORY_UNSPECIFIED": case 0: message.industryCategory = 0; @@ -37615,6 +37701,12 @@ if (object.currencyCode != null) message.currencyCode = String(object.currencyCode); switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; case "SERVICE_LEVEL_UNSPECIFIED": case 0: message.serviceLevel = 0; @@ -37682,13 +37774,13 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) - object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] : message.industryCategory; + object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] : message.industryCategory; if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) object.currencyCode = message.currencyCode; if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] : message.serviceLevel; + object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] : message.serviceLevel; if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); if (message.expireTime != null && message.hasOwnProperty("expireTime")) @@ -37696,7 +37788,7 @@ if (message.account != null && message.hasOwnProperty("account")) object.account = message.account; if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; return object; }; @@ -38067,6 +38159,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "DATA_STREAM_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -38122,7 +38220,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] : message.type; + object.type = options.enums === String ? $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] : message.type; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.createTime != null && message.hasOwnProperty("createTime")) @@ -41140,6 +41238,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; case "PROPERTY_TYPE_UNSPECIFIED": case 0: message.propertyType = 0; @@ -41186,7 +41290,7 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; return object; @@ -41737,6 +41841,12 @@ message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); } switch (object.actorType) { + default: + if (typeof object.actorType === "number") { + message.actorType = object.actorType; + break; + } + break; case "ACTOR_TYPE_UNSPECIFIED": case 0: message.actorType = 0; @@ -41798,7 +41908,7 @@ if (message.changeTime != null && message.hasOwnProperty("changeTime")) object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); if (message.actorType != null && message.hasOwnProperty("actorType")) - object.actorType = options.enums === String ? $root.google.analytics.admin.v1alpha.ActorType[message.actorType] : message.actorType; + object.actorType = options.enums === String ? $root.google.analytics.admin.v1alpha.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1alpha.ActorType[message.actorType] : message.actorType; if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) object.userActorEmail = message.userActorEmail; if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) @@ -42057,6 +42167,12 @@ if (object.resource != null) message.resource = String(object.resource); switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; case "ACTION_TYPE_UNSPECIFIED": case 0: message.action = 0; @@ -42109,7 +42225,7 @@ if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action] : message.action; + object.action = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1alpha.ActionType[message.action] : message.action; if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) object.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) @@ -43749,6 +43865,12 @@ return object; var message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); switch (object.linkProposalInitiatingProduct) { + default: + if (typeof object.linkProposalInitiatingProduct === "number") { + message.linkProposalInitiatingProduct = object.linkProposalInitiatingProduct; + break; + } + break; case "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": case 0: message.linkProposalInitiatingProduct = 0; @@ -43765,6 +43887,12 @@ if (object.requestorEmail != null) message.requestorEmail = String(object.requestorEmail); switch (object.linkProposalState) { + default: + if (typeof object.linkProposalState === "number") { + message.linkProposalState = object.linkProposalState; + break; + } + break; case "LINK_PROPOSAL_STATE_UNSPECIFIED": case 0: message.linkProposalState = 0; @@ -43816,11 +43944,11 @@ object.linkProposalState = options.enums === String ? "LINK_PROPOSAL_STATE_UNSPECIFIED" : 0; } if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) - object.linkProposalInitiatingProduct = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] : message.linkProposalInitiatingProduct; + object.linkProposalInitiatingProduct = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] === undefined ? message.linkProposalInitiatingProduct : $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] : message.linkProposalInitiatingProduct; if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) object.requestorEmail = message.requestorEmail; if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) - object.linkProposalState = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] : message.linkProposalState; + object.linkProposalState = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] === undefined ? message.linkProposalState : $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] : message.linkProposalState; return object; }; @@ -44354,6 +44482,12 @@ if (object.name != null) message.name = String(object.name); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "GOOGLE_SIGNALS_STATE_UNSPECIFIED": case 0: message.state = 0; @@ -44368,6 +44502,12 @@ break; } switch (object.consent) { + default: + if (typeof object.consent === "number") { + message.consent = object.consent; + break; + } + break; case "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": case 0: message.consent = 0; @@ -44405,9 +44545,9 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] : message.state; + object.state = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] === undefined ? message.state : $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] : message.state; if (message.consent != null && message.hasOwnProperty("consent")) - object.consent = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] : message.consent; + object.consent = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] === undefined ? message.consent : $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] : message.consent; return object; }; @@ -44694,6 +44834,12 @@ if (object.description != null) message.description = String(object.description); switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "DIMENSION_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -44742,7 +44888,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] : message.scope; if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) object.disallowAdsPersonalization = message.disallowAdsPersonalization; return object; @@ -45100,6 +45246,12 @@ if (object.description != null) message.description = String(object.description); switch (object.measurementUnit) { + default: + if (typeof object.measurementUnit === "number") { + message.measurementUnit = object.measurementUnit; + break; + } + break; case "MEASUREMENT_UNIT_UNSPECIFIED": case 0: message.measurementUnit = 0; @@ -45146,6 +45298,12 @@ break; } switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "METRIC_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -45162,6 +45320,10 @@ for (var i = 0; i < object.restrictedMetricType.length; ++i) switch (object.restrictedMetricType[i]) { default: + if (typeof object.restrictedMetricType[i] === "number") { + message.restrictedMetricType[i] = object.restrictedMetricType[i]; + break; + } case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": case 0: message.restrictedMetricType[i] = 0; @@ -45211,13 +45373,13 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) - object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; + object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] : message.scope; if (message.restrictedMetricType && message.restrictedMetricType.length) { object.restrictedMetricType = []; for (var j = 0; j < message.restrictedMetricType.length; ++j) - object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; + object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; } return object; }; @@ -45510,6 +45672,12 @@ if (object.name != null) message.name = String(object.name); switch (object.eventDataRetention) { + default: + if (typeof object.eventDataRetention === "number") { + message.eventDataRetention = object.eventDataRetention; + break; + } + break; case "RETENTION_DURATION_UNSPECIFIED": case 0: message.eventDataRetention = 0; @@ -45561,7 +45729,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) - object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; + object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; return object; @@ -45848,6 +46016,12 @@ if (object.name != null) message.name = String(object.name); switch (object.acquisitionConversionEventLookbackWindow) { + default: + if (typeof object.acquisitionConversionEventLookbackWindow === "number") { + message.acquisitionConversionEventLookbackWindow = object.acquisitionConversionEventLookbackWindow; + break; + } + break; case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": case 0: message.acquisitionConversionEventLookbackWindow = 0; @@ -45862,6 +46036,12 @@ break; } switch (object.otherConversionEventLookbackWindow) { + default: + if (typeof object.otherConversionEventLookbackWindow === "number") { + message.otherConversionEventLookbackWindow = object.otherConversionEventLookbackWindow; + break; + } + break; case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": case 0: message.otherConversionEventLookbackWindow = 0; @@ -45880,6 +46060,12 @@ break; } switch (object.reportingAttributionModel) { + default: + if (typeof object.reportingAttributionModel === "number") { + message.reportingAttributionModel = object.reportingAttributionModel; + break; + } + break; case "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": case 0: message.reportingAttributionModel = 0; @@ -45938,11 +46124,11 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) - object.acquisitionConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] : message.acquisitionConversionEventLookbackWindow; + object.acquisitionConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] === undefined ? message.acquisitionConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] : message.acquisitionConversionEventLookbackWindow; if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) - object.otherConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] : message.otherConversionEventLookbackWindow; + object.otherConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] === undefined ? message.otherConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] : message.otherConversionEventLookbackWindow; if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) - object.reportingAttributionModel = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] : message.reportingAttributionModel; + object.reportingAttributionModel = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] === undefined ? message.reportingAttributionModel : $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] : message.reportingAttributionModel; return object; }; @@ -54135,6 +54321,10 @@ for (var i = 0; i < object.resourceType.length; ++i) switch (object.resourceType[i]) { default: + if (typeof object.resourceType[i] === "number") { + message.resourceType[i] = object.resourceType[i]; + break; + } case "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": case 0: message.resourceType[i] = 0; @@ -54196,6 +54386,10 @@ for (var i = 0; i < object.action.length; ++i) switch (object.action[i]) { default: + if (typeof object.action[i] === "number") { + message.action[i] = object.action[i]; + break; + } case "ACTION_TYPE_UNSPECIFIED": case 0: message.action[i] = 0; @@ -54271,12 +54465,12 @@ if (message.resourceType && message.resourceType.length) { object.resourceType = []; for (var j = 0; j < message.resourceType.length; ++j) - object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; + object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ChangeHistoryResourceType[message.resourceType[j]] === undefined ? message.resourceType[j] : $root.google.analytics.admin.v1beta.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; } if (message.action && message.action.length) { object.action = []; for (var j = 0; j < message.action.length; ++j) - object.action[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action[j]] : message.action[j]; + object.action[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action[j]] === undefined ? message.action[j] : $root.google.analytics.admin.v1beta.ActionType[message.action[j]] : message.action[j]; } if (message.actorEmail && message.actorEmail.length) { object.actorEmail = []; @@ -62557,6 +62751,12 @@ if (object.name != null) message.name = String(object.name); switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; case "PROPERTY_TYPE_UNSPECIFIED": case 0: message.propertyType = 0; @@ -62589,6 +62789,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; case "INDUSTRY_CATEGORY_UNSPECIFIED": case 0: message.industryCategory = 0; @@ -62703,6 +62909,12 @@ if (object.currencyCode != null) message.currencyCode = String(object.currencyCode); switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; case "SERVICE_LEVEL_UNSPECIFIED": case 0: message.serviceLevel = 0; @@ -62770,13 +62982,13 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) - object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1beta.IndustryCategory[message.industryCategory] : message.industryCategory; + object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1beta.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1beta.IndustryCategory[message.industryCategory] : message.industryCategory; if (message.timeZone != null && message.hasOwnProperty("timeZone")) object.timeZone = message.timeZone; if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) object.currencyCode = message.currencyCode; if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) - object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1beta.ServiceLevel[message.serviceLevel] : message.serviceLevel; + object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1beta.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1beta.ServiceLevel[message.serviceLevel] : message.serviceLevel; if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); if (message.expireTime != null && message.hasOwnProperty("expireTime")) @@ -62784,7 +62996,7 @@ if (message.account != null && message.hasOwnProperty("account")) object.account = message.account; if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; return object; }; @@ -63155,6 +63367,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "DATA_STREAM_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -63210,7 +63428,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.analytics.admin.v1beta.DataStream.DataStreamType[message.type] : message.type; + object.type = options.enums === String ? $root.google.analytics.admin.v1beta.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1beta.DataStream.DataStreamType[message.type] : message.type; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.createTime != null && message.hasOwnProperty("createTime")) @@ -65427,6 +65645,12 @@ if (object.displayName != null) message.displayName = String(object.displayName); switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; case "PROPERTY_TYPE_UNSPECIFIED": case 0: message.propertyType = 0; @@ -65473,7 +65697,7 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; if (message.propertyType != null && message.hasOwnProperty("propertyType")) - object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; return object; @@ -66024,6 +66248,12 @@ message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); } switch (object.actorType) { + default: + if (typeof object.actorType === "number") { + message.actorType = object.actorType; + break; + } + break; case "ACTOR_TYPE_UNSPECIFIED": case 0: message.actorType = 0; @@ -66085,7 +66315,7 @@ if (message.changeTime != null && message.hasOwnProperty("changeTime")) object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); if (message.actorType != null && message.hasOwnProperty("actorType")) - object.actorType = options.enums === String ? $root.google.analytics.admin.v1beta.ActorType[message.actorType] : message.actorType; + object.actorType = options.enums === String ? $root.google.analytics.admin.v1beta.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1beta.ActorType[message.actorType] : message.actorType; if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) object.userActorEmail = message.userActorEmail; if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) @@ -66344,6 +66574,12 @@ if (object.resource != null) message.resource = String(object.resource); switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; case "ACTION_TYPE_UNSPECIFIED": case 0: message.action = 0; @@ -66396,7 +66632,7 @@ if (message.resource != null && message.hasOwnProperty("resource")) object.resource = message.resource; if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action] : message.action; + object.action = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1beta.ActionType[message.action] : message.action; if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) object.resourceBeforeChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) @@ -67460,6 +67696,12 @@ if (object.description != null) message.description = String(object.description); switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "DIMENSION_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -67508,7 +67750,7 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomDimension.DimensionScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1beta.CustomDimension.DimensionScope[message.scope] : message.scope; if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) object.disallowAdsPersonalization = message.disallowAdsPersonalization; return object; @@ -67866,6 +68108,12 @@ if (object.description != null) message.description = String(object.description); switch (object.measurementUnit) { + default: + if (typeof object.measurementUnit === "number") { + message.measurementUnit = object.measurementUnit; + break; + } + break; case "MEASUREMENT_UNIT_UNSPECIFIED": case 0: message.measurementUnit = 0; @@ -67912,6 +68160,12 @@ break; } switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; case "METRIC_SCOPE_UNSPECIFIED": case 0: message.scope = 0; @@ -67928,6 +68182,10 @@ for (var i = 0; i < object.restrictedMetricType.length; ++i) switch (object.restrictedMetricType[i]) { default: + if (typeof object.restrictedMetricType[i] === "number") { + message.restrictedMetricType[i] = object.restrictedMetricType[i]; + break; + } case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": case 0: message.restrictedMetricType[i] = 0; @@ -67977,13 +68235,13 @@ if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) - object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; + object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MetricScope[message.scope] : message.scope; + object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1beta.CustomMetric.MetricScope[message.scope] : message.scope; if (message.restrictedMetricType && message.restrictedMetricType.length) { object.restrictedMetricType = []; for (var j = 0; j < message.restrictedMetricType.length; ++j) - object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; + object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; } return object; }; @@ -68276,6 +68534,12 @@ if (object.name != null) message.name = String(object.name); switch (object.eventDataRetention) { + default: + if (typeof object.eventDataRetention === "number") { + message.eventDataRetention = object.eventDataRetention; + break; + } + break; case "RETENTION_DURATION_UNSPECIFIED": case 0: message.eventDataRetention = 0; @@ -68327,7 +68591,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) - object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; + object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; return object; @@ -68732,6 +68996,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; @@ -68756,6 +69026,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; @@ -68803,7 +69077,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")) @@ -68811,7 +69085,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; }; @@ -72585,6 +72859,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; @@ -72599,6 +72879,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; @@ -72725,9 +73011,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")) @@ -75074,6 +75360,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; @@ -75182,7 +75474,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")) @@ -75984,6 +76276,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; @@ -76000,6 +76298,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; @@ -76038,6 +76342,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; @@ -76108,7 +76416,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")) @@ -76116,7 +76424,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")) @@ -76129,7 +76437,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); @@ -77486,6 +77794,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; @@ -77549,7 +77863,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) @@ -79302,6 +79616,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; @@ -79351,7 +79671,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; };