diff --git a/packages/google-analytics-admin/README.md b/packages/google-analytics-admin/README.md index 701da3b299d..8e95f71134f 100644 --- a/packages/google-analytics-admin/README.md +++ b/packages/google-analytics-admin/README.md @@ -257,6 +257,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) | | Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js,samples/README.md) | | Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js,samples/README.md) | +| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js,samples/README.md) | | Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js,samples/README.md) | | Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js,samples/README.md) | | Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js,samples/README.md) | diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/access_report.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/access_report.proto new file mode 100644 index 00000000000..57b70319760 --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/access_report.proto @@ -0,0 +1,334 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin"; +option java_multiple_files = true; +option java_outer_classname = "AccessReportProto"; +option java_package = "com.google.analytics.admin.v1beta"; + +// Dimensions are attributes of your data. For example, the dimension +// `userEmail` indicates the email of the user that accessed reporting data. +// Dimension values in report responses are strings. +message AccessDimension { + // The API name of the dimension. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of dimensions supported in this API. + // + // Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + string dimension_name = 1; +} + +// The quantitative measurements of a report. For example, the metric +// `accessCount` is the total number of data access records. +message AccessMetric { + // The API name of the metric. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of metrics supported in this API. + // + // Metrics are referenced by name in `metricFilter` & `orderBys`. + string metric_name = 1; +} + +// A contiguous range of days: startDate, startDate + 1, ..., endDate. +message AccessDateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the current time + // in the request's time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the current + // time in the request's time zone. + string end_date = 2; +} + +// Expresses dimension or metric filters. The fields in the same expression need +// to be either all dimensions or all metrics. +message AccessFilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof one_expression { + // Each of the FilterExpressions in the and_group has an AND relationship. + AccessFilterExpressionList and_group = 1; + + // Each of the FilterExpressions in the or_group has an OR relationship. + AccessFilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + AccessFilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + AccessFilter access_filter = 4; + } +} + +// A list of filter expressions. +message AccessFilterExpressionList { + // A list of filter expressions. + repeated AccessFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message AccessFilter { + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + AccessStringFilter string_filter = 2; + + // A filter for in list values. + AccessInListFilter in_list_filter = 3; + + // A filter for numeric or date values. + AccessNumericFilter numeric_filter = 4; + + // A filter for two values. + AccessBetweenFilter between_filter = 5; + } + + // The dimension name or metric name. + string field_name = 1; +} + +// The filter for strings. +message AccessStringFilter { + // The match type of a string filter. + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; +} + +// The result needs to be in a list of string values. +message AccessInListFilter { + // The list of string values. Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; +} + +// Filters for numeric or date values. +message AccessNumericFilter { + // The operation applied to a numeric filter. + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; +} + +// To express that the result needs to be between two numbers (inclusive). +message AccessBetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; +} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending access count is one ordering, and ordering rows +// by the country string is a different ordering. +message AccessOrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + } + + // If true, sorts by descending order. If false or unspecified, sorts in + // ascending order. + bool desc = 3; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message AccessDimensionHeader { + // The dimension's name; for example 'userEmail'. + string dimension_name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message AccessMetricHeader { + // The metric's name; for example 'accessCount'. + string metric_name = 1; +} + +// Access report data for each row. +message AccessRow { + // List of dimension values. These values are in the same order as specified + // in the request. + repeated AccessDimensionValue dimension_values = 1; + + // List of metric values. These values are in the same order as specified + // in the request. + repeated AccessMetricValue metric_values = 2; +} + +// The value of a dimension. +message AccessDimensionValue { + // The dimension value. For example, this value may be 'France' for the + // 'country' dimension. + string value = 1; +} + +// The value of a metric. +message AccessMetricValue { + // The measurement value. For example, this value may be '13'. + string value = 1; +} + +// Current state of all quotas for this Analytics property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message AccessQuota { + // Properties can use 250,000 tokens per day. Most requests consume fewer than + // 10 tokens. + AccessQuotaStatus tokens_per_day = 1; + + // Properties can use 50,000 tokens per hour. An API request consumes a single + // number of tokens, and that number is deducted from all of the hourly, + // daily, and per project hourly quotas. + AccessQuotaStatus tokens_per_hour = 2; + + // Properties can use up to 50 concurrent requests. + AccessQuotaStatus concurrent_requests = 3; + + // Properties and cloud project pairs can have up to 50 server errors per + // hour. + AccessQuotaStatus server_errors_per_project_per_hour = 4; + + // Properties can use up to 25% of their tokens per project per hour. This + // amounts to Analytics 360 Properties can use 12,500 tokens per project per + // hour. An API request consumes a single number of tokens, and that number is + // deducted from all of the hourly, daily, and per project hourly quotas. + AccessQuotaStatus tokens_per_project_per_hour = 5; +} + +// Current state for a particular quota group. +message AccessQuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto index 7e80f73628f..b8ecfe20e3c 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.analytics.admin.v1beta; +import "google/analytics/admin/v1beta/access_report.proto"; import "google/analytics/admin/v1beta/resources.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; @@ -84,7 +85,8 @@ service AnalyticsAdminService { } // Requests a ticket for creating an account. - rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) { + rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) + returns (ProvisionAccountTicketResponse) { option (google.api.http) = { post: "/v1beta/accounts:provisionAccountTicket" body: "*" @@ -92,7 +94,8 @@ service AnalyticsAdminService { } // Returns summaries of all accounts accessible by the caller. - rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) { + rpc ListAccountSummaries(ListAccountSummariesRequest) + returns (ListAccountSummariesResponse) { option (google.api.http) = { get: "/v1beta/accountSummaries" }; @@ -137,7 +140,7 @@ service AnalyticsAdminService { // will be permanently purged. // https://support.google.com/analytics/answer/6154772 // - // Returns an error if the target is not found, or is not an GA4 Property. + // Returns an error if the target is not found, or is not a GA4 Property. rpc DeleteProperty(DeletePropertyRequest) returns (Property) { option (google.api.http) = { delete: "/v1beta/{name=properties/*}" @@ -166,7 +169,8 @@ service AnalyticsAdminService { } // Deletes a FirebaseLink on a property - rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) { + rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=properties/*/firebaseLinks/*}" }; @@ -175,7 +179,8 @@ service AnalyticsAdminService { // Lists FirebaseLinks on a property. // Properties can have at most one FirebaseLink. - rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) { + rpc ListFirebaseLinks(ListFirebaseLinksRequest) + returns (ListFirebaseLinksResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/firebaseLinks" }; @@ -201,7 +206,8 @@ service AnalyticsAdminService { } // Deletes a GoogleAdsLink on a property - rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) { + rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=properties/*/googleAdsLinks/*}" }; @@ -209,7 +215,8 @@ service AnalyticsAdminService { } // Lists GoogleAdsLinks on a property. - rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) { + rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) + returns (ListGoogleAdsLinksResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/googleAdsLinks" }; @@ -218,7 +225,8 @@ service AnalyticsAdminService { // Get data sharing settings on an account. // Data sharing settings are singletons. - rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings) { + rpc GetDataSharingSettings(GetDataSharingSettingsRequest) + returns (DataSharingSettings) { option (google.api.http) = { get: "/v1beta/{name=accounts/*/dataSharingSettings}" }; @@ -226,7 +234,8 @@ service AnalyticsAdminService { } // Lookup for a single "GA4" MeasurementProtocolSecret. - rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) + returns (MeasurementProtocolSecret) { option (google.api.http) = { get: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" }; @@ -235,7 +244,8 @@ service AnalyticsAdminService { // Returns child MeasurementProtocolSecrets under the specified parent // Property. - rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse) { + rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) + returns (ListMeasurementProtocolSecretsResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" }; @@ -243,7 +253,8 @@ service AnalyticsAdminService { } // Creates a measurement protocol secret. - rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) + returns (MeasurementProtocolSecret) { option (google.api.http) = { post: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" body: "measurement_protocol_secret" @@ -252,7 +263,8 @@ service AnalyticsAdminService { } // Deletes target MeasurementProtocolSecret. - rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (google.protobuf.Empty) { + rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" }; @@ -260,19 +272,23 @@ service AnalyticsAdminService { } // Updates a measurement protocol secret. - rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) + returns (MeasurementProtocolSecret) { option (google.api.http) = { patch: "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" body: "measurement_protocol_secret" }; - option (google.api.method_signature) = "measurement_protocol_secret,update_mask"; + option (google.api.method_signature) = + "measurement_protocol_secret,update_mask"; } // Acknowledges the terms of user data collection for the specified property. // // This acknowledgement must be completed (either in the Google Analytics UI - // or via this API) before MeasurementProtocolSecret resources may be created. - rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) { + // or through this API) before MeasurementProtocolSecret resources may be + // created. + rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) + returns (AcknowledgeUserDataCollectionResponse) { option (google.api.http) = { post: "/v1beta/{property=properties/*}:acknowledgeUserDataCollection" body: "*" @@ -281,7 +297,8 @@ service AnalyticsAdminService { // Searches through all changes to an account or its children given the // specified set of filters. - rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) { + rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) + returns (SearchChangeHistoryEventsResponse) { option (google.api.http) = { post: "/v1beta/{account=accounts/*}:searchChangeHistoryEvents" body: "*" @@ -289,7 +306,8 @@ service AnalyticsAdminService { } // Creates a conversion event with the specified attributes. - rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent) { + rpc CreateConversionEvent(CreateConversionEventRequest) + returns (ConversionEvent) { option (google.api.http) = { post: "/v1beta/{parent=properties/*}/conversionEvents" body: "conversion_event" @@ -306,7 +324,8 @@ service AnalyticsAdminService { } // Deletes a conversion event in a property. - rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (google.protobuf.Empty) { + rpc DeleteConversionEvent(DeleteConversionEventRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=properties/*/conversionEvents/*}" }; @@ -316,7 +335,8 @@ service AnalyticsAdminService { // Returns a list of conversion events in the specified parent property. // // Returns an empty list if no conversion events are found. - rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse) { + rpc ListConversionEvents(ListConversionEventsRequest) + returns (ListConversionEventsResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/conversionEvents" }; @@ -324,7 +344,8 @@ service AnalyticsAdminService { } // Creates a CustomDimension. - rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension) { + rpc CreateCustomDimension(CreateCustomDimensionRequest) + returns (CustomDimension) { option (google.api.http) = { post: "/v1beta/{parent=properties/*}/customDimensions" body: "custom_dimension" @@ -333,7 +354,8 @@ service AnalyticsAdminService { } // Updates a CustomDimension on a property. - rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension) { + rpc UpdateCustomDimension(UpdateCustomDimensionRequest) + returns (CustomDimension) { option (google.api.http) = { patch: "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}" body: "custom_dimension" @@ -342,7 +364,8 @@ service AnalyticsAdminService { } // Lists CustomDimensions on a property. - rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse) { + rpc ListCustomDimensions(ListCustomDimensionsRequest) + returns (ListCustomDimensionsResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/customDimensions" }; @@ -350,7 +373,8 @@ service AnalyticsAdminService { } // Archives a CustomDimension on a property. - rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (google.protobuf.Empty) { + rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta/{name=properties/*/customDimensions/*}:archive" body: "*" @@ -385,7 +409,8 @@ service AnalyticsAdminService { } // Lists CustomMetrics on a property. - rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse) { + rpc ListCustomMetrics(ListCustomMetricsRequest) + returns (ListCustomMetricsResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/customMetrics" }; @@ -393,7 +418,8 @@ service AnalyticsAdminService { } // Archives a CustomMetric on a property. - rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (google.protobuf.Empty) { + rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1beta/{name=properties/*/customMetrics/*}:archive" body: "*" @@ -410,7 +436,8 @@ service AnalyticsAdminService { } // Returns the singleton data retention settings for this property. - rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings) { + rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) + returns (DataRetentionSettings) { option (google.api.http) = { get: "/v1beta/{name=properties/*/dataRetentionSettings}" }; @@ -418,12 +445,14 @@ service AnalyticsAdminService { } // Updates the singleton data retention settings for this property. - rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings) { + rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) + returns (DataRetentionSettings) { option (google.api.http) = { patch: "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}" body: "data_retention_settings" }; - option (google.api.method_signature) = "data_retention_settings,update_mask"; + option (google.api.method_signature) = + "data_retention_settings,update_mask"; } // Creates a DataStream. @@ -436,7 +465,8 @@ service AnalyticsAdminService { } // Deletes a DataStream on a property. - rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) { + rpc DeleteDataStream(DeleteDataStreamRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=properties/*/dataStreams/*}" }; @@ -453,7 +483,8 @@ service AnalyticsAdminService { } // Lists DataStreams on a property. - rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) { + rpc ListDataStreams(ListDataStreamsRequest) + returns (ListDataStreamsResponse) { option (google.api.http) = { get: "/v1beta/{parent=properties/*}/dataStreams" }; @@ -467,6 +498,141 @@ service AnalyticsAdminService { }; option (google.api.method_signature) = "name"; } + + // Returns a customized report of data access records. The report provides + // records of each time a user reads Google Analytics reporting data. Access + // records are retained for up to 2 years. + // + // Data Access Reports can be requested for a property. The property must be + // in Google Analytics 360. This method is only available to Administrators. + // + // These data access records include GA4 UI Reporting, GA4 UI Explorations, + // GA4 Data API, and other products like Firebase & Admob that can retrieve + // data from Google Analytics through a linkage. These records don't include + // property configuration changes like adding a stream or changing a + // property's time zone. For configuration change history, see + // [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + rpc RunAccessReport(RunAccessReportRequest) + returns (RunAccessReportResponse) { + option (google.api.http) = { + post: "/v1beta/{entity=properties/*}:runAccessReport" + body: "*" + additional_bindings { + post: "/v1beta/{entity=accounts/*}:runAccessReport" + body: "*" + } + }; + } +} + +// The request for a Data Access Record Report. +message RunAccessReportRequest { + // The Data Access Report supports requesting at the property level or account + // level. If requested at the account level, Data Access Reports include all + // access for all properties under that account. + // + // To request at the property level, entity should be for example + // 'properties/123' if "123" is your GA4 property ID. To request at the + // account level, entity should be for example 'accounts/1234' if "1234" is + // your GA4 Account ID. + string entity = 1; + + // The dimensions requested and displayed in the response. Requests are + // allowed up to 9 dimensions. + repeated AccessDimension dimensions = 2; + + // The metrics requested and displayed in the response. Requests are allowed + // up to 10 metrics. + repeated AccessMetric metrics = 3; + + // Date ranges of access records to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the access records for the overlapping days is + // included in the response rows for both date ranges. Requests are allowed up + // to 2 date ranges. + repeated AccessDateRange date_ranges = 4; + + // Dimension filters let you restrict report response to specific + // dimension values which match the filter. For example, filtering on access + // records of a single user. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + AccessFilterExpression dimension_filter = 5; + + // Metric filters allow you to restrict report response to specific metric + // values which match the filter. Metric filters are applied after aggregating + // the report's rows, similar to SQL having-clause. Dimensions cannot be used + // in this filter. + AccessFilterExpression metric_filter = 6; + + // The row count of the start row. The first row is counted as row 0. If + // offset is unspecified, it is treated as 0. If offset is zero, then this + // method will return the first page of results with `limit` entries. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 100,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API may return fewer rows than the requested `limit`, if there aren't + // as many remaining rows as the `limit`. For instance, there are fewer than + // 300 possible values for the dimension `country`, so when reporting on only + // `country`, you can't get more than 300 rows, even if you set `limit` to a + // higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8; + + // This request's time zone if specified. If unspecified, the property's time + // zone is used. The request's time zone is used to interpret the start & end + // dates of the report. + // + // Formatted as strings from the IANA Time Zone database + // (https://www.iana.org/time-zones); for example "America/New_York" or + // "Asia/Tokyo". + string time_zone = 9; + + // Specifies how rows are ordered in the response. + repeated AccessOrderBy order_bys = 10; + + // Toggles whether to return the current state of this Analytics Property's + // quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + // requests, this field must be false. + bool return_entity_quota = 11; +} + +// The customized Data Access Record Report response. +message RunAccessReportResponse { + // The header for a column in the report that corresponds to a specific + // dimension. The number of DimensionHeaders and ordering of DimensionHeaders + // matches the dimensions present in rows. + repeated AccessDimensionHeader dimension_headers = 1; + + // The header for a column in the report that corresponds to a specific + // metric. The number of MetricHeaders and ordering of MetricHeaders matches + // the metrics present in rows. + repeated AccessMetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated AccessRow rows = 3; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 4; + + // The quota state for this Analytics property including this request. This + // field doesn't work with account-level requests. + AccessQuota quota = 5; } // Request message for GetAccount RPC. @@ -531,10 +697,12 @@ message UpdateAccountRequest { // The account's `name` field is used to identify the account. Account account = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The list of fields to be updated. Field names must be in snake case - // (e.g., "field_to_update"). Omitted fields will not be updated. To replace - // the entire entity, use one path with the string "*" to match all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Field names must be in snake + // case (for example, "field_to_update"). Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for ProvisionAccountTicket RPC. @@ -543,7 +711,7 @@ message ProvisionAccountTicketRequest { Account account = 1; // Redirect URI where the user will be sent after accepting Terms of Service. - // Must be configured in Developers Console as a Redirect URI + // Must be configured in Cloud Console as a Redirect URI. string redirect_uri = 2; } @@ -621,10 +789,12 @@ message UpdatePropertyRequest { // updated. Property property = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The list of fields to be updated. Field names must be in snake case - // (e.g., "field_to_update"). Omitted fields will not be updated. To replace - // the entire entity, use one path with the string "*" to match all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for CreateProperty RPC. @@ -693,7 +863,7 @@ message ListFirebaseLinksRequest { // A page token, received from a previous `ListFirebaseLinks` call. // Provide this to retrieve the subsequent page. - // When paginating, all other parameters provided to `ListProperties` must + // When paginating, all other parameters provided to `ListFirebaseLinks` must // match the call that provided the page token. string page_token = 3; } @@ -729,10 +899,12 @@ message UpdateGoogleAdsLinkRequest { // The GoogleAdsLink to update GoogleAdsLink google_ads_link = 1; - // Required. The list of fields to be updated. Field names must be in snake case - // (e.g., "field_to_update"). Omitted fields will not be updated. To replace - // the entire entity, use one path with the string "*" to match all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for DeleteGoogleAdsLink RPC. @@ -827,8 +999,8 @@ message AcknowledgeUserDataCollectionRequest { } ]; - // Required. An acknowledgement that the caller of this method understands the terms - // of user data collection. + // Required. An acknowledgement that the caller of this method understands the + // terms of user data collection. // // This field must contain the exact value: // "I acknowledge that I have the necessary privacy disclosures and rights @@ -839,13 +1011,12 @@ message AcknowledgeUserDataCollectionRequest { } // Response message for AcknowledgeUserDataCollection RPC. -message AcknowledgeUserDataCollectionResponse { - -} +message AcknowledgeUserDataCollectionResponse {} // Request message for SearchChangeHistoryEvents RPC. message SearchChangeHistoryEventsRequest { - // Required. The account resource for which to return change history resources. + // Required. The account resource for which to return change history + // resources. string account = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -862,22 +1033,26 @@ message SearchChangeHistoryEventsRequest { } ]; - // Optional. If set, only return changes if they are for a resource that matches at - // least one of these types. - repeated ChangeHistoryResourceType resource_type = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If set, only return changes if they are for a resource that + // matches at least one of these types. + repeated ChangeHistoryResourceType resource_type = 3 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set, only return changes that match one or more of these types of - // actions. + // Optional. If set, only return changes that match one or more of these types + // of actions. repeated ActionType action = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set, only return changes if they are made by a user in this list. + // Optional. If set, only return changes if they are made by a user in this + // list. repeated string actor_email = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. If set, only return changes made after this time (inclusive). - google.protobuf.Timestamp earliest_change_time = 6 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp earliest_change_time = 6 + [(google.api.field_behavior) = OPTIONAL]; // Optional. If set, only return changes made before this time (inclusive). - google.protobuf.Timestamp latest_change_time = 7 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp latest_change_time = 7 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of ChangeHistoryEvent items to return. // The service may return fewer than this value, even if there are additional @@ -885,10 +1060,11 @@ message SearchChangeHistoryEventsRequest { // The maximum value is 200 (higher values will be coerced to the maximum). int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to `SearchChangeHistoryEvents` must match the call that - // provided the page token. + // Optional. A page token, received from a previous + // `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + // page. When paginating, all other parameters provided to + // `SearchChangeHistoryEvents` must match the call that provided the page + // token. string page_token = 9 [(google.api.field_behavior) = OPTIONAL]; } @@ -927,7 +1103,8 @@ message CreateMeasurementProtocolSecretRequest { ]; // Required. The measurement protocol secret to create. - MeasurementProtocolSecret measurement_protocol_secret = 2 [(google.api.field_behavior) = REQUIRED]; + MeasurementProtocolSecret measurement_protocol_secret = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for DeleteMeasurementProtocolSecret RPC @@ -946,7 +1123,8 @@ message DeleteMeasurementProtocolSecretRequest { // Request message for UpdateMeasurementProtocolSecret RPC message UpdateMeasurementProtocolSecretRequest { // Required. The measurement protocol secret to update. - MeasurementProtocolSecret measurement_protocol_secret = 1 [(google.api.field_behavior) = REQUIRED]; + MeasurementProtocolSecret measurement_protocol_secret = 1 + [(google.api.field_behavior) = REQUIRED]; // The list of fields to be updated. Omitted fields will not be updated. google.protobuf.FieldMask update_mask = 2; @@ -991,8 +1169,8 @@ message CreateConversionEventRequest { // Required. The conversion event to create. ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The resource name of the parent property where this conversion event will - // be created. Format: properties/123 + // Required. The resource name of the parent property where this conversion + // event will be created. Format: properties/123 string parent = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1079,10 +1257,11 @@ message UpdateCustomDimensionRequest { // The CustomDimension to update CustomDimension custom_dimension = 1; - // Required. The list of fields to be updated. Omitted fields will not be updated. - // To replace the entire entity, use one path with the string "*" to match - // all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Omitted fields will not be + // updated. To replace the entire entity, use one path with the string "*" to + // match all fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for ListCustomDimensions RPC. @@ -1161,10 +1340,11 @@ message UpdateCustomMetricRequest { // The CustomMetric to update CustomMetric custom_metric = 1; - // Required. The list of fields to be updated. Omitted fields will not be updated. - // To replace the entire entity, use one path with the string "*" to match - // all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Omitted fields will not be + // updated. To replace the entire entity, use one path with the string "*" to + // match all fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for ListCustomMetrics RPC. @@ -1242,12 +1422,15 @@ message GetDataRetentionSettingsRequest { message UpdateDataRetentionSettingsRequest { // Required. The settings to update. // The `name` field is used to identify the settings to be updated. - DataRetentionSettings data_retention_settings = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The list of fields to be updated. Field names must be in snake case - // (e.g., "field_to_update"). Omitted fields will not be updated. To replace - // the entire entity, use one path with the string "*" to match all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + DataRetentionSettings data_retention_settings = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for CreateDataStream RPC. @@ -1281,10 +1464,11 @@ message UpdateDataStreamRequest { // The DataStream to update DataStream data_stream = 1; - // Required. The list of fields to be updated. Omitted fields will not be updated. - // To replace the entire entity, use one path with the string "*" to match - // all fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. The list of fields to be updated. Omitted fields will not be + // updated. To replace the entire entity, use one path with the string "*" to + // match all fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for ListDataStreams RPC. diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto index 2a7010305a2..43b299b7f58 100644 --- a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -223,10 +223,12 @@ message Account { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this account was originally created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when account payload fields were last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Human-readable display name for this account. string display_name = 4 [(google.api.field_behavior) = REQUIRED]; @@ -251,17 +253,19 @@ message Property { // Example: "properties/1000" string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Immutable. The property type for this Property resource. When creating a property, if - // the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created - // via Google Analytics Admin API. + // Immutable. The property type for this Property resource. When creating a + // property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then + // "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" + // types cannot yet be created with the Google Analytics Admin API. PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE]; // Output only. Time when the entity was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when entity payload fields were last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Resource name of this property's logical parent. // @@ -279,9 +283,9 @@ message Property { // Example: AUTOMOTIVE, FOOD_AND_DRINK IndustryCategory industry_category = 6; - // Required. Reporting Time Zone, used as the day boundary for reports, regardless of - // where the data originates. If the time zone honors DST, Analytics will - // automatically adjust for the changes. + // Required. Reporting Time Zone, used as the day boundary for reports, + // regardless of where the data originates. If the time zone honors DST, + // Analytics will automatically adjust for the changes. // // NOTE: Changing the time zone only affects data going forward, and is not // applied retroactively. @@ -297,17 +301,20 @@ message Property { // Examples: "USD", "EUR", "JPY" string currency_code = 8; - // Output only. The Google Analytics service level that applies to this property. + // Output only. The Google Analytics service level that applies to this + // property. ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If set, the time at which this property was trashed. If not set, then this - // property is not currently in the trash can. - google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If set, the time at which this property was trashed. If not + // set, then this property is not currently in the trash can. + google.protobuf.Timestamp delete_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If set, the time at which this trashed property will be permanently - // deleted. If not set, then this property is not currently in the trash can - // and is not slated to be deleted. - google.protobuf.Timestamp expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If set, the time at which this trashed property will be + // permanently deleted. If not set, then this property is not currently in the + // trash can and is not slated to be deleted. + google.protobuf.Timestamp expire_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. The resource name of the parent account // Format: accounts/{account_id} @@ -417,10 +424,12 @@ message DataStream { string display_name = 3; // Output only. Time when this stream was originally created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when stream payload fields were last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A link between a GA4 property and a Firebase project. @@ -433,9 +442,9 @@ message FirebaseLink { // Output only. Example format: properties/1234/firebaseLinks/5678 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Immutable. Firebase project resource name. When creating a FirebaseLink, you may - // provide this resource name using either a project number or project ID. - // Once this resource has been created, returned FirebaseLinks will always + // Immutable. Firebase project resource name. When creating a FirebaseLink, + // you may provide this resource name using either a project number or project + // ID. Once this resource has been created, returned FirebaseLinks will always // have a project_name that contains a project number. // // Format: 'projects/{project number}' @@ -443,7 +452,8 @@ message FirebaseLink { string project = 2 [(google.api.field_behavior) = IMMUTABLE]; // Output only. Time when this FirebaseLink was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A link between a GA4 property and a Google Ads account. @@ -453,7 +463,8 @@ message GoogleAdsLink { pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" }; - // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // Output only. Format: + // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} // // Note: googleAdsLinkId is not the Google Ads customer ID. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -471,10 +482,12 @@ message GoogleAdsLink { google.protobuf.BoolValue ads_personalization_enabled = 5; // Output only. Time when this link was originally created. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this link was last updated. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Email address of the user that created the link. // An empty string will be returned if the email address can't be retrieved. @@ -531,8 +544,8 @@ message AccountSummary { // Format: accounts/{account_id} // Example: "accounts/1000" string account = 2 [(google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/Account" - }]; + type: "analyticsadmin.googleapis.com/Account" + }]; // Display name for the account referred to in this account summary. string display_name = 3; @@ -547,8 +560,8 @@ message PropertySummary { // Format: properties/{property_id} // Example: "properties/1000" string property = 1 [(google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/Property" - }]; + type: "analyticsadmin.googleapis.com/Property" + }]; // Display name for the property referred to in this property summary. string display_name = 2; @@ -571,17 +584,16 @@ message MeasurementProtocolSecret { pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" }; - // Output only. Resource name of this secret. This secret may be a child of any type of - // stream. - // Format: + // Output only. Resource name of this secret. This secret may be a child of + // any type of stream. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Human-readable display name for this secret. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. The measurement protocol secret value. Pass this value to the api_secret - // field of the Measurement Protocol API when sending hits to this + // Output only. The measurement protocol secret value. Pass this value to the + // api_secret field of the Measurement Protocol API when sending hits to this // secret's parent property. string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -677,16 +689,18 @@ message ConversionEvent { string event_name = 2 [(google.api.field_behavior) = IMMUTABLE]; // Output only. Time when this conversion event was created in the property. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If set, this event can currently be deleted via DeleteConversionEvent. + // Output only. If set, this event can currently be deleted with + // DeleteConversionEvent. bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If set to true, this conversion event refers to a custom event. If set to - // false, this conversion event refers to a default event in GA. Default - // events typically have special meaning in GA. Default events are usually - // created for you by the GA system, but in some cases can be created by - // property admins. Custom events count towards the maximum number of + // Output only. If set to true, this conversion event refers to a custom + // event. If set to false, this conversion event refers to a default event in + // GA. Default events typically have special meaning in GA. Default events are + // usually created for you by the GA system, but in some cases can be created + // by property admins. Custom events count towards the maximum number of // custom conversion events that may be created per property. bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -728,14 +742,15 @@ message CustomDimension { (google.api.field_behavior) = IMMUTABLE ]; - // Required. Display name for this custom dimension as shown in the Analytics UI. - // Max length of 82 characters, alphanumeric plus space and underscore + // Required. Display name for this custom dimension as shown in the Analytics + // UI. Max length of 82 characters, alphanumeric plus space and underscore // starting with a letter. Legacy system-generated display names may contain // square brackets, but updates to this field will never permit square // brackets. string display_name = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. Description for this custom dimension. Max length of 150 characters. + // Optional. Description for this custom dimension. Max length of 150 + // characters. string description = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. Immutable. The scope of this dimension. @@ -744,11 +759,12 @@ message CustomDimension { (google.api.field_behavior) = IMMUTABLE ]; - // Optional. If set to true, sets this dimension as NPA and excludes it from ads - // personalization. + // Optional. If set to true, sets this dimension as NPA and excludes it from + // ads personalization. // // This is currently only supported by user-scoped custom dimensions. - bool disallow_ads_personalization = 6 [(google.api.field_behavior) = OPTIONAL]; + bool disallow_ads_personalization = 6 + [(google.api.field_behavior) = OPTIONAL]; } // A definition for a custom metric. @@ -855,10 +871,11 @@ message CustomMetric { (google.api.field_behavior) = IMMUTABLE ]; - // Optional. Types of restricted data that this metric may contain. Required for metrics - // with CURRENCY measurement unit. Must be empty for metrics with a - // non-CURRENCY measurement unit. - repeated RestrictedMetricType restricted_metric_type = 8 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Types of restricted data that this metric may contain. Required + // for metrics with CURRENCY measurement unit. Must be empty for metrics with + // a non-CURRENCY measurement unit. + repeated RestrictedMetricType restricted_metric_type = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Settings values for data retention. This is a singleton resource. diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts index 0610aaf444c..1e67a25ac9b 100644 --- a/packages/google-analytics-admin/protos/protos.d.ts +++ b/packages/google-analytics-admin/protos/protos.d.ts @@ -25530,6 +25530,2234 @@ export namespace google { /** Namespace v1beta. */ namespace v1beta { + /** Properties of an AccessDimension. */ + interface IAccessDimension { + + /** AccessDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AccessDimension. */ + class AccessDimension implements IAccessDimension { + + /** + * Constructs a new AccessDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessDimension); + + /** AccessDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AccessDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimension instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessDimension): google.analytics.admin.v1beta.AccessDimension; + + /** + * Encodes the specified AccessDimension message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimension.verify|verify} messages. + * @param message AccessDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimension.verify|verify} messages. + * @param message AccessDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessDimension; + + /** + * Decodes an AccessDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessDimension; + + /** + * Verifies an AccessDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessDimension; + + /** + * Creates a plain object from an AccessDimension message. Also converts values to other types if specified. + * @param message AccessDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetric. */ + interface IAccessMetric { + + /** AccessMetric metricName */ + metricName?: (string|null); + } + + /** Represents an AccessMetric. */ + class AccessMetric implements IAccessMetric { + + /** + * Constructs a new AccessMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessMetric); + + /** AccessMetric metricName. */ + public metricName: string; + + /** + * Creates a new AccessMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetric instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessMetric): google.analytics.admin.v1beta.AccessMetric; + + /** + * Encodes the specified AccessMetric message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetric.verify|verify} messages. + * @param message AccessMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetric.verify|verify} messages. + * @param message AccessMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessMetric; + + /** + * Decodes an AccessMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessMetric; + + /** + * Verifies an AccessMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessMetric; + + /** + * Creates a plain object from an AccessMetric message. Also converts values to other types if specified. + * @param message AccessMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessDateRange. */ + interface IAccessDateRange { + + /** AccessDateRange startDate */ + startDate?: (string|null); + + /** AccessDateRange endDate */ + endDate?: (string|null); + } + + /** Represents an AccessDateRange. */ + class AccessDateRange implements IAccessDateRange { + + /** + * Constructs a new AccessDateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessDateRange); + + /** AccessDateRange startDate. */ + public startDate: string; + + /** AccessDateRange endDate. */ + public endDate: string; + + /** + * Creates a new AccessDateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDateRange instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessDateRange): google.analytics.admin.v1beta.AccessDateRange; + + /** + * Encodes the specified AccessDateRange message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDateRange.verify|verify} messages. + * @param message AccessDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDateRange message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDateRange.verify|verify} messages. + * @param message AccessDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessDateRange; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessDateRange; + + /** + * Verifies an AccessDateRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessDateRange; + + /** + * Creates a plain object from an AccessDateRange message. Also converts values to other types if specified. + * @param message AccessDateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessDateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilterExpression. */ + interface IAccessFilterExpression { + + /** AccessFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1beta.IAccessFilterExpressionList|null); + + /** AccessFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1beta.IAccessFilterExpressionList|null); + + /** AccessFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** AccessFilterExpression accessFilter */ + accessFilter?: (google.analytics.admin.v1beta.IAccessFilter|null); + } + + /** Represents an AccessFilterExpression. */ + class AccessFilterExpression implements IAccessFilterExpression { + + /** + * Constructs a new AccessFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessFilterExpression); + + /** AccessFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1beta.IAccessFilterExpressionList|null); + + /** AccessFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1beta.IAccessFilterExpressionList|null); + + /** AccessFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** AccessFilterExpression accessFilter. */ + public accessFilter?: (google.analytics.admin.v1beta.IAccessFilter|null); + + /** AccessFilterExpression oneExpression. */ + public oneExpression?: ("andGroup"|"orGroup"|"notExpression"|"accessFilter"); + + /** + * Creates a new AccessFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessFilterExpression): google.analytics.admin.v1beta.AccessFilterExpression; + + /** + * Encodes the specified AccessFilterExpression message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpression.verify|verify} messages. + * @param message AccessFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpression.verify|verify} messages. + * @param message AccessFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessFilterExpression; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessFilterExpression; + + /** + * Verifies an AccessFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessFilterExpression; + + /** + * Creates a plain object from an AccessFilterExpression message. Also converts values to other types if specified. + * @param message AccessFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilterExpressionList. */ + interface IAccessFilterExpressionList { + + /** AccessFilterExpressionList expressions */ + expressions?: (google.analytics.admin.v1beta.IAccessFilterExpression[]|null); + } + + /** Represents an AccessFilterExpressionList. */ + class AccessFilterExpressionList implements IAccessFilterExpressionList { + + /** + * Constructs a new AccessFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessFilterExpressionList); + + /** AccessFilterExpressionList expressions. */ + public expressions: google.analytics.admin.v1beta.IAccessFilterExpression[]; + + /** + * Creates a new AccessFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessFilterExpressionList): google.analytics.admin.v1beta.AccessFilterExpressionList; + + /** + * Encodes the specified AccessFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpressionList.verify|verify} messages. + * @param message AccessFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpressionList.verify|verify} messages. + * @param message AccessFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessFilterExpressionList; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessFilterExpressionList; + + /** + * Verifies an AccessFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessFilterExpressionList; + + /** + * Creates a plain object from an AccessFilterExpressionList message. Also converts values to other types if specified. + * @param message AccessFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilter. */ + interface IAccessFilter { + + /** AccessFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1beta.IAccessStringFilter|null); + + /** AccessFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1beta.IAccessInListFilter|null); + + /** AccessFilter numericFilter */ + numericFilter?: (google.analytics.admin.v1beta.IAccessNumericFilter|null); + + /** AccessFilter betweenFilter */ + betweenFilter?: (google.analytics.admin.v1beta.IAccessBetweenFilter|null); + + /** AccessFilter fieldName */ + fieldName?: (string|null); + } + + /** Represents an AccessFilter. */ + class AccessFilter implements IAccessFilter { + + /** + * Constructs a new AccessFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessFilter); + + /** AccessFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1beta.IAccessStringFilter|null); + + /** AccessFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1beta.IAccessInListFilter|null); + + /** AccessFilter numericFilter. */ + public numericFilter?: (google.analytics.admin.v1beta.IAccessNumericFilter|null); + + /** AccessFilter betweenFilter. */ + public betweenFilter?: (google.analytics.admin.v1beta.IAccessBetweenFilter|null); + + /** AccessFilter fieldName. */ + public fieldName: string; + + /** AccessFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new AccessFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilter instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessFilter): google.analytics.admin.v1beta.AccessFilter; + + /** + * Encodes the specified AccessFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilter.verify|verify} messages. + * @param message AccessFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilter.verify|verify} messages. + * @param message AccessFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessFilter; + + /** + * Decodes an AccessFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessFilter; + + /** + * Verifies an AccessFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessFilter; + + /** + * Creates a plain object from an AccessFilter message. Also converts values to other types if specified. + * @param message AccessFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessStringFilter. */ + interface IAccessStringFilter { + + /** AccessStringFilter matchType */ + matchType?: (google.analytics.admin.v1beta.AccessStringFilter.MatchType|keyof typeof google.analytics.admin.v1beta.AccessStringFilter.MatchType|null); + + /** AccessStringFilter value */ + value?: (string|null); + + /** AccessStringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an AccessStringFilter. */ + class AccessStringFilter implements IAccessStringFilter { + + /** + * Constructs a new AccessStringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessStringFilter); + + /** AccessStringFilter matchType. */ + public matchType: (google.analytics.admin.v1beta.AccessStringFilter.MatchType|keyof typeof google.analytics.admin.v1beta.AccessStringFilter.MatchType); + + /** AccessStringFilter value. */ + public value: string; + + /** AccessStringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new AccessStringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessStringFilter instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessStringFilter): google.analytics.admin.v1beta.AccessStringFilter; + + /** + * Encodes the specified AccessStringFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessStringFilter.verify|verify} messages. + * @param message AccessStringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessStringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessStringFilter.verify|verify} messages. + * @param message AccessStringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessStringFilter; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessStringFilter; + + /** + * Verifies an AccessStringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessStringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessStringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessStringFilter; + + /** + * Creates a plain object from an AccessStringFilter message. Also converts values to other types if specified. + * @param message AccessStringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessStringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessStringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessStringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessStringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an AccessInListFilter. */ + interface IAccessInListFilter { + + /** AccessInListFilter values */ + values?: (string[]|null); + + /** AccessInListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an AccessInListFilter. */ + class AccessInListFilter implements IAccessInListFilter { + + /** + * Constructs a new AccessInListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessInListFilter); + + /** AccessInListFilter values. */ + public values: string[]; + + /** AccessInListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new AccessInListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessInListFilter instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessInListFilter): google.analytics.admin.v1beta.AccessInListFilter; + + /** + * Encodes the specified AccessInListFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessInListFilter.verify|verify} messages. + * @param message AccessInListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessInListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessInListFilter.verify|verify} messages. + * @param message AccessInListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessInListFilter; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessInListFilter; + + /** + * Verifies an AccessInListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessInListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessInListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessInListFilter; + + /** + * Creates a plain object from an AccessInListFilter message. Also converts values to other types if specified. + * @param message AccessInListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessInListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessInListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessInListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessNumericFilter. */ + interface IAccessNumericFilter { + + /** AccessNumericFilter operation */ + operation?: (google.analytics.admin.v1beta.AccessNumericFilter.Operation|keyof typeof google.analytics.admin.v1beta.AccessNumericFilter.Operation|null); + + /** AccessNumericFilter value */ + value?: (google.analytics.admin.v1beta.INumericValue|null); + } + + /** Represents an AccessNumericFilter. */ + class AccessNumericFilter implements IAccessNumericFilter { + + /** + * Constructs a new AccessNumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessNumericFilter); + + /** AccessNumericFilter operation. */ + public operation: (google.analytics.admin.v1beta.AccessNumericFilter.Operation|keyof typeof google.analytics.admin.v1beta.AccessNumericFilter.Operation); + + /** AccessNumericFilter value. */ + public value?: (google.analytics.admin.v1beta.INumericValue|null); + + /** + * Creates a new AccessNumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessNumericFilter instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessNumericFilter): google.analytics.admin.v1beta.AccessNumericFilter; + + /** + * Encodes the specified AccessNumericFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessNumericFilter.verify|verify} messages. + * @param message AccessNumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessNumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessNumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessNumericFilter.verify|verify} messages. + * @param message AccessNumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessNumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessNumericFilter; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessNumericFilter; + + /** + * Verifies an AccessNumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessNumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessNumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessNumericFilter; + + /** + * Creates a plain object from an AccessNumericFilter message. Also converts values to other types if specified. + * @param message AccessNumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessNumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessNumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessNumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessNumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an AccessBetweenFilter. */ + interface IAccessBetweenFilter { + + /** AccessBetweenFilter fromValue */ + fromValue?: (google.analytics.admin.v1beta.INumericValue|null); + + /** AccessBetweenFilter toValue */ + toValue?: (google.analytics.admin.v1beta.INumericValue|null); + } + + /** Represents an AccessBetweenFilter. */ + class AccessBetweenFilter implements IAccessBetweenFilter { + + /** + * Constructs a new AccessBetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessBetweenFilter); + + /** AccessBetweenFilter fromValue. */ + public fromValue?: (google.analytics.admin.v1beta.INumericValue|null); + + /** AccessBetweenFilter toValue. */ + public toValue?: (google.analytics.admin.v1beta.INumericValue|null); + + /** + * Creates a new AccessBetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessBetweenFilter instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessBetweenFilter): google.analytics.admin.v1beta.AccessBetweenFilter; + + /** + * Encodes the specified AccessBetweenFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessBetweenFilter.verify|verify} messages. + * @param message AccessBetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessBetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessBetweenFilter.verify|verify} messages. + * @param message AccessBetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessBetweenFilter; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessBetweenFilter; + + /** + * Verifies an AccessBetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessBetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessBetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessBetweenFilter; + + /** + * Creates a plain object from an AccessBetweenFilter message. Also converts values to other types if specified. + * @param message AccessBetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessBetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessBetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessBetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.admin.v1beta.INumericValue): google.analytics.admin.v1beta.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessOrderBy. */ + interface IAccessOrderBy { + + /** AccessOrderBy metric */ + metric?: (google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy|null); + + /** AccessOrderBy dimension */ + dimension?: (google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy|null); + + /** AccessOrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an AccessOrderBy. */ + class AccessOrderBy implements IAccessOrderBy { + + /** + * Constructs a new AccessOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessOrderBy); + + /** AccessOrderBy metric. */ + public metric?: (google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy|null); + + /** AccessOrderBy dimension. */ + public dimension?: (google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy|null); + + /** AccessOrderBy desc. */ + public desc: boolean; + + /** AccessOrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new AccessOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessOrderBy): google.analytics.admin.v1beta.AccessOrderBy; + + /** + * Encodes the specified AccessOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.verify|verify} messages. + * @param message AccessOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.verify|verify} messages. + * @param message AccessOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessOrderBy; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessOrderBy; + + /** + * Verifies an AccessOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessOrderBy; + + /** + * Creates a plain object from an AccessOrderBy message. Also converts values to other types if specified. + * @param message AccessOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessOrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy): google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy): google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of an AccessDimensionHeader. */ + interface IAccessDimensionHeader { + + /** AccessDimensionHeader dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AccessDimensionHeader. */ + class AccessDimensionHeader implements IAccessDimensionHeader { + + /** + * Constructs a new AccessDimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessDimensionHeader); + + /** AccessDimensionHeader dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AccessDimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimensionHeader instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessDimensionHeader): google.analytics.admin.v1beta.AccessDimensionHeader; + + /** + * Encodes the specified AccessDimensionHeader message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionHeader.verify|verify} messages. + * @param message AccessDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionHeader.verify|verify} messages. + * @param message AccessDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessDimensionHeader; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessDimensionHeader; + + /** + * Verifies an AccessDimensionHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessDimensionHeader; + + /** + * Creates a plain object from an AccessDimensionHeader message. Also converts values to other types if specified. + * @param message AccessDimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessDimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetricHeader. */ + interface IAccessMetricHeader { + + /** AccessMetricHeader metricName */ + metricName?: (string|null); + } + + /** Represents an AccessMetricHeader. */ + class AccessMetricHeader implements IAccessMetricHeader { + + /** + * Constructs a new AccessMetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessMetricHeader); + + /** AccessMetricHeader metricName. */ + public metricName: string; + + /** + * Creates a new AccessMetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetricHeader instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessMetricHeader): google.analytics.admin.v1beta.AccessMetricHeader; + + /** + * Encodes the specified AccessMetricHeader message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricHeader.verify|verify} messages. + * @param message AccessMetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetricHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricHeader.verify|verify} messages. + * @param message AccessMetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessMetricHeader; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessMetricHeader; + + /** + * Verifies an AccessMetricHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessMetricHeader; + + /** + * Creates a plain object from an AccessMetricHeader message. Also converts values to other types if specified. + * @param message AccessMetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessMetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessRow. */ + interface IAccessRow { + + /** AccessRow dimensionValues */ + dimensionValues?: (google.analytics.admin.v1beta.IAccessDimensionValue[]|null); + + /** AccessRow metricValues */ + metricValues?: (google.analytics.admin.v1beta.IAccessMetricValue[]|null); + } + + /** Represents an AccessRow. */ + class AccessRow implements IAccessRow { + + /** + * Constructs a new AccessRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessRow); + + /** AccessRow dimensionValues. */ + public dimensionValues: google.analytics.admin.v1beta.IAccessDimensionValue[]; + + /** AccessRow metricValues. */ + public metricValues: google.analytics.admin.v1beta.IAccessMetricValue[]; + + /** + * Creates a new AccessRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessRow instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessRow): google.analytics.admin.v1beta.AccessRow; + + /** + * Encodes the specified AccessRow message. Does not implicitly {@link google.analytics.admin.v1beta.AccessRow.verify|verify} messages. + * @param message AccessRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessRow message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessRow.verify|verify} messages. + * @param message AccessRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessRow; + + /** + * Decodes an AccessRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessRow; + + /** + * Verifies an AccessRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessRow; + + /** + * Creates a plain object from an AccessRow message. Also converts values to other types if specified. + * @param message AccessRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessDimensionValue. */ + interface IAccessDimensionValue { + + /** AccessDimensionValue value */ + value?: (string|null); + } + + /** Represents an AccessDimensionValue. */ + class AccessDimensionValue implements IAccessDimensionValue { + + /** + * Constructs a new AccessDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessDimensionValue); + + /** AccessDimensionValue value. */ + public value: string; + + /** + * Creates a new AccessDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimensionValue instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessDimensionValue): google.analytics.admin.v1beta.AccessDimensionValue; + + /** + * Encodes the specified AccessDimensionValue message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionValue.verify|verify} messages. + * @param message AccessDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimensionValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionValue.verify|verify} messages. + * @param message AccessDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessDimensionValue; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessDimensionValue; + + /** + * Verifies an AccessDimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessDimensionValue; + + /** + * Creates a plain object from an AccessDimensionValue message. Also converts values to other types if specified. + * @param message AccessDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetricValue. */ + interface IAccessMetricValue { + + /** AccessMetricValue value */ + value?: (string|null); + } + + /** Represents an AccessMetricValue. */ + class AccessMetricValue implements IAccessMetricValue { + + /** + * Constructs a new AccessMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessMetricValue); + + /** AccessMetricValue value. */ + public value: string; + + /** + * Creates a new AccessMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetricValue instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessMetricValue): google.analytics.admin.v1beta.AccessMetricValue; + + /** + * Encodes the specified AccessMetricValue message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricValue.verify|verify} messages. + * @param message AccessMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetricValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricValue.verify|verify} messages. + * @param message AccessMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessMetricValue; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessMetricValue; + + /** + * Verifies an AccessMetricValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessMetricValue; + + /** + * Creates a plain object from an AccessMetricValue message. Also converts values to other types if specified. + * @param message AccessMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessQuota. */ + interface IAccessQuota { + + /** AccessQuota tokensPerDay */ + tokensPerDay?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerHour */ + tokensPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota concurrentRequests */ + concurrentRequests?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerProjectPerHour */ + tokensPerProjectPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + } + + /** Represents an AccessQuota. */ + class AccessQuota implements IAccessQuota { + + /** + * Constructs a new AccessQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessQuota); + + /** AccessQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerProjectPerHour. */ + public tokensPerProjectPerHour?: (google.analytics.admin.v1beta.IAccessQuotaStatus|null); + + /** + * Creates a new AccessQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessQuota instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessQuota): google.analytics.admin.v1beta.AccessQuota; + + /** + * Encodes the specified AccessQuota message. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuota.verify|verify} messages. + * @param message AccessQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessQuota message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuota.verify|verify} messages. + * @param message AccessQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessQuota; + + /** + * Decodes an AccessQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessQuota; + + /** + * Verifies an AccessQuota message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessQuota; + + /** + * Creates a plain object from an AccessQuota message. Also converts values to other types if specified. + * @param message AccessQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessQuotaStatus. */ + interface IAccessQuotaStatus { + + /** AccessQuotaStatus consumed */ + consumed?: (number|null); + + /** AccessQuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents an AccessQuotaStatus. */ + class AccessQuotaStatus implements IAccessQuotaStatus { + + /** + * Constructs a new AccessQuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccessQuotaStatus); + + /** AccessQuotaStatus consumed. */ + public consumed: number; + + /** AccessQuotaStatus remaining. */ + public remaining: number; + + /** + * Creates a new AccessQuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessQuotaStatus instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccessQuotaStatus): google.analytics.admin.v1beta.AccessQuotaStatus; + + /** + * Encodes the specified AccessQuotaStatus message. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuotaStatus.verify|verify} messages. + * @param message AccessQuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccessQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessQuotaStatus message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuotaStatus.verify|verify} messages. + * @param message AccessQuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccessQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccessQuotaStatus; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccessQuotaStatus; + + /** + * Verifies an AccessQuotaStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessQuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessQuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccessQuotaStatus; + + /** + * Creates a plain object from an AccessQuotaStatus message. Also converts values to other types if specified. + * @param message AccessQuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccessQuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessQuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessQuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an AnalyticsAdminService */ class AnalyticsAdminService extends $protobuf.rpc.Service { @@ -26207,6 +28435,20 @@ export namespace google { * @returns Promise */ public getDataStream(request: google.analytics.admin.v1beta.IGetDataStreamRequest): Promise; + + /** + * Calls RunAccessReport. + * @param request RunAccessReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunAccessReportResponse + */ + public runAccessReport(request: google.analytics.admin.v1beta.IRunAccessReportRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.RunAccessReportCallback): void; + + /** + * Calls RunAccessReport. + * @param request RunAccessReportRequest message or plain object + * @returns Promise + */ + public runAccessReport(request: google.analytics.admin.v1beta.IRunAccessReportRequest): Promise; } namespace AnalyticsAdminService { @@ -26539,6 +28781,291 @@ export namespace google { * @param [response] DataStream */ type GetDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|runAccessReport}. + * @param error Error, if any + * @param [response] RunAccessReportResponse + */ + type RunAccessReportCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.RunAccessReportResponse) => void; + } + + /** Properties of a RunAccessReportRequest. */ + interface IRunAccessReportRequest { + + /** RunAccessReportRequest entity */ + entity?: (string|null); + + /** RunAccessReportRequest dimensions */ + dimensions?: (google.analytics.admin.v1beta.IAccessDimension[]|null); + + /** RunAccessReportRequest metrics */ + metrics?: (google.analytics.admin.v1beta.IAccessMetric[]|null); + + /** RunAccessReportRequest dateRanges */ + dateRanges?: (google.analytics.admin.v1beta.IAccessDateRange[]|null); + + /** RunAccessReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** RunAccessReportRequest metricFilter */ + metricFilter?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** RunAccessReportRequest offset */ + offset?: (number|Long|string|null); + + /** RunAccessReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunAccessReportRequest timeZone */ + timeZone?: (string|null); + + /** RunAccessReportRequest orderBys */ + orderBys?: (google.analytics.admin.v1beta.IAccessOrderBy[]|null); + + /** RunAccessReportRequest returnEntityQuota */ + returnEntityQuota?: (boolean|null); + } + + /** Represents a RunAccessReportRequest. */ + class RunAccessReportRequest implements IRunAccessReportRequest { + + /** + * Constructs a new RunAccessReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IRunAccessReportRequest); + + /** RunAccessReportRequest entity. */ + public entity: string; + + /** RunAccessReportRequest dimensions. */ + public dimensions: google.analytics.admin.v1beta.IAccessDimension[]; + + /** RunAccessReportRequest metrics. */ + public metrics: google.analytics.admin.v1beta.IAccessMetric[]; + + /** RunAccessReportRequest dateRanges. */ + public dateRanges: google.analytics.admin.v1beta.IAccessDateRange[]; + + /** RunAccessReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** RunAccessReportRequest metricFilter. */ + public metricFilter?: (google.analytics.admin.v1beta.IAccessFilterExpression|null); + + /** RunAccessReportRequest offset. */ + public offset: (number|Long|string); + + /** RunAccessReportRequest limit. */ + public limit: (number|Long|string); + + /** RunAccessReportRequest timeZone. */ + public timeZone: string; + + /** RunAccessReportRequest orderBys. */ + public orderBys: google.analytics.admin.v1beta.IAccessOrderBy[]; + + /** RunAccessReportRequest returnEntityQuota. */ + public returnEntityQuota: boolean; + + /** + * Creates a new RunAccessReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAccessReportRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IRunAccessReportRequest): google.analytics.admin.v1beta.RunAccessReportRequest; + + /** + * Encodes the specified RunAccessReportRequest message. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportRequest.verify|verify} messages. + * @param message RunAccessReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IRunAccessReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAccessReportRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportRequest.verify|verify} messages. + * @param message RunAccessReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IRunAccessReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.RunAccessReportRequest; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.RunAccessReportRequest; + + /** + * Verifies a RunAccessReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunAccessReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAccessReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.RunAccessReportRequest; + + /** + * Creates a plain object from a RunAccessReportRequest message. Also converts values to other types if specified. + * @param message RunAccessReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.RunAccessReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAccessReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAccessReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunAccessReportResponse. */ + interface IRunAccessReportResponse { + + /** RunAccessReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.admin.v1beta.IAccessDimensionHeader[]|null); + + /** RunAccessReportResponse metricHeaders */ + metricHeaders?: (google.analytics.admin.v1beta.IAccessMetricHeader[]|null); + + /** RunAccessReportResponse rows */ + rows?: (google.analytics.admin.v1beta.IAccessRow[]|null); + + /** RunAccessReportResponse rowCount */ + rowCount?: (number|null); + + /** RunAccessReportResponse quota */ + quota?: (google.analytics.admin.v1beta.IAccessQuota|null); + } + + /** Represents a RunAccessReportResponse. */ + class RunAccessReportResponse implements IRunAccessReportResponse { + + /** + * Constructs a new RunAccessReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IRunAccessReportResponse); + + /** RunAccessReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.admin.v1beta.IAccessDimensionHeader[]; + + /** RunAccessReportResponse metricHeaders. */ + public metricHeaders: google.analytics.admin.v1beta.IAccessMetricHeader[]; + + /** RunAccessReportResponse rows. */ + public rows: google.analytics.admin.v1beta.IAccessRow[]; + + /** RunAccessReportResponse rowCount. */ + public rowCount: number; + + /** RunAccessReportResponse quota. */ + public quota?: (google.analytics.admin.v1beta.IAccessQuota|null); + + /** + * Creates a new RunAccessReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAccessReportResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IRunAccessReportResponse): google.analytics.admin.v1beta.RunAccessReportResponse; + + /** + * Encodes the specified RunAccessReportResponse message. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportResponse.verify|verify} messages. + * @param message RunAccessReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IRunAccessReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAccessReportResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportResponse.verify|verify} messages. + * @param message RunAccessReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IRunAccessReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.RunAccessReportResponse; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.RunAccessReportResponse; + + /** + * Verifies a RunAccessReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunAccessReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAccessReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.RunAccessReportResponse; + + /** + * Creates a plain object from a RunAccessReportResponse message. Also converts values to other types if specified. + * @param message RunAccessReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.RunAccessReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAccessReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAccessReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetAccountRequest. */ diff --git a/packages/google-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js index f868ad92faa..7ccb0fa0b97 100644 --- a/packages/google-analytics-admin/protos/protos.js +++ b/packages/google-analytics-admin/protos/protos.js @@ -59545,1590 +59545,7835 @@ */ var v1beta = {}; - v1beta.AnalyticsAdminService = (function() { + v1beta.AccessDimension = (function() { /** - * Constructs a new AnalyticsAdminService service. + * Properties of an AccessDimension. * @memberof google.analytics.admin.v1beta - * @classdesc Represents an AnalyticsAdminService - * @extends $protobuf.rpc.Service + * @interface IAccessDimension + * @property {string|null} [dimensionName] AccessDimension dimensionName + */ + + /** + * Constructs a new AccessDimension. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessDimension. + * @implements IAccessDimension * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.analytics.admin.v1beta.IAccessDimension=} [properties] Properties to set */ - function AnalyticsAdminService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function AccessDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (AnalyticsAdminService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnalyticsAdminService; + /** + * AccessDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1beta.AccessDimension + * @instance + */ + AccessDimension.prototype.dimensionName = ""; /** - * Creates new AnalyticsAdminService service using the specified rpc implementation. + * Creates a new AccessDimension instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @memberof google.analytics.admin.v1beta.AccessDimension * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {AnalyticsAdminService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.analytics.admin.v1beta.IAccessDimension=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessDimension} AccessDimension instance */ - AnalyticsAdminService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + AccessDimension.create = function create(properties) { + return new AccessDimension(properties); }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getAccount}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Account} [response] Account + * Encodes the specified AccessDimension message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {google.analytics.admin.v1beta.IAccessDimension} message AccessDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; /** - * Calls GetAccount. - * @function getAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetAccountCallback} callback Node-style callback called with the error, if any, and Account - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {google.analytics.admin.v1beta.IAccessDimension} message AccessDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.getAccount = function getAccount(request, callback) { - return this.rpcCall(getAccount, $root.google.analytics.admin.v1beta.GetAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); - }, "name", { value: "GetAccount" }); + AccessDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetAccount. - * @function getAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessDimension} AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessDimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccounts}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListAccountsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListAccountsResponse} [response] ListAccountsResponse + * Decodes an AccessDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessDimension} AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListAccounts. - * @function listAccounts - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountsCallback} callback Node-style callback called with the error, if any, and ListAccountsResponse - * @returns {undefined} - * @variation 1 + * Verifies an AccessDimension message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AnalyticsAdminService.prototype.listAccounts = function listAccounts(request, callback) { - return this.rpcCall(listAccounts, $root.google.analytics.admin.v1beta.ListAccountsRequest, $root.google.analytics.admin.v1beta.ListAccountsResponse, request, callback); - }, "name", { value: "ListAccounts" }); + AccessDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; /** - * Calls ListAccounts. - * @function listAccounts - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AccessDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessDimension} AccessDimension */ + AccessDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessDimension) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteAccount}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from an AccessDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {google.analytics.admin.v1beta.AccessDimension} message AccessDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; /** - * Calls DeleteAccount. - * @function deleteAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessDimension to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessDimension * @instance - * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccountCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteAccount = function deleteAccount(request, callback) { - return this.rpcCall(deleteAccount, $root.google.analytics.admin.v1beta.DeleteAccountRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteAccount" }); + AccessDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteAccount. - * @function deleteAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AccessDimension + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessDimension"; + }; + + return AccessDimension; + })(); + + v1beta.AccessMetric = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateAccount}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Account} [response] Account + * Properties of an AccessMetric. + * @memberof google.analytics.admin.v1beta + * @interface IAccessMetric + * @property {string|null} [metricName] AccessMetric metricName */ /** - * Calls UpdateAccount. - * @function updateAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccountCallback} callback Node-style callback called with the error, if any, and Account - * @returns {undefined} - * @variation 1 + * Constructs a new AccessMetric. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessMetric. + * @implements IAccessMetric + * @constructor + * @param {google.analytics.admin.v1beta.IAccessMetric=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.updateAccount = function updateAccount(request, callback) { - return this.rpcCall(updateAccount, $root.google.analytics.admin.v1beta.UpdateAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); - }, "name", { value: "UpdateAccount" }); + function AccessMetric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateAccount. - * @function updateAccount - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessMetric metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1beta.AccessMetric * @instance - * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessMetric.prototype.metricName = ""; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|provisionAccountTicket}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ProvisionAccountTicketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} [response] ProvisionAccountTicketResponse + * Creates a new AccessMetric instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {google.analytics.admin.v1beta.IAccessMetric=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessMetric} AccessMetric instance */ + AccessMetric.create = function create(properties) { + return new AccessMetric(properties); + }; /** - * Calls ProvisionAccountTicket. - * @function provisionAccountTicket - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicketCallback} callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessMetric message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetric.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {google.analytics.admin.v1beta.IAccessMetric} message AccessMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.provisionAccountTicket = function provisionAccountTicket(request, callback) { - return this.rpcCall(provisionAccountTicket, $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse, request, callback); - }, "name", { value: "ProvisionAccountTicket" }); + AccessMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; /** - * Calls ProvisionAccountTicket. - * @function provisionAccountTicket - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AccessMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {google.analytics.admin.v1beta.IAccessMetric} message AccessMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccountSummaries}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListAccountSummariesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListAccountSummariesResponse} [response] ListAccountSummariesResponse + * Decodes an AccessMetric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessMetric} AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListAccountSummaries. - * @function listAccountSummaries - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummariesCallback} callback Node-style callback called with the error, if any, and ListAccountSummariesResponse - * @returns {undefined} - * @variation 1 + * Decodes an AccessMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessMetric} AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AnalyticsAdminService.prototype.listAccountSummaries = function listAccountSummaries(request, callback) { - return this.rpcCall(listAccountSummaries, $root.google.analytics.admin.v1beta.ListAccountSummariesRequest, $root.google.analytics.admin.v1beta.ListAccountSummariesResponse, request, callback); - }, "name", { value: "ListAccountSummaries" }); + AccessMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListAccountSummaries. - * @function listAccountSummaries - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an AccessMetric message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + AccessMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getProperty}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetPropertyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Property} [response] Property + * Creates an AccessMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessMetric} AccessMetric */ + AccessMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessMetric) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessMetric(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; /** - * Calls GetProperty. - * @function getProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetPropertyCallback} callback Node-style callback called with the error, if any, and Property - * @returns {undefined} - * @variation 1 + * Creates a plain object from an AccessMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {google.analytics.admin.v1beta.AccessMetric} message AccessMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AnalyticsAdminService.prototype.getProperty = function getProperty(request, callback) { - return this.rpcCall(getProperty, $root.google.analytics.admin.v1beta.GetPropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); - }, "name", { value: "GetProperty" }); + AccessMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; /** - * Calls GetProperty. - * @function getProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessMetric to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessMetric * @instance - * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + AccessMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listProperties}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListPropertiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListPropertiesResponse} [response] ListPropertiesResponse + * Gets the default type url for AccessMetric + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessMetric"; + }; + + return AccessMetric; + })(); + + v1beta.AccessDateRange = (function() { /** - * Calls ListProperties. - * @function listProperties - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListPropertiesCallback} callback Node-style callback called with the error, if any, and ListPropertiesResponse - * @returns {undefined} - * @variation 1 + * Properties of an AccessDateRange. + * @memberof google.analytics.admin.v1beta + * @interface IAccessDateRange + * @property {string|null} [startDate] AccessDateRange startDate + * @property {string|null} [endDate] AccessDateRange endDate */ - Object.defineProperty(AnalyticsAdminService.prototype.listProperties = function listProperties(request, callback) { - return this.rpcCall(listProperties, $root.google.analytics.admin.v1beta.ListPropertiesRequest, $root.google.analytics.admin.v1beta.ListPropertiesResponse, request, callback); - }, "name", { value: "ListProperties" }); /** - * Calls ListProperties. - * @function listProperties - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new AccessDateRange. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessDateRange. + * @implements IAccessDateRange + * @constructor + * @param {google.analytics.admin.v1beta.IAccessDateRange=} [properties] Properties to set */ + function AccessDateRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createProperty}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreatePropertyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Property} [response] Property + * AccessDateRange startDate. + * @member {string} startDate + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @instance */ + AccessDateRange.prototype.startDate = ""; /** - * Calls CreateProperty. - * @function createProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessDateRange endDate. + * @member {string} endDate + * @memberof google.analytics.admin.v1beta.AccessDateRange * @instance - * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreatePropertyCallback} callback Node-style callback called with the error, if any, and Property - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.createProperty = function createProperty(request, callback) { - return this.rpcCall(createProperty, $root.google.analytics.admin.v1beta.CreatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); - }, "name", { value: "CreateProperty" }); + AccessDateRange.prototype.endDate = ""; /** - * Calls CreateProperty. - * @function createProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new AccessDateRange instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {google.analytics.admin.v1beta.IAccessDateRange=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessDateRange} AccessDateRange instance */ + AccessDateRange.create = function create(properties) { + return new AccessDateRange(properties); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteProperty}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeletePropertyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Property} [response] Property + * Encodes the specified AccessDateRange message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {google.analytics.admin.v1beta.IAccessDateRange} message AccessDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessDateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + return writer; + }; /** - * Calls DeleteProperty. - * @function deleteProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeletePropertyCallback} callback Node-style callback called with the error, if any, and Property - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessDateRange message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {google.analytics.admin.v1beta.IAccessDateRange} message AccessDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteProperty = function deleteProperty(request, callback) { - return this.rpcCall(deleteProperty, $root.google.analytics.admin.v1beta.DeletePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); - }, "name", { value: "DeleteProperty" }); + AccessDateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteProperty. - * @function deleteProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessDateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessDateRange} AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessDateRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessDateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateProperty}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdatePropertyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.Property} [response] Property + * Decodes an AccessDateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessDateRange} AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessDateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateProperty. - * @function updateProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdatePropertyCallback} callback Node-style callback called with the error, if any, and Property - * @returns {undefined} - * @variation 1 + * Verifies an AccessDateRange message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AnalyticsAdminService.prototype.updateProperty = function updateProperty(request, callback) { - return this.rpcCall(updateProperty, $root.google.analytics.admin.v1beta.UpdatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); - }, "name", { value: "UpdateProperty" }); + AccessDateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + return null; + }; /** - * Calls UpdateProperty. - * @function updateProperty - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AccessDateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessDateRange} AccessDateRange */ + AccessDateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessDateRange) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessDateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createFirebaseLink}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateFirebaseLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.FirebaseLink} [response] FirebaseLink + * Creates a plain object from an AccessDateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {google.analytics.admin.v1beta.AccessDateRange} message AccessDateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessDateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + return object; + }; /** - * Calls CreateFirebaseLink. - * @function createFirebaseLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessDateRange to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessDateRange * @instance - * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLinkCallback} callback Node-style callback called with the error, if any, and FirebaseLink - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AnalyticsAdminService.prototype.createFirebaseLink = function createFirebaseLink(request, callback) { - return this.rpcCall(createFirebaseLink, $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, $root.google.analytics.admin.v1beta.FirebaseLink, request, callback); - }, "name", { value: "CreateFirebaseLink" }); + AccessDateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls CreateFirebaseLink. - * @function createFirebaseLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AccessDateRange + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessDateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessDateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessDateRange"; + }; + + return AccessDateRange; + })(); + + v1beta.AccessFilterExpression = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteFirebaseLink}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteFirebaseLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Properties of an AccessFilterExpression. + * @memberof google.analytics.admin.v1beta + * @interface IAccessFilterExpression + * @property {google.analytics.admin.v1beta.IAccessFilterExpressionList|null} [andGroup] AccessFilterExpression andGroup + * @property {google.analytics.admin.v1beta.IAccessFilterExpressionList|null} [orGroup] AccessFilterExpression orGroup + * @property {google.analytics.admin.v1beta.IAccessFilterExpression|null} [notExpression] AccessFilterExpression notExpression + * @property {google.analytics.admin.v1beta.IAccessFilter|null} [accessFilter] AccessFilterExpression accessFilter */ /** - * Calls DeleteFirebaseLink. - * @function deleteFirebaseLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Constructs a new AccessFilterExpression. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessFilterExpression. + * @implements IAccessFilterExpression + * @constructor + * @param {google.analytics.admin.v1beta.IAccessFilterExpression=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteFirebaseLink = function deleteFirebaseLink(request, callback) { - return this.rpcCall(deleteFirebaseLink, $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteFirebaseLink" }); + function AccessFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls DeleteFirebaseLink. - * @function deleteFirebaseLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilterExpression andGroup. + * @member {google.analytics.admin.v1beta.IAccessFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1beta.AccessFilterExpression * @instance - * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessFilterExpression.prototype.andGroup = null; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listFirebaseLinks}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListFirebaseLinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListFirebaseLinksResponse} [response] ListFirebaseLinksResponse + * AccessFilterExpression orGroup. + * @member {google.analytics.admin.v1beta.IAccessFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @instance */ + AccessFilterExpression.prototype.orGroup = null; /** - * Calls ListFirebaseLinks. - * @function listFirebaseLinks - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilterExpression notExpression. + * @member {google.analytics.admin.v1beta.IAccessFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1beta.AccessFilterExpression * @instance - * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinksCallback} callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.listFirebaseLinks = function listFirebaseLinks(request, callback) { - return this.rpcCall(listFirebaseLinks, $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest, $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse, request, callback); - }, "name", { value: "ListFirebaseLinks" }); + AccessFilterExpression.prototype.notExpression = null; /** - * Calls ListFirebaseLinks. - * @function listFirebaseLinks - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilterExpression accessFilter. + * @member {google.analytics.admin.v1beta.IAccessFilter|null|undefined} accessFilter + * @memberof google.analytics.admin.v1beta.AccessFilterExpression * @instance - * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessFilterExpression.prototype.accessFilter = null; - /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createGoogleAdsLink}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateGoogleAdsLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateGoogleAdsLink. - * @function createGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilterExpression oneExpression. + * @member {"andGroup"|"orGroup"|"notExpression"|"accessFilter"|undefined} oneExpression + * @memberof google.analytics.admin.v1beta.AccessFilterExpression * @instance - * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.createGoogleAdsLink = function createGoogleAdsLink(request, callback) { - return this.rpcCall(createGoogleAdsLink, $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); - }, "name", { value: "CreateGoogleAdsLink" }); + Object.defineProperty(AccessFilterExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "accessFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls CreateGoogleAdsLink. - * @function createGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new AccessFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessFilterExpression} AccessFilterExpression instance */ + AccessFilterExpression.create = function create(properties) { + return new AccessFilterExpression(properties); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateGoogleAdsLink}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateGoogleAdsLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink + * Encodes the specified AccessFilterExpression message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpression} message AccessFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1beta.AccessFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.admin.v1beta.AccessFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1beta.AccessFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.accessFilter != null && Object.hasOwnProperty.call(message, "accessFilter")) + $root.google.analytics.admin.v1beta.AccessFilter.encode(message.accessFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; /** - * Calls UpdateGoogleAdsLink. - * @function updateGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpression} message AccessFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.updateGoogleAdsLink = function updateGoogleAdsLink(request, callback) { - return this.rpcCall(updateGoogleAdsLink, $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); - }, "name", { value: "UpdateGoogleAdsLink" }); + AccessFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateGoogleAdsLink. - * @function updateGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessFilterExpression} AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessFilterExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.admin.v1beta.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.accessFilter = $root.google.analytics.admin.v1beta.AccessFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteGoogleAdsLink}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteGoogleAdsLinkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes an AccessFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessFilterExpression} AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteGoogleAdsLink. - * @function deleteGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies an AccessFilterExpression message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteGoogleAdsLink = function deleteGoogleAdsLink(request, callback) { - return this.rpcCall(deleteGoogleAdsLink, $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteGoogleAdsLink" }); + AccessFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.accessFilter != null && message.hasOwnProperty("accessFilter")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessFilter.verify(message.accessFilter); + if (error) + return "accessFilter." + error; + } + } + return null; + }; /** - * Calls DeleteGoogleAdsLink. - * @function deleteGoogleAdsLink - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AccessFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessFilterExpression} AccessFilterExpression */ + AccessFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessFilterExpression) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1beta.AccessFilterExpression.fromObject(object.notExpression); + } + if (object.accessFilter != null) { + if (typeof object.accessFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpression.accessFilter: object expected"); + message.accessFilter = $root.google.analytics.admin.v1beta.AccessFilter.fromObject(object.accessFilter); + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listGoogleAdsLinks}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListGoogleAdsLinksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} [response] ListGoogleAdsLinksResponse + * Creates a plain object from an AccessFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1beta.AccessFilterExpression} message AccessFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.oneExpression = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.admin.v1beta.AccessFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.oneExpression = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1beta.AccessFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.oneExpression = "notExpression"; + } + if (message.accessFilter != null && message.hasOwnProperty("accessFilter")) { + object.accessFilter = $root.google.analytics.admin.v1beta.AccessFilter.toObject(message.accessFilter, options); + if (options.oneofs) + object.oneExpression = "accessFilter"; + } + return object; + }; /** - * Calls ListGoogleAdsLinks. - * @function listGoogleAdsLinks - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinksCallback} callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnalyticsAdminService.prototype.listGoogleAdsLinks = function listGoogleAdsLinks(request, callback) { - return this.rpcCall(listGoogleAdsLinks, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse, request, callback); - }, "name", { value: "ListGoogleAdsLinks" }); - - /** - * Calls ListGoogleAdsLinks. - * @function listGoogleAdsLinks - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessFilterExpression * @instance - * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + AccessFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataSharingSettings}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetDataSharingSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataSharingSettings} [response] DataSharingSettings + * Gets the default type url for AccessFilterExpression + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessFilterExpression"; + }; - /** - * Calls GetDataSharingSettings. - * @function getDataSharingSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettingsCallback} callback Node-style callback called with the error, if any, and DataSharingSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnalyticsAdminService.prototype.getDataSharingSettings = function getDataSharingSettings(request, callback) { - return this.rpcCall(getDataSharingSettings, $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, $root.google.analytics.admin.v1beta.DataSharingSettings, request, callback); - }, "name", { value: "GetDataSharingSettings" }); + return AccessFilterExpression; + })(); - /** - * Calls GetDataSharingSettings. - * @function getDataSharingSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1beta.AccessFilterExpressionList = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getMeasurementProtocolSecret}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetMeasurementProtocolSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + * Properties of an AccessFilterExpressionList. + * @memberof google.analytics.admin.v1beta + * @interface IAccessFilterExpressionList + * @property {Array.|null} [expressions] AccessFilterExpressionList expressions */ /** - * Calls GetMeasurementProtocolSecret. - * @function getMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret - * @returns {undefined} - * @variation 1 + * Constructs a new AccessFilterExpressionList. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessFilterExpressionList. + * @implements IAccessFilterExpressionList + * @constructor + * @param {google.analytics.admin.v1beta.IAccessFilterExpressionList=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.getMeasurementProtocolSecret = function getMeasurementProtocolSecret(request, callback) { - return this.rpcCall(getMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); - }, "name", { value: "GetMeasurementProtocolSecret" }); + function AccessFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetMeasurementProtocolSecret. - * @function getMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList * @instance - * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessFilterExpressionList.prototype.expressions = $util.emptyArray; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listMeasurementProtocolSecrets}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListMeasurementProtocolSecretsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} [response] ListMeasurementProtocolSecretsResponse + * Creates a new AccessFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessFilterExpressionList} AccessFilterExpressionList instance */ + AccessFilterExpressionList.create = function create(properties) { + return new AccessFilterExpressionList(properties); + }; /** - * Calls ListMeasurementProtocolSecrets. - * @function listMeasurementProtocolSecrets - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback} callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpressionList} message AccessFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.listMeasurementProtocolSecrets = function listMeasurementProtocolSecrets(request, callback) { - return this.rpcCall(listMeasurementProtocolSecrets, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse, request, callback); - }, "name", { value: "ListMeasurementProtocolSecrets" }); + AccessFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.admin.v1beta.AccessFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls ListMeasurementProtocolSecrets. - * @function listMeasurementProtocolSecrets - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AccessFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1beta.IAccessFilterExpressionList} message AccessFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createMeasurementProtocolSecret}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateMeasurementProtocolSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + * Decodes an AccessFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessFilterExpressionList} AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessFilterExpressionList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.admin.v1beta.AccessFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CreateMeasurementProtocolSecret. - * @function createMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret - * @returns {undefined} - * @variation 1 + * Decodes an AccessFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessFilterExpressionList} AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AnalyticsAdminService.prototype.createMeasurementProtocolSecret = function createMeasurementProtocolSecret(request, callback) { - return this.rpcCall(createMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); - }, "name", { value: "CreateMeasurementProtocolSecret" }); + AccessFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateMeasurementProtocolSecret. - * @function createMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an AccessFilterExpressionList message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + AccessFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteMeasurementProtocolSecret}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteMeasurementProtocolSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates an AccessFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessFilterExpressionList} AccessFilterExpressionList */ + AccessFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessFilterExpressionList) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.admin.v1beta.AccessFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; /** - * Calls DeleteMeasurementProtocolSecret. - * @function deleteMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a plain object from an AccessFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1beta.AccessFilterExpressionList} message AccessFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteMeasurementProtocolSecret = function deleteMeasurementProtocolSecret(request, callback) { - return this.rpcCall(deleteMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMeasurementProtocolSecret" }); + AccessFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.admin.v1beta.AccessFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; /** - * Calls DeleteMeasurementProtocolSecret. - * @function deleteMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList * @instance - * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + AccessFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateMeasurementProtocolSecret}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateMeasurementProtocolSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + * Gets the default type url for AccessFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessFilterExpressionList"; + }; - /** - * Calls UpdateMeasurementProtocolSecret. - * @function updateMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnalyticsAdminService.prototype.updateMeasurementProtocolSecret = function updateMeasurementProtocolSecret(request, callback) { - return this.rpcCall(updateMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); - }, "name", { value: "UpdateMeasurementProtocolSecret" }); + return AccessFilterExpressionList; + })(); - /** - * Calls UpdateMeasurementProtocolSecret. - * @function updateMeasurementProtocolSecret - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1beta.AccessFilter = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|acknowledgeUserDataCollection}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef AcknowledgeUserDataCollectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} [response] AcknowledgeUserDataCollectionResponse + * Properties of an AccessFilter. + * @memberof google.analytics.admin.v1beta + * @interface IAccessFilter + * @property {google.analytics.admin.v1beta.IAccessStringFilter|null} [stringFilter] AccessFilter stringFilter + * @property {google.analytics.admin.v1beta.IAccessInListFilter|null} [inListFilter] AccessFilter inListFilter + * @property {google.analytics.admin.v1beta.IAccessNumericFilter|null} [numericFilter] AccessFilter numericFilter + * @property {google.analytics.admin.v1beta.IAccessBetweenFilter|null} [betweenFilter] AccessFilter betweenFilter + * @property {string|null} [fieldName] AccessFilter fieldName */ /** - * Calls AcknowledgeUserDataCollection. - * @function acknowledgeUserDataCollection - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback} callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse - * @returns {undefined} - * @variation 1 + * Constructs a new AccessFilter. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessFilter. + * @implements IAccessFilter + * @constructor + * @param {google.analytics.admin.v1beta.IAccessFilter=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.acknowledgeUserDataCollection = function acknowledgeUserDataCollection(request, callback) { - return this.rpcCall(acknowledgeUserDataCollection, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse, request, callback); - }, "name", { value: "AcknowledgeUserDataCollection" }); + function AccessFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls AcknowledgeUserDataCollection. - * @function acknowledgeUserDataCollection - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilter stringFilter. + * @member {google.analytics.admin.v1beta.IAccessStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|searchChangeHistoryEvents}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef SearchChangeHistoryEventsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} [response] SearchChangeHistoryEventsResponse */ + AccessFilter.prototype.stringFilter = null; /** - * Calls SearchChangeHistoryEvents. - * @function searchChangeHistoryEvents - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilter inListFilter. + * @member {google.analytics.admin.v1beta.IAccessInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEventsCallback} callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.searchChangeHistoryEvents = function searchChangeHistoryEvents(request, callback) { - return this.rpcCall(searchChangeHistoryEvents, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse, request, callback); - }, "name", { value: "SearchChangeHistoryEvents" }); + AccessFilter.prototype.inListFilter = null; /** - * Calls SearchChangeHistoryEvents. - * @function searchChangeHistoryEvents - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilter numericFilter. + * @member {google.analytics.admin.v1beta.IAccessNumericFilter|null|undefined} numericFilter + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessFilter.prototype.numericFilter = null; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createConversionEvent}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateConversionEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + * AccessFilter betweenFilter. + * @member {google.analytics.admin.v1beta.IAccessBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.admin.v1beta.AccessFilter + * @instance */ + AccessFilter.prototype.betweenFilter = null; /** - * Calls CreateConversionEvent. - * @function createConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.createConversionEvent = function createConversionEvent(request, callback) { - return this.rpcCall(createConversionEvent, $root.google.analytics.admin.v1beta.CreateConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); - }, "name", { value: "CreateConversionEvent" }); + AccessFilter.prototype.fieldName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateConversionEvent. - * @function createConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + Object.defineProperty(AccessFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getConversionEvent}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetConversionEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + * Creates a new AccessFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessFilter} AccessFilter instance */ + AccessFilter.create = function create(properties) { + return new AccessFilter(properties); + }; /** - * Calls GetConversionEvent. - * @function getConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessFilter} message AccessFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.getConversionEvent = function getConversionEvent(request, callback) { - return this.rpcCall(getConversionEvent, $root.google.analytics.admin.v1beta.GetConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); - }, "name", { value: "GetConversionEvent" }); + AccessFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1beta.AccessStringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1beta.AccessInListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.admin.v1beta.AccessNumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.admin.v1beta.AccessBetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; /** - * Calls GetConversionEvent. - * @function getConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AccessFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessFilter} message AccessFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteConversionEvent}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteConversionEventCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes an AccessFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessFilter} AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1beta.AccessStringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1beta.AccessInListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.admin.v1beta.AccessNumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.admin.v1beta.AccessBetweenFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.fieldName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls DeleteConversionEvent. - * @function deleteConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEventCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Decodes an AccessFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessFilter} AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteConversionEvent = function deleteConversionEvent(request, callback) { - return this.rpcCall(deleteConversionEvent, $root.google.analytics.admin.v1beta.DeleteConversionEventRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteConversionEvent" }); + AccessFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteConversionEvent. - * @function deleteConversionEvent - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an AccessFilter message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + AccessFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessStringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessInListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessNumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessBetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + return null; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listConversionEvents}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListConversionEventsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListConversionEventsResponse} [response] ListConversionEventsResponse + * Creates an AccessFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessFilter} AccessFilter + */ + AccessFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessFilter) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1beta.AccessStringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1beta.AccessInListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.admin.v1beta.AccessNumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.admin.v1beta.AccessBetweenFilter.fromObject(object.betweenFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + return message; + }; + + /** + * Creates a plain object from an AccessFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {google.analytics.admin.v1beta.AccessFilter} message AccessFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1beta.AccessStringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1beta.AccessInListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.admin.v1beta.AccessNumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.admin.v1beta.AccessBetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; /** - * Calls ListConversionEvents. - * @function listConversionEvents - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessFilter * @instance - * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEventsCallback} callback Node-style callback called with the error, if any, and ListConversionEventsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AnalyticsAdminService.prototype.listConversionEvents = function listConversionEvents(request, callback) { - return this.rpcCall(listConversionEvents, $root.google.analytics.admin.v1beta.ListConversionEventsRequest, $root.google.analytics.admin.v1beta.ListConversionEventsResponse, request, callback); - }, "name", { value: "ListConversionEvents" }); + AccessFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListConversionEvents. - * @function listConversionEvents - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AccessFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessFilter"; + }; + + return AccessFilter; + })(); + + v1beta.AccessStringFilter = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomDimension}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateCustomDimensionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + * Properties of an AccessStringFilter. + * @memberof google.analytics.admin.v1beta + * @interface IAccessStringFilter + * @property {google.analytics.admin.v1beta.AccessStringFilter.MatchType|null} [matchType] AccessStringFilter matchType + * @property {string|null} [value] AccessStringFilter value + * @property {boolean|null} [caseSensitive] AccessStringFilter caseSensitive */ /** - * Calls CreateCustomDimension. - * @function createCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension - * @returns {undefined} - * @variation 1 + * Constructs a new AccessStringFilter. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessStringFilter. + * @implements IAccessStringFilter + * @constructor + * @param {google.analytics.admin.v1beta.IAccessStringFilter=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.createCustomDimension = function createCustomDimension(request, callback) { - return this.rpcCall(createCustomDimension, $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); - }, "name", { value: "CreateCustomDimension" }); + function AccessStringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateCustomDimension. - * @function createCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessStringFilter matchType. + * @member {google.analytics.admin.v1beta.AccessStringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1beta.AccessStringFilter * @instance - * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessStringFilter.prototype.matchType = 0; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomDimension}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateCustomDimensionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + * AccessStringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @instance */ + AccessStringFilter.prototype.value = ""; /** - * Calls UpdateCustomDimension. - * @function updateCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessStringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1beta.AccessStringFilter * @instance - * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.updateCustomDimension = function updateCustomDimension(request, callback) { - return this.rpcCall(updateCustomDimension, $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); - }, "name", { value: "UpdateCustomDimension" }); + AccessStringFilter.prototype.caseSensitive = false; /** - * Calls UpdateCustomDimension. - * @function updateCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new AccessStringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessStringFilter} AccessStringFilter instance */ + AccessStringFilter.create = function create(properties) { + return new AccessStringFilter(properties); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomDimensions}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListCustomDimensionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListCustomDimensionsResponse} [response] ListCustomDimensionsResponse + * Encodes the specified AccessStringFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessStringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessStringFilter} message AccessStringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessStringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; /** - * Calls ListCustomDimensions. - * @function listCustomDimensions - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensionsCallback} callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessStringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessStringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessStringFilter} message AccessStringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.listCustomDimensions = function listCustomDimensions(request, callback) { - return this.rpcCall(listCustomDimensions, $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest, $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse, request, callback); - }, "name", { value: "ListCustomDimensions" }); + AccessStringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListCustomDimensions. - * @function listCustomDimensions - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessStringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessStringFilter} AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessStringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessStringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomDimension}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ArchiveCustomDimensionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes an AccessStringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessStringFilter} AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessStringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ArchiveCustomDimension. - * @function archiveCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimensionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Verifies an AccessStringFilter message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomDimension = function archiveCustomDimension(request, callback) { - return this.rpcCall(archiveCustomDimension, $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "ArchiveCustomDimension" }); + AccessStringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; /** - * Calls ArchiveCustomDimension. - * @function archiveCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AccessStringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessStringFilter} AccessStringFilter */ + AccessStringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessStringFilter) + return object; + var message = new $root.google.analytics.admin.v1beta.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; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomDimension}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetCustomDimensionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + * Creates a plain object from an AccessStringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {google.analytics.admin.v1beta.AccessStringFilter} message AccessStringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessStringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1beta.AccessStringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1beta.AccessStringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; /** - * Calls GetCustomDimension. - * @function getCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessStringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessStringFilter * @instance - * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AnalyticsAdminService.prototype.getCustomDimension = function getCustomDimension(request, callback) { - return this.rpcCall(getCustomDimension, $root.google.analytics.admin.v1beta.GetCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); - }, "name", { value: "GetCustomDimension" }); + AccessStringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetCustomDimension. - * @function getCustomDimension - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AccessStringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessStringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessStringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessStringFilter"; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomMetric}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateCustomMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + * MatchType enum. + * @name google.analytics.admin.v1beta.AccessStringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value */ + AccessStringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); - /** - * Calls CreateCustomMetric. - * @function createCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnalyticsAdminService.prototype.createCustomMetric = function createCustomMetric(request, callback) { - return this.rpcCall(createCustomMetric, $root.google.analytics.admin.v1beta.CreateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); - }, "name", { value: "CreateCustomMetric" }); + return AccessStringFilter; + })(); - /** - * Calls CreateCustomMetric. - * @function createCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1beta.AccessInListFilter = (function() { /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomMetric}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateCustomMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + * Properties of an AccessInListFilter. + * @memberof google.analytics.admin.v1beta + * @interface IAccessInListFilter + * @property {Array.|null} [values] AccessInListFilter values + * @property {boolean|null} [caseSensitive] AccessInListFilter caseSensitive */ /** - * Calls UpdateCustomMetric. - * @function updateCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric - * @returns {undefined} - * @variation 1 + * Constructs a new AccessInListFilter. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessInListFilter. + * @implements IAccessInListFilter + * @constructor + * @param {google.analytics.admin.v1beta.IAccessInListFilter=} [properties] Properties to set */ - Object.defineProperty(AnalyticsAdminService.prototype.updateCustomMetric = function updateCustomMetric(request, callback) { - return this.rpcCall(updateCustomMetric, $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); - }, "name", { value: "UpdateCustomMetric" }); + function AccessInListFilter(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls UpdateCustomMetric. - * @function updateCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessInListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1beta.AccessInListFilter * @instance - * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomMetrics}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListCustomMetricsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListCustomMetricsResponse} [response] ListCustomMetricsResponse */ + AccessInListFilter.prototype.values = $util.emptyArray; /** - * Calls ListCustomMetrics. - * @function listCustomMetrics - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessInListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1beta.AccessInListFilter * @instance - * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetricsCallback} callback Node-style callback called with the error, if any, and ListCustomMetricsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.listCustomMetrics = function listCustomMetrics(request, callback) { - return this.rpcCall(listCustomMetrics, $root.google.analytics.admin.v1beta.ListCustomMetricsRequest, $root.google.analytics.admin.v1beta.ListCustomMetricsResponse, request, callback); - }, "name", { value: "ListCustomMetrics" }); + AccessInListFilter.prototype.caseSensitive = false; /** - * Calls ListCustomMetrics. - * @function listCustomMetrics - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new AccessInListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessInListFilter} AccessInListFilter instance */ + AccessInListFilter.create = function create(properties) { + return new AccessInListFilter(properties); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomMetric}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ArchiveCustomMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Encodes the specified AccessInListFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessInListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessInListFilter} message AccessInListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessInListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; /** - * Calls ArchiveCustomMetric. - * @function archiveCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetricCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Encodes the specified AccessInListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessInListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessInListFilter} message AccessInListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomMetric = function archiveCustomMetric(request, callback) { - return this.rpcCall(archiveCustomMetric, $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "ArchiveCustomMetric" }); + AccessInListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ArchiveCustomMetric. - * @function archiveCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessInListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessInListFilter} AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessInListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessInListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomMetric}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetCustomMetricCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + * Decodes an AccessInListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessInListFilter} AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessInListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetCustomMetric. - * @function getCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric - * @returns {undefined} - * @variation 1 + * Verifies an AccessInListFilter message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AnalyticsAdminService.prototype.getCustomMetric = function getCustomMetric(request, callback) { - return this.rpcCall(getCustomMetric, $root.google.analytics.admin.v1beta.GetCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); - }, "name", { value: "GetCustomMetric" }); + AccessInListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; /** - * Calls GetCustomMetric. - * @function getCustomMetric - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an AccessInListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessInListFilter} AccessInListFilter */ + AccessInListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessInListFilter) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessInListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1beta.AccessInListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataRetentionSettings}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetDataRetentionSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings + * Creates a plain object from an AccessInListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {google.analytics.admin.v1beta.AccessInListFilter} message AccessInListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + AccessInListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; /** - * Calls GetDataRetentionSettings. - * @function getDataRetentionSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Converts this AccessInListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessInListFilter * @instance - * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AnalyticsAdminService.prototype.getDataRetentionSettings = function getDataRetentionSettings(request, callback) { - return this.rpcCall(getDataRetentionSettings, $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); - }, "name", { value: "GetDataRetentionSettings" }); + AccessInListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetDataRetentionSettings. - * @function getDataRetentionSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for AccessInListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessInListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessInListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessInListFilter"; + }; - /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataRetentionSettings}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateDataRetentionSettingsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings - */ + return AccessInListFilter; + })(); - /** - * Calls UpdateDataRetentionSettings. - * @function updateDataRetentionSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AnalyticsAdminService.prototype.updateDataRetentionSettings = function updateDataRetentionSettings(request, callback) { - return this.rpcCall(updateDataRetentionSettings, $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); - }, "name", { value: "UpdateDataRetentionSettings" }); + v1beta.AccessNumericFilter = (function() { /** - * Calls UpdateDataRetentionSettings. - * @function updateDataRetentionSettings - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of an AccessNumericFilter. + * @memberof google.analytics.admin.v1beta + * @interface IAccessNumericFilter + * @property {google.analytics.admin.v1beta.AccessNumericFilter.Operation|null} [operation] AccessNumericFilter operation + * @property {google.analytics.admin.v1beta.INumericValue|null} [value] AccessNumericFilter value */ /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createDataStream}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef CreateDataStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + * Constructs a new AccessNumericFilter. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessNumericFilter. + * @implements IAccessNumericFilter + * @constructor + * @param {google.analytics.admin.v1beta.IAccessNumericFilter=} [properties] Properties to set */ + function AccessNumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls CreateDataStream. - * @function createDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessNumericFilter operation. + * @member {google.analytics.admin.v1beta.AccessNumericFilter.Operation} operation + * @memberof google.analytics.admin.v1beta.AccessNumericFilter * @instance - * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.createDataStream = function createDataStream(request, callback) { - return this.rpcCall(createDataStream, $root.google.analytics.admin.v1beta.CreateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); - }, "name", { value: "CreateDataStream" }); + AccessNumericFilter.prototype.operation = 0; /** - * Calls CreateDataStream. - * @function createDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessNumericFilter value. + * @member {google.analytics.admin.v1beta.INumericValue|null|undefined} value + * @memberof google.analytics.admin.v1beta.AccessNumericFilter * @instance - * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteDataStream}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef DeleteDataStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty */ + AccessNumericFilter.prototype.value = null; /** - * Calls DeleteDataStream. - * @function deleteDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStreamCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Creates a new AccessNumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessNumericFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessNumericFilter} AccessNumericFilter instance */ - Object.defineProperty(AnalyticsAdminService.prototype.deleteDataStream = function deleteDataStream(request, callback) { - return this.rpcCall(deleteDataStream, $root.google.analytics.admin.v1beta.DeleteDataStreamRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDataStream" }); + AccessNumericFilter.create = function create(properties) { + return new AccessNumericFilter(properties); + }; /** - * Calls DeleteDataStream. - * @function deleteDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AccessNumericFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessNumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessNumericFilter} message AccessNumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessNumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.admin.v1beta.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataStream}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef UpdateDataStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + * Encodes the specified AccessNumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessNumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessNumericFilter} message AccessNumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AccessNumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateDataStream. - * @function updateDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream - * @returns {undefined} - * @variation 1 + * Decodes an AccessNumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessNumericFilter} AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(AnalyticsAdminService.prototype.updateDataStream = function updateDataStream(request, callback) { - return this.rpcCall(updateDataStream, $root.google.analytics.admin.v1beta.UpdateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); - }, "name", { value: "UpdateDataStream" }); - + AccessNumericFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessNumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.admin.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** - * Calls UpdateDataStream. - * @function updateDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an AccessNumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessNumericFilter} AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AccessNumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listDataStreams}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef ListDataStreamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.ListDataStreamsResponse} [response] ListDataStreamsResponse + * Verifies an AccessNumericFilter message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + AccessNumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.admin.v1beta.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; /** - * Calls ListDataStreams. - * @function listDataStreams - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @instance - * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreamsCallback} callback Node-style callback called with the error, if any, and ListDataStreamsResponse - * @returns {undefined} - * @variation 1 + * Creates an AccessNumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessNumericFilter} AccessNumericFilter */ - Object.defineProperty(AnalyticsAdminService.prototype.listDataStreams = function listDataStreams(request, callback) { - return this.rpcCall(listDataStreams, $root.google.analytics.admin.v1beta.ListDataStreamsRequest, $root.google.analytics.admin.v1beta.ListDataStreamsResponse, request, callback); - }, "name", { value: "ListDataStreams" }); + AccessNumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessNumericFilter) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessNumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessNumericFilter.value: object expected"); + message.value = $root.google.analytics.admin.v1beta.NumericValue.fromObject(object.value); + } + return message; + }; /** - * Calls ListDataStreams. - * @function listDataStreams - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Creates a plain object from an AccessNumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1beta.AccessNumericFilter} message AccessNumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessNumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.admin.v1beta.AccessNumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1beta.AccessNumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.admin.v1beta.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this AccessNumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessNumericFilter * @instance - * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + AccessNumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataStream}. - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService - * @typedef GetDataStreamCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + * Gets the default type url for AccessNumericFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessNumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AccessNumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessNumericFilter"; + }; /** - * Calls GetDataStream. - * @function getDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * Operation enum. + * @name google.analytics.admin.v1beta.AccessNumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + AccessNumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return AccessNumericFilter; + })(); + + v1beta.AccessBetweenFilter = (function() { + + /** + * Properties of an AccessBetweenFilter. + * @memberof google.analytics.admin.v1beta + * @interface IAccessBetweenFilter + * @property {google.analytics.admin.v1beta.INumericValue|null} [fromValue] AccessBetweenFilter fromValue + * @property {google.analytics.admin.v1beta.INumericValue|null} [toValue] AccessBetweenFilter toValue + */ + + /** + * Constructs a new AccessBetweenFilter. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessBetweenFilter. + * @implements IAccessBetweenFilter + * @constructor + * @param {google.analytics.admin.v1beta.IAccessBetweenFilter=} [properties] Properties to set + */ + function AccessBetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessBetweenFilter fromValue. + * @member {google.analytics.admin.v1beta.INumericValue|null|undefined} fromValue + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter * @instance - * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object - * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AnalyticsAdminService.prototype.getDataStream = function getDataStream(request, callback) { - return this.rpcCall(getDataStream, $root.google.analytics.admin.v1beta.GetDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); - }, "name", { value: "GetDataStream" }); + AccessBetweenFilter.prototype.fromValue = null; /** - * Calls GetDataStream. - * @function getDataStream - * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * AccessBetweenFilter toValue. + * @member {google.analytics.admin.v1beta.INumericValue|null|undefined} toValue + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter * @instance - * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AccessBetweenFilter.prototype.toValue = null; - return AnalyticsAdminService; + /** + * Creates a new AccessBetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessBetweenFilter} AccessBetweenFilter instance + */ + AccessBetweenFilter.create = function create(properties) { + return new AccessBetweenFilter(properties); + }; + + /** + * Encodes the specified AccessBetweenFilter message. Does not implicitly {@link google.analytics.admin.v1beta.AccessBetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessBetweenFilter} message AccessBetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessBetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.admin.v1beta.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.admin.v1beta.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessBetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessBetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1beta.IAccessBetweenFilter} message AccessBetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessBetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessBetweenFilter} AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessBetweenFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessBetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.admin.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.admin.v1beta.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessBetweenFilter} AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessBetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessBetweenFilter message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessBetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.admin.v1beta.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.admin.v1beta.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates an AccessBetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessBetweenFilter} AccessBetweenFilter + */ + AccessBetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessBetweenFilter) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessBetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessBetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.admin.v1beta.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessBetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.admin.v1beta.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from an AccessBetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1beta.AccessBetweenFilter} message AccessBetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessBetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.admin.v1beta.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.admin.v1beta.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this AccessBetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @instance + * @returns {Object.} JSON object + */ + AccessBetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessBetweenFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessBetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessBetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessBetweenFilter"; + }; + + return AccessBetweenFilter; + })(); + + v1beta.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.admin.v1beta + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.admin.v1beta.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.admin.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.admin.v1beta.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.admin.v1beta.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {google.analytics.admin.v1beta.INumericValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1beta.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {google.analytics.admin.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {google.analytics.admin.v1beta.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.NumericValue) + return object; + var message = new $root.google.analytics.admin.v1beta.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {google.analytics.admin.v1beta.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.NumericValue"; + }; + + return NumericValue; + })(); + + v1beta.AccessOrderBy = (function() { + + /** + * Properties of an AccessOrderBy. + * @memberof google.analytics.admin.v1beta + * @interface IAccessOrderBy + * @property {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy|null} [metric] AccessOrderBy metric + * @property {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy|null} [dimension] AccessOrderBy dimension + * @property {boolean|null} [desc] AccessOrderBy desc + */ + + /** + * Constructs a new AccessOrderBy. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessOrderBy. + * @implements IAccessOrderBy + * @constructor + * @param {google.analytics.admin.v1beta.IAccessOrderBy=} [properties] Properties to set + */ + function AccessOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessOrderBy metric. + * @member {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.metric = null; + + /** + * AccessOrderBy dimension. + * @member {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.dimension = null; + + /** + * AccessOrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessOrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @instance + */ + Object.defineProperty(AccessOrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {google.analytics.admin.v1beta.IAccessOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessOrderBy} AccessOrderBy instance + */ + AccessOrderBy.create = function create(properties) { + return new AccessOrderBy(properties); + }; + + /** + * Encodes the specified AccessOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {google.analytics.admin.v1beta.IAccessOrderBy} message AccessOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified AccessOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {google.analytics.admin.v1beta.IAccessOrderBy} message AccessOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessOrderBy} AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessOrderBy} AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an AccessOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessOrderBy} AccessOrderBy + */ + AccessOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessOrderBy) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessOrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessOrderBy.metric: object expected"); + message.metric = $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessOrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an AccessOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy} message AccessOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this AccessOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @instance + * @returns {Object.} JSON object + */ + AccessOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessOrderBy"; + }; + + AccessOrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + AccessOrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.admin.v1beta.AccessOrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy(); + 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; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + 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.v1beta.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return AccessOrderBy; + })(); + + v1beta.AccessDimensionHeader = (function() { + + /** + * Properties of an AccessDimensionHeader. + * @memberof google.analytics.admin.v1beta + * @interface IAccessDimensionHeader + * @property {string|null} [dimensionName] AccessDimensionHeader dimensionName + */ + + /** + * Constructs a new AccessDimensionHeader. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessDimensionHeader. + * @implements IAccessDimensionHeader + * @constructor + * @param {google.analytics.admin.v1beta.IAccessDimensionHeader=} [properties] Properties to set + */ + function AccessDimensionHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDimensionHeader dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @instance + */ + AccessDimensionHeader.prototype.dimensionName = ""; + + /** + * Creates a new AccessDimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessDimensionHeader} AccessDimensionHeader instance + */ + AccessDimensionHeader.create = function create(properties) { + return new AccessDimensionHeader(properties); + }; + + /** + * Encodes the specified AccessDimensionHeader message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionHeader} message AccessDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AccessDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionHeader} message AccessDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessDimensionHeader} AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessDimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessDimensionHeader} AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDimensionHeader message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AccessDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessDimensionHeader} AccessDimensionHeader + */ + AccessDimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessDimensionHeader) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessDimensionHeader(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AccessDimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1beta.AccessDimensionHeader} message AccessDimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AccessDimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @instance + * @returns {Object.} JSON object + */ + AccessDimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDimensionHeader + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessDimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessDimensionHeader"; + }; + + return AccessDimensionHeader; + })(); + + v1beta.AccessMetricHeader = (function() { + + /** + * Properties of an AccessMetricHeader. + * @memberof google.analytics.admin.v1beta + * @interface IAccessMetricHeader + * @property {string|null} [metricName] AccessMetricHeader metricName + */ + + /** + * Constructs a new AccessMetricHeader. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessMetricHeader. + * @implements IAccessMetricHeader + * @constructor + * @param {google.analytics.admin.v1beta.IAccessMetricHeader=} [properties] Properties to set + */ + function AccessMetricHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessMetricHeader metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @instance + */ + AccessMetricHeader.prototype.metricName = ""; + + /** + * Creates a new AccessMetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricHeader=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessMetricHeader} AccessMetricHeader instance + */ + AccessMetricHeader.create = function create(properties) { + return new AccessMetricHeader(properties); + }; + + /** + * Encodes the specified AccessMetricHeader message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricHeader} message AccessMetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified AccessMetricHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricHeader} message AccessMetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessMetricHeader} AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessMetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessMetricHeader} AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessMetricHeader message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessMetricHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates an AccessMetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessMetricHeader} AccessMetricHeader + */ + AccessMetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessMetricHeader) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessMetricHeader(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from an AccessMetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1beta.AccessMetricHeader} message AccessMetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessMetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this AccessMetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @instance + * @returns {Object.} JSON object + */ + AccessMetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessMetricHeader + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessMetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessMetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessMetricHeader"; + }; + + return AccessMetricHeader; + })(); + + v1beta.AccessRow = (function() { + + /** + * Properties of an AccessRow. + * @memberof google.analytics.admin.v1beta + * @interface IAccessRow + * @property {Array.|null} [dimensionValues] AccessRow dimensionValues + * @property {Array.|null} [metricValues] AccessRow metricValues + */ + + /** + * Constructs a new AccessRow. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessRow. + * @implements IAccessRow + * @constructor + * @param {google.analytics.admin.v1beta.IAccessRow=} [properties] Properties to set + */ + function AccessRow(properties) { + this.dimensionValues = []; + this.metricValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.admin.v1beta.AccessRow + * @instance + */ + AccessRow.prototype.dimensionValues = $util.emptyArray; + + /** + * AccessRow metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.admin.v1beta.AccessRow + * @instance + */ + AccessRow.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new AccessRow instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {google.analytics.admin.v1beta.IAccessRow=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessRow} AccessRow instance + */ + AccessRow.create = function create(properties) { + return new AccessRow(properties); + }; + + /** + * Encodes the specified AccessRow message. Does not implicitly {@link google.analytics.admin.v1beta.AccessRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {google.analytics.admin.v1beta.IAccessRow} message AccessRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.admin.v1beta.AccessDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.admin.v1beta.AccessMetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessRow message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {google.analytics.admin.v1beta.IAccessRow} message AccessRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessRow} AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.admin.v1beta.AccessDimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.admin.v1beta.AccessMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessRow} AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessRow message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessMetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates an AccessRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessRow} AccessRow + */ + AccessRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessRow) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.admin.v1beta.AccessRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.admin.v1beta.AccessDimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.admin.v1beta.AccessRow.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessRow.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.admin.v1beta.AccessMetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccessRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {google.analytics.admin.v1beta.AccessRow} message AccessRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.admin.v1beta.AccessDimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.admin.v1beta.AccessMetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this AccessRow to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessRow + * @instance + * @returns {Object.} JSON object + */ + AccessRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessRow + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessRow"; + }; + + return AccessRow; + })(); + + v1beta.AccessDimensionValue = (function() { + + /** + * Properties of an AccessDimensionValue. + * @memberof google.analytics.admin.v1beta + * @interface IAccessDimensionValue + * @property {string|null} [value] AccessDimensionValue value + */ + + /** + * Constructs a new AccessDimensionValue. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessDimensionValue. + * @implements IAccessDimensionValue + * @constructor + * @param {google.analytics.admin.v1beta.IAccessDimensionValue=} [properties] Properties to set + */ + function AccessDimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDimensionValue value. + * @member {string} value + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @instance + */ + AccessDimensionValue.prototype.value = ""; + + /** + * Creates a new AccessDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessDimensionValue} AccessDimensionValue instance + */ + AccessDimensionValue.create = function create(properties) { + return new AccessDimensionValue(properties); + }; + + /** + * Encodes the specified AccessDimensionValue message. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionValue} message AccessDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AccessDimensionValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1beta.IAccessDimensionValue} message AccessDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessDimensionValue} AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessDimensionValue} AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDimensionValue message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an AccessDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessDimensionValue} AccessDimensionValue + */ + AccessDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessDimensionValue) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AccessDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1beta.AccessDimensionValue} message AccessDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this AccessDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AccessDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDimensionValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessDimensionValue"; + }; + + return AccessDimensionValue; + })(); + + v1beta.AccessMetricValue = (function() { + + /** + * Properties of an AccessMetricValue. + * @memberof google.analytics.admin.v1beta + * @interface IAccessMetricValue + * @property {string|null} [value] AccessMetricValue value + */ + + /** + * Constructs a new AccessMetricValue. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessMetricValue. + * @implements IAccessMetricValue + * @constructor + * @param {google.analytics.admin.v1beta.IAccessMetricValue=} [properties] Properties to set + */ + function AccessMetricValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessMetricValue value. + * @member {string} value + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @instance + */ + AccessMetricValue.prototype.value = ""; + + /** + * Creates a new AccessMetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessMetricValue} AccessMetricValue instance + */ + AccessMetricValue.create = function create(properties) { + return new AccessMetricValue(properties); + }; + + /** + * Encodes the specified AccessMetricValue message. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricValue} message AccessMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AccessMetricValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {google.analytics.admin.v1beta.IAccessMetricValue} message AccessMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessMetricValue} AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessMetricValue} AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessMetricValue message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an AccessMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessMetricValue} AccessMetricValue + */ + AccessMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessMetricValue) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessMetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AccessMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {google.analytics.admin.v1beta.AccessMetricValue} message AccessMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this AccessMetricValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @instance + * @returns {Object.} JSON object + */ + AccessMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessMetricValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessMetricValue"; + }; + + return AccessMetricValue; + })(); + + v1beta.AccessQuota = (function() { + + /** + * Properties of an AccessQuota. + * @memberof google.analytics.admin.v1beta + * @interface IAccessQuota + * @property {google.analytics.admin.v1beta.IAccessQuotaStatus|null} [tokensPerDay] AccessQuota tokensPerDay + * @property {google.analytics.admin.v1beta.IAccessQuotaStatus|null} [tokensPerHour] AccessQuota tokensPerHour + * @property {google.analytics.admin.v1beta.IAccessQuotaStatus|null} [concurrentRequests] AccessQuota concurrentRequests + * @property {google.analytics.admin.v1beta.IAccessQuotaStatus|null} [serverErrorsPerProjectPerHour] AccessQuota serverErrorsPerProjectPerHour + * @property {google.analytics.admin.v1beta.IAccessQuotaStatus|null} [tokensPerProjectPerHour] AccessQuota tokensPerProjectPerHour + */ + + /** + * Constructs a new AccessQuota. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessQuota. + * @implements IAccessQuota + * @constructor + * @param {google.analytics.admin.v1beta.IAccessQuota=} [properties] Properties to set + */ + function AccessQuota(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessQuota tokensPerDay. + * @member {google.analytics.admin.v1beta.IAccessQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + */ + AccessQuota.prototype.tokensPerDay = null; + + /** + * AccessQuota tokensPerHour. + * @member {google.analytics.admin.v1beta.IAccessQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + */ + AccessQuota.prototype.tokensPerHour = null; + + /** + * AccessQuota concurrentRequests. + * @member {google.analytics.admin.v1beta.IAccessQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + */ + AccessQuota.prototype.concurrentRequests = null; + + /** + * AccessQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.admin.v1beta.IAccessQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + */ + AccessQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * AccessQuota tokensPerProjectPerHour. + * @member {google.analytics.admin.v1beta.IAccessQuotaStatus|null|undefined} tokensPerProjectPerHour + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + */ + AccessQuota.prototype.tokensPerProjectPerHour = null; + + /** + * Creates a new AccessQuota instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {google.analytics.admin.v1beta.IAccessQuota=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessQuota} AccessQuota instance + */ + AccessQuota.create = function create(properties) { + return new AccessQuota(properties); + }; + + /** + * Encodes the specified AccessQuota message. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {google.analytics.admin.v1beta.IAccessQuota} message AccessQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.admin.v1beta.AccessQuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.admin.v1beta.AccessQuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.admin.v1beta.AccessQuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.admin.v1beta.AccessQuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tokensPerProjectPerHour != null && Object.hasOwnProperty.call(message, "tokensPerProjectPerHour")) + $root.google.analytics.admin.v1beta.AccessQuotaStatus.encode(message.tokensPerProjectPerHour, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessQuota message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {google.analytics.admin.v1beta.IAccessQuota} message AccessQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessQuota} AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuota.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.admin.v1beta.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.admin.v1beta.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 5: { + message.tokensPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessQuota} AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessQuota message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.admin.v1beta.AccessQuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.admin.v1beta.AccessQuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.admin.v1beta.AccessQuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.admin.v1beta.AccessQuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) { + var error = $root.google.analytics.admin.v1beta.AccessQuotaStatus.verify(message.tokensPerProjectPerHour); + if (error) + return "tokensPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates an AccessQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessQuota} AccessQuota + */ + AccessQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessQuota) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.admin.v1beta.AccessQuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.admin.v1beta.AccessQuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + if (object.tokensPerProjectPerHour != null) { + if (typeof object.tokensPerProjectPerHour !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccessQuota.tokensPerProjectPerHour: object expected"); + message.tokensPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.fromObject(object.tokensPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from an AccessQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {google.analytics.admin.v1beta.AccessQuota} message AccessQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + object.tokensPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.admin.v1beta.AccessQuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.admin.v1beta.AccessQuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + if (message.tokensPerProjectPerHour != null && message.hasOwnProperty("tokensPerProjectPerHour")) + object.tokensPerProjectPerHour = $root.google.analytics.admin.v1beta.AccessQuotaStatus.toObject(message.tokensPerProjectPerHour, options); + return object; + }; + + /** + * Converts this AccessQuota to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessQuota + * @instance + * @returns {Object.} JSON object + */ + AccessQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessQuota + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessQuota"; + }; + + return AccessQuota; + })(); + + v1beta.AccessQuotaStatus = (function() { + + /** + * Properties of an AccessQuotaStatus. + * @memberof google.analytics.admin.v1beta + * @interface IAccessQuotaStatus + * @property {number|null} [consumed] AccessQuotaStatus consumed + * @property {number|null} [remaining] AccessQuotaStatus remaining + */ + + /** + * Constructs a new AccessQuotaStatus. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccessQuotaStatus. + * @implements IAccessQuotaStatus + * @constructor + * @param {google.analytics.admin.v1beta.IAccessQuotaStatus=} [properties] Properties to set + */ + function AccessQuotaStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessQuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @instance + */ + AccessQuotaStatus.prototype.consumed = 0; + + /** + * AccessQuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @instance + */ + AccessQuotaStatus.prototype.remaining = 0; + + /** + * Creates a new AccessQuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1beta.IAccessQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccessQuotaStatus} AccessQuotaStatus instance + */ + AccessQuotaStatus.create = function create(properties) { + return new AccessQuotaStatus(properties); + }; + + /** + * Encodes the specified AccessQuotaStatus message. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1beta.IAccessQuotaStatus} message AccessQuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified AccessQuotaStatus message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccessQuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1beta.IAccessQuotaStatus} message AccessQuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccessQuotaStatus} AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuotaStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccessQuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccessQuotaStatus} AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessQuotaStatus message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessQuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + return null; + }; + + /** + * Creates an AccessQuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccessQuotaStatus} AccessQuotaStatus + */ + AccessQuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccessQuotaStatus) + return object; + var message = new $root.google.analytics.admin.v1beta.AccessQuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from an AccessQuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1beta.AccessQuotaStatus} message AccessQuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessQuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consumed = 0; + object.remaining = 0; + } + if (message.consumed != null && message.hasOwnProperty("consumed")) + object.consumed = message.consumed; + if (message.remaining != null && message.hasOwnProperty("remaining")) + object.remaining = message.remaining; + return object; + }; + + /** + * Converts this AccessQuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @instance + * @returns {Object.} JSON object + */ + AccessQuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessQuotaStatus + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccessQuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessQuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccessQuotaStatus"; + }; + + return AccessQuotaStatus; + })(); + + v1beta.AnalyticsAdminService = (function() { + + /** + * Constructs a new AnalyticsAdminService service. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AnalyticsAdminService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AnalyticsAdminService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AnalyticsAdminService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnalyticsAdminService; + + /** + * Creates new AnalyticsAdminService service using the specified rpc implementation. + * @function create + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AnalyticsAdminService} RPC service. Useful where requests and/or responses are streamed. + */ + AnalyticsAdminService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Account} [response] Account + */ + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAccount = function getAccount(request, callback) { + return this.rpcCall(getAccount, $root.google.analytics.admin.v1beta.GetAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); + }, "name", { value: "GetAccount" }); + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccounts}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListAccountsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListAccountsResponse} [response] ListAccountsResponse + */ + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountsCallback} callback Node-style callback called with the error, if any, and ListAccountsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccounts = function listAccounts(request, callback) { + return this.rpcCall(listAccounts, $root.google.analytics.admin.v1beta.ListAccountsRequest, $root.google.analytics.admin.v1beta.ListAccountsResponse, request, callback); + }, "name", { value: "ListAccounts" }); + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccountCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteAccount = function deleteAccount(request, callback) { + return this.rpcCall(deleteAccount, $root.google.analytics.admin.v1beta.DeleteAccountRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAccount" }); + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Account} [response] Account + */ + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAccount = function updateAccount(request, callback) { + return this.rpcCall(updateAccount, $root.google.analytics.admin.v1beta.UpdateAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); + }, "name", { value: "UpdateAccount" }); + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|provisionAccountTicket}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ProvisionAccountTicketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} [response] ProvisionAccountTicketResponse + */ + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicketCallback} callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.provisionAccountTicket = function provisionAccountTicket(request, callback) { + return this.rpcCall(provisionAccountTicket, $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse, request, callback); + }, "name", { value: "ProvisionAccountTicket" }); + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccountSummaries}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListAccountSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListAccountSummariesResponse} [response] ListAccountSummariesResponse + */ + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummariesCallback} callback Node-style callback called with the error, if any, and ListAccountSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccountSummaries = function listAccountSummaries(request, callback) { + return this.rpcCall(listAccountSummaries, $root.google.analytics.admin.v1beta.ListAccountSummariesRequest, $root.google.analytics.admin.v1beta.ListAccountSummariesResponse, request, callback); + }, "name", { value: "ListAccountSummaries" }); + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetPropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetPropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getProperty = function getProperty(request, callback) { + return this.rpcCall(getProperty, $root.google.analytics.admin.v1beta.GetPropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "GetProperty" }); + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listProperties}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListPropertiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListPropertiesResponse} [response] ListPropertiesResponse + */ + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListPropertiesCallback} callback Node-style callback called with the error, if any, and ListPropertiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listProperties = function listProperties(request, callback) { + return this.rpcCall(listProperties, $root.google.analytics.admin.v1beta.ListPropertiesRequest, $root.google.analytics.admin.v1beta.ListPropertiesResponse, request, callback); + }, "name", { value: "ListProperties" }); + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createProperty = function createProperty(request, callback) { + return this.rpcCall(createProperty, $root.google.analytics.admin.v1beta.CreatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "CreateProperty" }); + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeletePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeletePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteProperty = function deleteProperty(request, callback) { + return this.rpcCall(deleteProperty, $root.google.analytics.admin.v1beta.DeletePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "DeleteProperty" }); + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateProperty = function updateProperty(request, callback) { + return this.rpcCall(updateProperty, $root.google.analytics.admin.v1beta.UpdatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "UpdateProperty" }); + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createFirebaseLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.FirebaseLink} [response] FirebaseLink + */ + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLinkCallback} callback Node-style callback called with the error, if any, and FirebaseLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createFirebaseLink = function createFirebaseLink(request, callback) { + return this.rpcCall(createFirebaseLink, $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, $root.google.analytics.admin.v1beta.FirebaseLink, request, callback); + }, "name", { value: "CreateFirebaseLink" }); + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteFirebaseLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteFirebaseLink = function deleteFirebaseLink(request, callback) { + return this.rpcCall(deleteFirebaseLink, $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFirebaseLink" }); + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listFirebaseLinks}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListFirebaseLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListFirebaseLinksResponse} [response] ListFirebaseLinksResponse + */ + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinksCallback} callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listFirebaseLinks = function listFirebaseLinks(request, callback) { + return this.rpcCall(listFirebaseLinks, $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest, $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse, request, callback); + }, "name", { value: "ListFirebaseLinks" }); + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createGoogleAdsLink = function createGoogleAdsLink(request, callback) { + return this.rpcCall(createGoogleAdsLink, $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); + }, "name", { value: "CreateGoogleAdsLink" }); + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateGoogleAdsLink = function updateGoogleAdsLink(request, callback) { + return this.rpcCall(updateGoogleAdsLink, $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); + }, "name", { value: "UpdateGoogleAdsLink" }); + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteGoogleAdsLink = function deleteGoogleAdsLink(request, callback) { + return this.rpcCall(deleteGoogleAdsLink, $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGoogleAdsLink" }); + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listGoogleAdsLinks}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListGoogleAdsLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} [response] ListGoogleAdsLinksResponse + */ + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinksCallback} callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listGoogleAdsLinks = function listGoogleAdsLinks(request, callback) { + return this.rpcCall(listGoogleAdsLinks, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse, request, callback); + }, "name", { value: "ListGoogleAdsLinks" }); + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataSharingSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataSharingSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataSharingSettings} [response] DataSharingSettings + */ + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettingsCallback} callback Node-style callback called with the error, if any, and DataSharingSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataSharingSettings = function getDataSharingSettings(request, callback) { + return this.rpcCall(getDataSharingSettings, $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, $root.google.analytics.admin.v1beta.DataSharingSettings, request, callback); + }, "name", { value: "GetDataSharingSettings" }); + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getMeasurementProtocolSecret = function getMeasurementProtocolSecret(request, callback) { + return this.rpcCall(getMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "GetMeasurementProtocolSecret" }); + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listMeasurementProtocolSecrets}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListMeasurementProtocolSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} [response] ListMeasurementProtocolSecretsResponse + */ + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback} callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listMeasurementProtocolSecrets = function listMeasurementProtocolSecrets(request, callback) { + return this.rpcCall(listMeasurementProtocolSecrets, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse, request, callback); + }, "name", { value: "ListMeasurementProtocolSecrets" }); + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createMeasurementProtocolSecret = function createMeasurementProtocolSecret(request, callback) { + return this.rpcCall(createMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "CreateMeasurementProtocolSecret" }); + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteMeasurementProtocolSecret = function deleteMeasurementProtocolSecret(request, callback) { + return this.rpcCall(deleteMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMeasurementProtocolSecret" }); + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateMeasurementProtocolSecret = function updateMeasurementProtocolSecret(request, callback) { + return this.rpcCall(updateMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "UpdateMeasurementProtocolSecret" }); + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|acknowledgeUserDataCollection}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef AcknowledgeUserDataCollectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} [response] AcknowledgeUserDataCollectionResponse + */ + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback} callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.acknowledgeUserDataCollection = function acknowledgeUserDataCollection(request, callback) { + return this.rpcCall(acknowledgeUserDataCollection, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse, request, callback); + }, "name", { value: "AcknowledgeUserDataCollection" }); + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|searchChangeHistoryEvents}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef SearchChangeHistoryEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} [response] SearchChangeHistoryEventsResponse + */ + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEventsCallback} callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.searchChangeHistoryEvents = function searchChangeHistoryEvents(request, callback) { + return this.rpcCall(searchChangeHistoryEvents, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse, request, callback); + }, "name", { value: "SearchChangeHistoryEvents" }); + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createConversionEvent = function createConversionEvent(request, callback) { + return this.rpcCall(createConversionEvent, $root.google.analytics.admin.v1beta.CreateConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); + }, "name", { value: "CreateConversionEvent" }); + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getConversionEvent = function getConversionEvent(request, callback) { + return this.rpcCall(getConversionEvent, $root.google.analytics.admin.v1beta.GetConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); + }, "name", { value: "GetConversionEvent" }); + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEventCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteConversionEvent = function deleteConversionEvent(request, callback) { + return this.rpcCall(deleteConversionEvent, $root.google.analytics.admin.v1beta.DeleteConversionEventRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversionEvent" }); + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listConversionEvents}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListConversionEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListConversionEventsResponse} [response] ListConversionEventsResponse + */ + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEventsCallback} callback Node-style callback called with the error, if any, and ListConversionEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listConversionEvents = function listConversionEvents(request, callback) { + return this.rpcCall(listConversionEvents, $root.google.analytics.admin.v1beta.ListConversionEventsRequest, $root.google.analytics.admin.v1beta.ListConversionEventsResponse, request, callback); + }, "name", { value: "ListConversionEvents" }); + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomDimension = function createCustomDimension(request, callback) { + return this.rpcCall(createCustomDimension, $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "CreateCustomDimension" }); + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomDimension = function updateCustomDimension(request, callback) { + return this.rpcCall(updateCustomDimension, $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "UpdateCustomDimension" }); + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomDimensions}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListCustomDimensionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListCustomDimensionsResponse} [response] ListCustomDimensionsResponse + */ + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensionsCallback} callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomDimensions = function listCustomDimensions(request, callback) { + return this.rpcCall(listCustomDimensions, $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest, $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse, request, callback); + }, "name", { value: "ListCustomDimensions" }); + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ArchiveCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimensionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomDimension = function archiveCustomDimension(request, callback) { + return this.rpcCall(archiveCustomDimension, $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomDimension" }); + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomDimension = function getCustomDimension(request, callback) { + return this.rpcCall(getCustomDimension, $root.google.analytics.admin.v1beta.GetCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "GetCustomDimension" }); + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomMetric = function createCustomMetric(request, callback) { + return this.rpcCall(createCustomMetric, $root.google.analytics.admin.v1beta.CreateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "CreateCustomMetric" }); + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomMetric = function updateCustomMetric(request, callback) { + return this.rpcCall(updateCustomMetric, $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "UpdateCustomMetric" }); + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomMetrics}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListCustomMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListCustomMetricsResponse} [response] ListCustomMetricsResponse + */ + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetricsCallback} callback Node-style callback called with the error, if any, and ListCustomMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomMetrics = function listCustomMetrics(request, callback) { + return this.rpcCall(listCustomMetrics, $root.google.analytics.admin.v1beta.ListCustomMetricsRequest, $root.google.analytics.admin.v1beta.ListCustomMetricsResponse, request, callback); + }, "name", { value: "ListCustomMetrics" }); + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ArchiveCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomMetric = function archiveCustomMetric(request, callback) { + return this.rpcCall(archiveCustomMetric, $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomMetric" }); + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomMetric = function getCustomMetric(request, callback) { + return this.rpcCall(getCustomMetric, $root.google.analytics.admin.v1beta.GetCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "GetCustomMetric" }); + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataRetentionSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataRetentionSettings = function getDataRetentionSettings(request, callback) { + return this.rpcCall(getDataRetentionSettings, $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); + }, "name", { value: "GetDataRetentionSettings" }); + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataRetentionSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataRetentionSettings = function updateDataRetentionSettings(request, callback) { + return this.rpcCall(updateDataRetentionSettings, $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); + }, "name", { value: "UpdateDataRetentionSettings" }); + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createDataStream = function createDataStream(request, callback) { + return this.rpcCall(createDataStream, $root.google.analytics.admin.v1beta.CreateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "CreateDataStream" }); + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStreamCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteDataStream = function deleteDataStream(request, callback) { + return this.rpcCall(deleteDataStream, $root.google.analytics.admin.v1beta.DeleteDataStreamRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataStream" }); + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataStream = function updateDataStream(request, callback) { + return this.rpcCall(updateDataStream, $root.google.analytics.admin.v1beta.UpdateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "UpdateDataStream" }); + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listDataStreams}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListDataStreamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListDataStreamsResponse} [response] ListDataStreamsResponse + */ + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreamsCallback} callback Node-style callback called with the error, if any, and ListDataStreamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listDataStreams = function listDataStreams(request, callback) { + return this.rpcCall(listDataStreams, $root.google.analytics.admin.v1beta.ListDataStreamsRequest, $root.google.analytics.admin.v1beta.ListDataStreamsResponse, request, callback); + }, "name", { value: "ListDataStreams" }); + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataStream = function getDataStream(request, callback) { + return this.rpcCall(getDataStream, $root.google.analytics.admin.v1beta.GetDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "GetDataStream" }); + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|runAccessReport}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef RunAccessReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.RunAccessReportResponse} [response] RunAccessReportResponse + */ + + /** + * Calls RunAccessReport. + * @function runAccessReport + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest} request RunAccessReportRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.RunAccessReportCallback} callback Node-style callback called with the error, if any, and RunAccessReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.runAccessReport = function runAccessReport(request, callback) { + return this.rpcCall(runAccessReport, $root.google.analytics.admin.v1beta.RunAccessReportRequest, $root.google.analytics.admin.v1beta.RunAccessReportResponse, request, callback); + }, "name", { value: "RunAccessReport" }); + + /** + * Calls RunAccessReport. + * @function runAccessReport + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest} request RunAccessReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AnalyticsAdminService; + })(); + + v1beta.RunAccessReportRequest = (function() { + + /** + * Properties of a RunAccessReportRequest. + * @memberof google.analytics.admin.v1beta + * @interface IRunAccessReportRequest + * @property {string|null} [entity] RunAccessReportRequest entity + * @property {Array.|null} [dimensions] RunAccessReportRequest dimensions + * @property {Array.|null} [metrics] RunAccessReportRequest metrics + * @property {Array.|null} [dateRanges] RunAccessReportRequest dateRanges + * @property {google.analytics.admin.v1beta.IAccessFilterExpression|null} [dimensionFilter] RunAccessReportRequest dimensionFilter + * @property {google.analytics.admin.v1beta.IAccessFilterExpression|null} [metricFilter] RunAccessReportRequest metricFilter + * @property {number|Long|null} [offset] RunAccessReportRequest offset + * @property {number|Long|null} [limit] RunAccessReportRequest limit + * @property {string|null} [timeZone] RunAccessReportRequest timeZone + * @property {Array.|null} [orderBys] RunAccessReportRequest orderBys + * @property {boolean|null} [returnEntityQuota] RunAccessReportRequest returnEntityQuota + */ + + /** + * Constructs a new RunAccessReportRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a RunAccessReportRequest. + * @implements IRunAccessReportRequest + * @constructor + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest=} [properties] Properties to set + */ + function RunAccessReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.orderBys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunAccessReportRequest entity. + * @member {string} entity + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.entity = ""; + + /** + * RunAccessReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunAccessReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunAccessReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunAccessReportRequest dimensionFilter. + * @member {google.analytics.admin.v1beta.IAccessFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dimensionFilter = null; + + /** + * RunAccessReportRequest metricFilter. + * @member {google.analytics.admin.v1beta.IAccessFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.metricFilter = null; + + /** + * RunAccessReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunAccessReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunAccessReportRequest timeZone. + * @member {string} timeZone + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.timeZone = ""; + + /** + * RunAccessReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunAccessReportRequest returnEntityQuota. + * @member {boolean} returnEntityQuota + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.returnEntityQuota = false; + + /** + * Creates a new RunAccessReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.RunAccessReportRequest} RunAccessReportRequest instance + */ + RunAccessReportRequest.create = function create(properties) { + return new RunAccessReportRequest(properties); + }; + + /** + * Encodes the specified RunAccessReportRequest message. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest} message RunAccessReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.admin.v1beta.AccessDimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.admin.v1beta.AccessMetric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.admin.v1beta.AccessDateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.admin.v1beta.AccessFilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.admin.v1beta.AccessFilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.timeZone); + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.admin.v1beta.AccessOrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnEntityQuota != null && Object.hasOwnProperty.call(message, "returnEntityQuota")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnEntityQuota); + return writer; + }; + + /** + * Encodes the specified RunAccessReportRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportRequest} message RunAccessReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.RunAccessReportRequest} RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.RunAccessReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.admin.v1beta.AccessDimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.admin.v1beta.AccessMetric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.admin.v1beta.AccessDateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + message.timeZone = reader.string(); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.admin.v1beta.AccessOrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.returnEntityQuota = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.RunAccessReportRequest} RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAccessReportRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAccessReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessDateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.admin.v1beta.AccessFilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessOrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.returnEntityQuota != null && message.hasOwnProperty("returnEntityQuota")) + if (typeof message.returnEntityQuota !== "boolean") + return "returnEntityQuota: boolean expected"; + return null; + }; + + /** + * Creates a RunAccessReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.RunAccessReportRequest} RunAccessReportRequest + */ + RunAccessReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.RunAccessReportRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.RunAccessReportRequest(); + if (object.entity != null) + message.entity = String(object.entity); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.admin.v1beta.AccessDimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.admin.v1beta.AccessMetric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.admin.v1beta.AccessDateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.admin.v1beta.AccessOrderBy.fromObject(object.orderBys[i]); + } + } + if (object.returnEntityQuota != null) + message.returnEntityQuota = Boolean(object.returnEntityQuota); + return message; + }; + + /** + * Creates a plain object from a RunAccessReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1beta.RunAccessReportRequest} message RunAccessReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAccessReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.orderBys = []; + } + if (options.defaults) { + object.entity = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.timeZone = ""; + object.returnEntityQuota = false; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.admin.v1beta.AccessDimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.admin.v1beta.AccessMetric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.admin.v1beta.AccessDateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.admin.v1beta.AccessFilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.admin.v1beta.AccessOrderBy.toObject(message.orderBys[j], options); + } + if (message.returnEntityQuota != null && message.hasOwnProperty("returnEntityQuota")) + object.returnEntityQuota = message.returnEntityQuota; + return object; + }; + + /** + * Converts this RunAccessReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunAccessReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunAccessReportRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.RunAccessReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAccessReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.RunAccessReportRequest"; + }; + + return RunAccessReportRequest; + })(); + + v1beta.RunAccessReportResponse = (function() { + + /** + * Properties of a RunAccessReportResponse. + * @memberof google.analytics.admin.v1beta + * @interface IRunAccessReportResponse + * @property {Array.|null} [dimensionHeaders] RunAccessReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunAccessReportResponse metricHeaders + * @property {Array.|null} [rows] RunAccessReportResponse rows + * @property {number|null} [rowCount] RunAccessReportResponse rowCount + * @property {google.analytics.admin.v1beta.IAccessQuota|null} [quota] RunAccessReportResponse quota + */ + + /** + * Constructs a new RunAccessReportResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a RunAccessReportResponse. + * @implements IRunAccessReportResponse + * @constructor + * @param {google.analytics.admin.v1beta.IRunAccessReportResponse=} [properties] Properties to set + */ + function RunAccessReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunAccessReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunAccessReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunAccessReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunAccessReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.rowCount = 0; + + /** + * RunAccessReportResponse quota. + * @member {google.analytics.admin.v1beta.IAccessQuota|null|undefined} quota + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.quota = null; + + /** + * Creates a new RunAccessReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.RunAccessReportResponse} RunAccessReportResponse instance + */ + RunAccessReportResponse.create = function create(properties) { + return new RunAccessReportResponse(properties); + }; + + /** + * Encodes the specified RunAccessReportResponse message. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportResponse} message RunAccessReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.admin.v1beta.AccessDimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.admin.v1beta.AccessMetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.admin.v1beta.AccessRow.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rowCount); + if (message.quota != null && Object.hasOwnProperty.call(message, "quota")) + $root.google.analytics.admin.v1beta.AccessQuota.encode(message.quota, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunAccessReportResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.RunAccessReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1beta.IRunAccessReportResponse} message RunAccessReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.RunAccessReportResponse} RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.RunAccessReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.admin.v1beta.AccessDimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.admin.v1beta.AccessMetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.admin.v1beta.AccessRow.decode(reader, reader.uint32())); + break; + } + case 4: { + message.rowCount = reader.int32(); + break; + } + case 5: { + message.quota = $root.google.analytics.admin.v1beta.AccessQuota.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.RunAccessReportResponse} RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAccessReportResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAccessReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessDimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessMetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccessRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.quota != null && message.hasOwnProperty("quota")) { + var error = $root.google.analytics.admin.v1beta.AccessQuota.verify(message.quota); + if (error) + return "quota." + error; + } + return null; + }; + + /** + * Creates a RunAccessReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.RunAccessReportResponse} RunAccessReportResponse + */ + RunAccessReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.RunAccessReportResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.RunAccessReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.admin.v1beta.AccessDimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.admin.v1beta.AccessMetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.admin.v1beta.AccessRow.fromObject(object.rows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.quota != null) { + if (typeof object.quota !== "object") + throw TypeError(".google.analytics.admin.v1beta.RunAccessReportResponse.quota: object expected"); + message.quota = $root.google.analytics.admin.v1beta.AccessQuota.fromObject(object.quota); + } + return message; + }; + + /** + * Creates a plain object from a RunAccessReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1beta.RunAccessReportResponse} message RunAccessReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAccessReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + } + if (options.defaults) { + object.rowCount = 0; + object.quota = null; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.admin.v1beta.AccessDimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.admin.v1beta.AccessMetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.admin.v1beta.AccessRow.toObject(message.rows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.quota != null && message.hasOwnProperty("quota")) + object.quota = $root.google.analytics.admin.v1beta.AccessQuota.toObject(message.quota, options); + return object; + }; + + /** + * Converts this RunAccessReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunAccessReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunAccessReportResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.RunAccessReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAccessReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.RunAccessReportResponse"; + }; + + return RunAccessReportResponse; })(); v1beta.GetAccountRequest = (function() { diff --git a/packages/google-analytics-admin/protos/protos.json b/packages/google-analytics-admin/protos/protos.json index 158fedb467f..5b0cc7256f7 100644 --- a/packages/google-analytics-admin/protos/protos.json +++ b/packages/google-analytics-admin/protos/protos.json @@ -6681,6 +6681,343 @@ "java_package": "com.google.analytics.admin.v1beta" }, "nested": { + "AccessDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetric": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "AccessDateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + } + } + }, + "AccessFilterExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "accessFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "AccessFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "AccessFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "AccessFilterExpression", + "id": 3 + }, + "accessFilter": { + "type": "AccessFilter", + "id": 4 + } + } + }, + "AccessFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "AccessFilterExpression", + "id": 1 + } + } + }, + "AccessFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "stringFilter": { + "type": "AccessStringFilter", + "id": 2 + }, + "inListFilter": { + "type": "AccessInListFilter", + "id": 3 + }, + "numericFilter": { + "type": "AccessNumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "AccessBetweenFilter", + "id": 5 + }, + "fieldName": { + "type": "string", + "id": 1 + } + } + }, + "AccessStringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "AccessInListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "AccessNumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "AccessBetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "AccessOrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "desc": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + } + } + }, + "AccessDimensionHeader": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetricHeader": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "AccessRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AccessDimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "AccessMetricValue", + "id": 2 + } + } + }, + "AccessDimensionValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetricValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "AccessQuota": { + "fields": { + "tokensPerDay": { + "type": "AccessQuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "AccessQuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "AccessQuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "AccessQuotaStatus", + "id": 4 + }, + "tokensPerProjectPerHour": { + "type": "AccessQuotaStatus", + "id": 5 + } + } + }, + "AccessQuotaStatus": { + "fields": { + "consumed": { + "type": "int32", + "id": 1 + }, + "remaining": { + "type": "int32", + "id": 2 + } + } + }, "AnalyticsAdminService": { "options": { "(google.api.default_host)": "analyticsadmin.googleapis.com", @@ -7550,6 +7887,107 @@ "(google.api.method_signature)": "name" } ] + }, + "RunAccessReport": { + "requestType": "RunAccessReportRequest", + "responseType": "RunAccessReportResponse", + "options": { + "(google.api.http).post": "/v1beta/{entity=properties/*}:runAccessReport", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta/{entity=accounts/*}:runAccessReport", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{entity=properties/*}:runAccessReport", + "body": "*", + "additional_bindings": { + "post": "/v1beta/{entity=accounts/*}:runAccessReport", + "body": "*" + } + } + } + ] + } + } + }, + "RunAccessReportRequest": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "AccessDimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "AccessMetric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "AccessDateRange", + "id": 4 + }, + "dimensionFilter": { + "type": "AccessFilterExpression", + "id": 5 + }, + "metricFilter": { + "type": "AccessFilterExpression", + "id": 6 + }, + "offset": { + "type": "int64", + "id": 7 + }, + "limit": { + "type": "int64", + "id": 8 + }, + "timeZone": { + "type": "string", + "id": 9 + }, + "orderBys": { + "rule": "repeated", + "type": "AccessOrderBy", + "id": 10 + }, + "returnEntityQuota": { + "type": "bool", + "id": 11 + } + } + }, + "RunAccessReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "AccessDimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "AccessMetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "AccessRow", + "id": 3 + }, + "rowCount": { + "type": "int32", + "id": 4 + }, + "quota": { + "type": "AccessQuota", + "id": 5 } } }, diff --git a/packages/google-analytics-admin/samples/README.md b/packages/google-analytics-admin/samples/README.md index f3d23925c09..5193b2426c9 100644 --- a/packages/google-analytics-admin/samples/README.md +++ b/packages/google-analytics-admin/samples/README.md @@ -170,6 +170,7 @@ * [Analytics_admin_service.list_measurement_protocol_secrets](#analytics_admin_service.list_measurement_protocol_secrets) * [Analytics_admin_service.list_properties](#analytics_admin_service.list_properties) * [Analytics_admin_service.provision_account_ticket](#analytics_admin_service.provision_account_ticket) + * [Analytics_admin_service.run_access_report](#analytics_admin_service.run_access_report) * [Analytics_admin_service.search_change_history_events](#analytics_admin_service.search_change_history_events) * [Analytics_admin_service.update_account](#analytics_admin_service.update_account) * [Analytics_admin_service.update_custom_dimension](#analytics_admin_service.update_custom_dimension) @@ -2883,6 +2884,23 @@ __Usage:__ +### Analytics_admin_service.run_access_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js` + + +----- + + + + ### Analytics_admin_service.search_change_history_events View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js). diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js index 381944e9bec..6b152cbaca5 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js @@ -33,8 +33,8 @@ function main(property, acknowledgement) { */ // const property = 'abc123' /** - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. An acknowledgement that the caller of this method understands the + * terms of user data collection. * This field must contain the exact value: * "I acknowledge that I have the necessary privacy disclosures and rights * from my end users for the collection and processing of their data, diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js index 4040885a046..b63a44b7a36 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js @@ -33,8 +33,8 @@ function main(conversionEvent, parent) { */ // const conversionEvent = {} /** - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 */ // const parent = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js index 61981ffc75e..a444c5aa701 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js @@ -43,7 +43,7 @@ function main(parent) { /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js index d13c67138d3..55d6b28696b 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js @@ -34,7 +34,7 @@ function main() { // const account = {} /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. */ // const redirectUri = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js new file mode 100644 index 00000000000..f198a8d8b37 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js @@ -0,0 +1,139 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_RunAccessReport_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + */ + // const entity = 'abc123' + /** + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + */ + // const dimensions = 1234 + /** + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + */ + // const metrics = 1234 + /** + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + */ + // const dateRanges = 1234 + /** + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + */ + // const metricFilter = {} + /** + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + */ + // const timeZone = 'abc123' + /** + * Specifies how rows are ordered in the response. + */ + // const orderBys = 1234 + /** + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in AccessQuota (#AccessQuota). For account-level + * requests, this field must be false. + */ + // const returnEntityQuota = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callRunAccessReport() { + // Construct request + const request = { + }; + + // Run request + const response = await adminClient.runAccessReport(request); + console.log(response); + } + + callRunAccessReport(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_RunAccessReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js index 3c66ba712af..62edc7851f5 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js @@ -29,7 +29,8 @@ function main(account) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. */ // const account = 'abc123' /** @@ -38,17 +39,18 @@ function main(account) { */ // const property = 'abc123' /** - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. */ // const resourceType = 1234 /** - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. */ // const action = 1234 /** - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. */ // const actorEmail = 'abc123' /** @@ -67,10 +69,11 @@ function main(account) { */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. */ // const pageToken = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js index a390005393a..42a1adc651e 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js @@ -34,9 +34,10 @@ function main(account, updateMask) { */ // const account = {} /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js index 481a0e6f266..bc8726494e8 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js @@ -33,9 +33,9 @@ function main(updateMask) { */ // const customDimension = {} /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js index 9d62187a8d4..f0de40297ff 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js @@ -33,9 +33,9 @@ function main(updateMask) { */ // const customMetric = {} /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js index f0a119d5a57..4dc7e9f52d6 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js @@ -34,9 +34,10 @@ function main(dataRetentionSettings, updateMask) { */ // const dataRetentionSettings = {} /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js index bba376ce952..f151f9e38dc 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js @@ -33,9 +33,9 @@ function main(updateMask) { */ // const dataStream = {} /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js index 8bdd6ea6a51..a3177166541 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js @@ -33,9 +33,10 @@ function main(updateMask) { */ // const googleAdsLink = {} /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js index bb9329e6a5e..c856ef50871 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js @@ -35,9 +35,10 @@ function main(property, updateMask) { */ // const property = {} /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. */ // const updateMask = {} diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index 330acb5f214..fa196359729 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -150,7 +150,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 62, "type": "FULL" } ], @@ -407,7 +407,7 @@ "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteProperty_async", "title": "AnalyticsAdminService deleteProperty Sample", "origin": "API_DEFINITION", - "description": " Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", + "description": " Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", "canonical": true, "file": "analytics_admin_service.delete_property.js", "language": "JAVASCRIPT", @@ -454,7 +454,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 63, "type": "FULL" } ], @@ -674,7 +674,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 60, "type": "FULL" } ], @@ -1055,7 +1055,7 @@ "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async", "title": "AnalyticsAdminService acknowledgeUserDataCollection Sample", "origin": "API_DEFINITION", - "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", + "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.", "canonical": true, "file": "analytics_admin_service.acknowledge_user_data_collection.js", "language": "JAVASCRIPT", @@ -1106,7 +1106,7 @@ "segments": [ { "start": 25, - "end": 96, + "end": 99, "type": "FULL" } ], @@ -1822,7 +1822,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 62, "type": "FULL" } ], @@ -2070,6 +2070,86 @@ } } } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_RunAccessReport_async", + "title": "AnalyticsAdminService runAccessReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "canonical": true, + "file": "analytics_admin_service.run_access_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 131, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunAccessReport", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.RunAccessReport", + "async": true, + "parameters": [ + { + "name": "entity", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.admin.v1beta.AccessFilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.admin.v1beta.AccessFilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "time_zone", + "type": "TYPE_STRING" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_entity_quota", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1beta.RunAccessReportResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "RunAccessReport", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.RunAccessReport", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts index e48000db1cd..6b94c1a0f26 100644 --- a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts @@ -376,6 +376,7 @@ export class AnalyticsAdminServiceClient { 'updateDataStream', 'listDataStreams', 'getDataStream', + 'runAccessReport', ]; for (const methodName of analyticsAdminServiceStubMethods) { const callPromise = this.analyticsAdminServiceStub.then( @@ -667,9 +668,10 @@ export class AnalyticsAdminServiceClient { * Required. The account to update. * The account's `name` field is used to identify the account. * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -763,7 +765,7 @@ export class AnalyticsAdminServiceClient { * The account to create. * @param {string} request.redirectUri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1046,7 +1048,7 @@ export class AnalyticsAdminServiceClient { * will be permanently purged. * https://support.google.com/analytics/answer/6154772 * - * Returns an error if the target is not found, or is not an GA4 Property. + * Returns an error if the target is not found, or is not a GA4 Property. * * @param {Object} request * The request object that will be sent. @@ -1148,9 +1150,10 @@ export class AnalyticsAdminServiceClient { * The property's `name` field is used to identify the property to be * updated. * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1542,9 +1545,10 @@ export class AnalyticsAdminServiceClient { * @param {google.analytics.admin.v1beta.GoogleAdsLink} request.googleAdsLink * The GoogleAdsLink to update * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2254,15 +2258,16 @@ export class AnalyticsAdminServiceClient { * Acknowledges the terms of user data collection for the specified property. * * This acknowledgement must be completed (either in the Google Analytics UI - * or via this API) before MeasurementProtocolSecret resources may be created. + * or through this API) before MeasurementProtocolSecret resources may be + * created. * * @param {Object} request * The request object that will be sent. * @param {string} request.property * Required. The property for which to acknowledge user data collection. * @param {string} request.acknowledgement - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. An acknowledgement that the caller of this method understands the + * terms of user data collection. * * This field must contain the exact value: * "I acknowledge that I have the necessary privacy disclosures and rights @@ -2371,8 +2376,8 @@ export class AnalyticsAdminServiceClient { * @param {google.analytics.admin.v1beta.ConversionEvent} request.conversionEvent * Required. The conversion event to create. * @param {string} request.parent - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2768,9 +2773,9 @@ export class AnalyticsAdminServiceClient { * @param {google.analytics.admin.v1beta.CustomDimension} request.customDimension * The CustomDimension to update * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3168,9 +3173,9 @@ export class AnalyticsAdminServiceClient { * @param {google.analytics.admin.v1beta.CustomMetric} request.customMetric * The CustomMetric to update * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3564,9 +3569,10 @@ export class AnalyticsAdminServiceClient { * Required. The settings to update. * The `name` field is used to identify the settings to be updated. * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3855,9 +3861,9 @@ export class AnalyticsAdminServiceClient { * @param {google.analytics.admin.v1beta.DataStream} request.dataStream * The DataStream to update * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -4034,6 +4040,173 @@ export class AnalyticsAdminServiceClient { this.initialize(); return this.innerApiCalls.getDataStream(request, options, callback); } + /** + * Returns a customized report of data access records. The report provides + * records of each time a user reads Google Analytics reporting data. Access + * records are retained for up to 2 years. + * + * Data Access Reports can be requested for a property. The property must be + * in Google Analytics 360. This method is only available to Administrators. + * + * These data access records include GA4 UI Reporting, GA4 UI Explorations, + * GA4 Data API, and other products like Firebase & Admob that can retrieve + * data from Google Analytics through a linkage. These records don't include + * property configuration changes like adding a stream or changing a + * property's time zone. For configuration change history, see + * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.entity + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * @param {number[]} request.dimensions + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * @param {number[]} request.metrics + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * @param {number[]} request.dateRanges + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * @param {google.analytics.admin.v1beta.AccessFilterExpression} request.dimensionFilter + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.admin.v1beta.AccessFilterExpression} request.metricFilter + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * @param {number} request.offset + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {string} request.timeZone + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * @param {boolean} request.returnEntityQuota + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.analytics.admin.v1beta.RunAccessReportResponse | RunAccessReportResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.run_access_report.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_RunAccessReport_async + */ + runAccessReport( + request?: protos.google.analytics.admin.v1beta.IRunAccessReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + protos.google.analytics.admin.v1beta.IRunAccessReportRequest | undefined, + {} | undefined + ] + >; + runAccessReport( + request: protos.google.analytics.admin.v1beta.IRunAccessReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + | protos.google.analytics.admin.v1beta.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + runAccessReport( + request: protos.google.analytics.admin.v1beta.IRunAccessReportRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + | protos.google.analytics.admin.v1beta.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + runAccessReport( + request?: protos.google.analytics.admin.v1beta.IRunAccessReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + | protos.google.analytics.admin.v1beta.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + | protos.google.analytics.admin.v1beta.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IRunAccessReportResponse, + protos.google.analytics.admin.v1beta.IRunAccessReportRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + entity: request.entity ?? '', + }); + this.initialize(); + return this.innerApiCalls.runAccessReport(request, options, callback); + } /** * Returns all accounts accessible by the caller. @@ -4703,7 +4876,7 @@ export class AnalyticsAdminServiceClient { * @param {string} request.pageToken * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4808,7 +4981,7 @@ export class AnalyticsAdminServiceClient { * @param {string} request.pageToken * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4861,7 +5034,7 @@ export class AnalyticsAdminServiceClient { * @param {string} request.pageToken * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -5328,18 +5501,20 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.account - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * @param {string} [request.property] * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * @param {google.protobuf.Timestamp} [request.earliestChangeTime] * Optional. If set, only return changes made after this time (inclusive). * @param {google.protobuf.Timestamp} [request.latestChangeTime] @@ -5350,10 +5525,11 @@ export class AnalyticsAdminServiceClient { * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -5451,18 +5627,20 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.account - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * @param {string} [request.property] * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * @param {google.protobuf.Timestamp} [request.earliestChangeTime] * Optional. If set, only return changes made after this time (inclusive). * @param {google.protobuf.Timestamp} [request.latestChangeTime] @@ -5473,10 +5651,11 @@ export class AnalyticsAdminServiceClient { * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -5518,18 +5697,20 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.account - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * @param {string} [request.property] * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * @param {google.protobuf.Timestamp} [request.earliestChangeTime] * Optional. If set, only return changes made after this time (inclusive). * @param {google.protobuf.Timestamp} [request.latestChangeTime] @@ -5540,10 +5721,11 @@ export class AnalyticsAdminServiceClient { * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json index e1e3f9017e4..aabd0a6eb1e 100644 --- a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json @@ -35,28 +35,28 @@ "methods": { "GetAccount": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListAccounts": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "DeleteAccount": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "UpdateAccount": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ProvisionAccountTicket": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListAccountSummaries": { "timeout_millis": 60000, @@ -65,63 +65,63 @@ }, "GetProperty": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListProperties": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "CreateProperty": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "DeleteProperty": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "UpdateProperty": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "CreateFirebaseLink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "DeleteFirebaseLink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListFirebaseLinks": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "CreateGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "UpdateGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "DeleteGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListGoogleAdsLinks": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "GetDataSharingSettings": { "timeout_millis": 60000, @@ -267,6 +267,11 @@ "timeout_millis": 60000, "retry_codes_name": "unknown_unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RunAccessReport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" } } } diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json index fb30c5ecfee..95cd6a5fee5 100644 --- a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/analytics/admin/v1beta/access_report.proto", "../../protos/google/analytics/admin/v1beta/analytics_admin.proto", "../../protos/google/analytics/admin/v1beta/resources.proto" ] diff --git a/packages/google-analytics-admin/src/v1beta/gapic_metadata.json b/packages/google-analytics-admin/src/v1beta/gapic_metadata.json index 6293235f50d..5c694601ea0 100644 --- a/packages/google-analytics-admin/src/v1beta/gapic_metadata.json +++ b/packages/google-analytics-admin/src/v1beta/gapic_metadata.json @@ -190,6 +190,11 @@ "getDataStream" ] }, + "RunAccessReport": { + "methods": [ + "runAccessReport" + ] + }, "ListAccounts": { "methods": [ "listAccounts", @@ -452,6 +457,11 @@ "getDataStream" ] }, + "RunAccessReport": { + "methods": [ + "runAccessReport" + ] + }, "ListAccounts": { "methods": [ "listAccounts", diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts index e1fe39cfe7b..9e4483c249a 100644 --- a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts @@ -5107,6 +5107,140 @@ describe('v1beta.AnalyticsAdminServiceClient', () => { }); }); + describe('runAccessReport', () => { + it('invokes runAccessReport without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportResponse() + ); + client.innerApiCalls.runAccessReport = stubSimpleCall(expectedResponse); + const [response] = await client.runAccessReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportResponse() + ); + client.innerApiCalls.runAccessReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runAccessReport( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IRunAccessReportResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runAccessReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.runAccessReport(request), expectedError); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runAccessReport(request), expectedError); + }); + }); + describe('listAccounts', () => { it('invokes listAccounts without error', async () => { const client =